Unable to mount local glusterfs volume at boot

Bug #876648 reported by Louis Zuckerman
This bug affects 6 people
Affects Status Importance Assigned to Milestone
glusterfs (Ubuntu)
Fix Released

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.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.)


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.


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.

Related branches

Revision history for this message
Louis Zuckerman (semiosis) wrote :

This affects ubuntu Oneiric & later because it is specific to glusterfs versions greater than 3.1.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package glusterfs - 3.2.5-1ubuntu1

glusterfs (3.2.5-1ubuntu1) precise; urgency=low

  * Added Ubuntu upstart jobs providing support for local glusterfs mounts
    (LP: #876648)
 -- Louis Zuckerman <email address hidden> Sat, 28 Jan 2012 15:32:55 -0500

Changed in glusterfs (Ubuntu):
status: New → Fix Released
Revision history for this message
Ludwig (tokobagus-sa) wrote :

Glusterfs 3.2.5 client can't mount at boot - Ubuntu 12.04 LTS

Revision history for this message
Brock Nanson (brock-b) wrote :

Gluster 3.4.2 and Ubuntu 12.04 LTS apparently still suffer from this issue.

Revision history for this message
Louis Zuckerman (semiosis) wrote :

Brock, the glusterfs 3.4.2 packages do not suffer from this. You had some other problem but refused my offer of support to find out what it was. Please do not spread this FUD.

Ludwig, please use the upstream PPA for the latest GlusterFS packages: https://launchpad.net/~semiosis/+archive/ubuntu-glusterfs-3.4

Revision history for this message
Brock Nanson (brock-b) wrote :

Problem still exists on my vanilla installation after re-installing yet again. I don't Fear it, I'm not Uncertain of it and I don't Doubt it. Not FUD in my mind. No offer of assistance was given by you, in fact you told me to sod off when I asked IF it was a bug and whether RTFM was going to solve it. It might be a somewhat isolated issue, perhaps tied to the RAID card in my Dells (for all I know), which is why I brought it forward somewhat tentatively in the first place. Bugs that aren't flagged rarely get fixed. No one's suggesting you aren't a genius.

Revision history for this message
Louis Zuckerman (semiosis) wrote :

I told you to meet me in the #gluster channel on Freenode IRC where I would be happy to provide support. You refused the offer, but it's open.

Any time you want support from me, find me on IRC -- that offer stands for anyone, anytime.

Revision history for this message
J. Pablo Fernández (pupeno) wrote :

Is this bug somehow present in GlusterFS 3.5 on Ubuntu 12.04? Or am I experience a completely different issue? I posted a lot of details about it here:


Revision history for this message
JPi (ajuanpi) wrote :

This script solves the problem on Ubuntu 14.04. It is a workaround.


Revision history for this message
Rafael Sanches (j-iam) wrote :

Just to make it sure other people don't waste countless of hours like I did, here's the easiest solution:

$ crontab -e
@reboot mount -t glusterfs localhost:/craft-cache-slow /fs-craft/cache-slow

Have fun.

Revision history for this message
Albéric de Pertat (alberic) wrote :

Another workaround, systemd-based, because yes it still happens on Xenial :

$ systemctl edit my-mount-point.mount

$ systemctl cat my-mount-point.mount
# /run/systemd/generator/my-mount-point.mount
# Automatically generated by systemd-fstab-generator

Documentation=man:fstab(5) man:systemd-fstab-generator(8)


# /etc/systemd/system/my-mount-point.mount.d/override.conf

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers