Public bug reported:

Mounting glusterfs volumes from localhost in fstab does not work because
the mounts are started before the glusterfs-server daemon.

The problem is that upstart runs mountall before it runs the /etc/rc2.d
/S20glusterfs-server initscript, so when the mount is tried it fails
because there is not yet any glusterfs-server running on localhost.

To reproduce (as root):

apt-get install glusterfs-server glusterfs-client
gluster volume create test <eth0-IP>:/var/tmp
gluster volume start test
mkdir /media/test
echo "localhost:test /media/test glusterfs defaults 0 0" >> /etc/fstab
shutdown -r now

After rebooting, the new volume will not be mounted.  However, once the
system has started and glusterfs-server daemon is running, doing a
'mount -a' will work to mount the volume (confirming that the volume &
fstab config are correct.)

Solution:

The solution is to replace the glusterfs-server initscript with a proper
upstart job which will start the glusterfs-server daemon before the
glusterfs mounts are tried by mountall.  I have contributed the
necessary upstart job upstream to the glusterfs project and it is
included in the development source tree under
extras/Ubuntu/glusterd.conf.

https://github.com/gluster/glusterfs/blob/master/extras/Ubuntu/glusterd.conf

To include this file in the glusterfs-server binary package, remove the
debian/glusterfs-server.init file from the source package and add that
upstart job to it as debian/glusterfs-server.upstart.

** Affects: glusterfs (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/876648

Title:
  Unable to mount local glusterfs volume at boot

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glusterfs/+bug/876648/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to