by on April 16, 2014

New Style Replication

This afternoon, I’ll be giving a talk about (among other things) my current project at work – New Style Replication. For those who don’t happen to be at Red Hat Summit, here’s some information about why, what, how, and so on.
First, why. I’m all out …

Read More

by on April 15, 2014

Configuring autofs for GlusterFS 3.5

GlusterFS 3.5 has not been released yet, but that should happen hopefully anytime soon (currently in beta). The RPM-packaging in this version has changed a little, and now offers a glusterfs-cli package. This package mainly contains the gluster commandline interface (and pulls in any dependencies).

On of the very useful things that is now made possible, is to list the available volumes on Gluster Storge Servers. This similar functionality is used by the /etc/auto.net script to list NFS-exports that are available for mounting. The auto.net script is by default enabled after installing and starting autofs:

# yum install autofs
# systemctl enable autofs.service
# systemctl start autofs.service

Checking, and mounting NFS-exports is made as easy as:

$ ls /net/nfs-server.example.net
archive media mock_cache olpc
$ ls /net/nfs-server.example.net/mock_cache/fedora-rawhide-armhfp/
yum_cache

Making this functionality available for Gluster Volumes is simple, just follow these steps:

  1. install the gluster command

     # yum install glusterfs-cli
  2. save the file below as /etc/auto.glfs

     #!/bin/bash
    # /etc/auto.glfs -- based on /etc/auto.net
    #
    # This file must be executable to work! chmod 755!
    #
    # Look at what a host is exporting to determine what we can mount.
    # This is very simple, but it appears to work surprisingly well
    #

    key="$1"

    # add "nosymlink" here if you want to suppress symlinking local filesystems
    # add "nonstrict" to make it OK for some filesystems to not mount
    opts="-fstype=glusterfs,nodev,nosuid"

    for P in /usr/local/bin /usr/local/sbin /usr/bin /usr/sbin /bin /sbin
    do
    if [ -x ${P}/gluster ]
    then
    GLUSTER_CLI=${P}/gluster
    break
    fi
    done

    [ -x ${GLUSTER_CLI} ] || exit 1

    ${GLUSTER_CLI} --remote-host="${key}" volume list | \
    awk -v key="$key" -v opts="$opts" -- '
    BEGIN { ORS=""; first=1 }
    { if (first) { print opts; first=0 }; print " \\\n\t/" $1, key ":/" $1 }
    END { if (!first) print "\n"; else exit 1 }' | \
    sed 's/#/\\#/g'
  3. make the script executable

     # chmod 0755 /etc/auto.glfs
  4. add an automount point to the autofs configuration

     # echo /glfs /etc/auto.glfs > /etc/auto.master.d/glfs.autofs
  5. reload the autofs configuration

     # systemctl reload autofs.service

After this, autofs should have created a new /glfs directory. The directory itself is empty, but a ls /glfs/gluster.example.net will show all the available volumes on the gluster.example.net server. These volumes can now be accessed through the autofs mountpoint. When the volumes are not used anymore, autofs will automatically unmount them after a timeout.

Read More

by on

BigPetStore goes primetime !

My petstore is huge !Thanks  everyone for your help so far on BigPetStore! We’ve made alot of progress this last couple of months. The open stack sahara community has adopted it for there RHS demo:  Thanks matt for your hard work getting it u…

Read More

by on April 8, 2014

GlusterFS mounts fail at boot on CentOS

After nearly a year of running GlusterFS on my compute cluster, I’m surprised it took me so long to run into this bug. I rebooted one of my compute nodes and found that the machine hung at Mounting network filesystems during the boot sequence. From the volume log — /var/log/glusterfs/<volname>.log — on the client, it […]

Read More