Unable to mount local glusterfs volume at boot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
glusterfs (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
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.
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/
https:/
To include this file in the glusterfs-server binary package, remove the debian/
Related branches
- Clint Byrum (community): Needs Fixing
-
Diff: 68 lines (+29/-1)5 files modifieddebian/changelog (+7/-0)
debian/control (+2/-1)
debian/glusterfs-server.mounting-glusterfs.upstart (+7/-0)
debian/glusterfs-server.upstart (+10/-0)
debian/rules (+3/-0)
This affects ubuntu Oneiric & later because it is specific to glusterfs versions greater than 3.1.