Unable to mount local glusterfs volume at boot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| glusterfs (Ubuntu) |
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 on 2012-01-29
-
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)
Louis Zuckerman (semiosis) wrote : | #1 |
Launchpad Janitor (janitor) wrote : | #2 |
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 |
Ludwig (tokobagus-sa) wrote : | #3 |
Glusterfs 3.2.5 client can't mount at boot - Ubuntu 12.04 LTS
Brock Nanson (brock-b) wrote : | #4 |
Gluster 3.4.2 and Ubuntu 12.04 LTS apparently still suffer from this issue.
Louis Zuckerman (semiosis) wrote : | #5 |
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:/
Brock Nanson (brock-b) wrote : | #6 |
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.
Louis Zuckerman (semiosis) wrote : | #7 |
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.
J. Pablo Fernández (pupeno) wrote : | #8 |
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:
http://
JPi (ajuanpi) wrote : | #9 |
This script solves the problem on Ubuntu 14.04. It is a workaround.
http://
Rafael Sanches (j-iam) wrote : | #10 |
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:
Have fun.
Albéric de Pertat (alberic) wrote : | #11 |
Another workaround, systemd-based, because yes it still happens on Xenial :
$ systemctl edit my-mount-
[Unit]
After=glusterfs
Wants=glusterfs
$ systemctl cat my-mount-
# /run/systemd/
# Automatically generated by systemd-
[Unit]
SourcePath=
Documentation=
Before=
[Mount]
What=localhost:
Where=/
Type=glusterfs
Options=
# /etc/systemd/
[Unit]
After=glusterfs
Wants=glusterfs
This affects ubuntu Oneiric & later because it is specific to glusterfs versions greater than 3.1.