[Gluster-users] One node goes offline, the other node can't see the replicated volume anymore

Greg Scott GregScott at infrasupport.com
Wed Jul 17 11:31:46 UTC 2013

This combination seems to mount my /firewall-scripts filesystem on both nodes.  My application stuff is still commented out for right now.   I’ll have to change that very soon so I can finish debugging my own stuff.

I had to put back in the sleep 30 in my glustermount.sh (used to be rc.local).  I know sleeping 30 seconds is ugly and I would **much** rather do it more deterministically by making sure it runs in the proper order.  But I’m not so sure that “After” line in the .service file really means it.  Or maybe “After” means start after those items are started but not necessarily finished. Not really sure.  I wish I had a better handle on that.

And then my other systemd issue with all this is, systemd doesn’t seem to record all the output of the scripts it runs.  I have a bunch of debug stuff in my glustermount.sh script, but when I do systemctl status glustermount.service –n 50, it is always missing the last 10 or so lines of output from my script.  I’ve shown that in a few other posts in this thread.  The debug stuff shows a df –h, then the result of mount –av, then another df –h.  systemd consistently truncates the output from that second df –h.  So when I use systemd to run that script, I never see before and after results.  Frustrating.

[root at chicago-fw1 ~]# more /usr/lib/systemd/system/glustermount.service
# This unit is Greg's attempt to mount my Gluster filesystem.
# Ripped off from rc-local.service
# Must run after glusterd.service

Description=Set up Gluster mounts
After=network.target glusterd.service


[root at chicago-fw1 ~]#
[root at chicago-fw1 ~]#
[root at chicago-fw1 ~]# more /etc/rc.d/glustermount.sh
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
# Note removed by default starting in Fedora 16.

touch /var/lock/subsys/local

# Local stuff below

echo "Sleeping 30 seconds."
sleep 30
echo "Making sure the Gluster stuff is mounted"
echo "Mounted before mount -av"
df -h
mount -av
echo "Mounted after mount -av"
df -h
# The fstab mounts happen early in startup, then Gluster starts up later.
# By now, Gluster should be up and running and the mounts should work.
# That _netdev option is supposed to account for the delay but doesn't seem
# to work right.

echo "Starting up firewall common items"
## /firewall-scripts/etc/rc.d/common-rc.local
[root at chicago-fw1 ~]#

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://supercolony.gluster.org/pipermail/gluster-users/attachments/20130717/f94cca0d/attachment.html>

More information about the Gluster-users mailing list