<div dir="ltr">Hello,<div><br></div><div>I also tried a custom upstart job to mount the volumes after glusterfs-server starts, like this:</div><div><br></div><div><div><font face="courier new, monospace">description &quot;Mount public uploads&quot;</font></div>

<div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">start on started glusterfs-server</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">exec mount /var/www/shared/public/uploads</font></div>

</div><div><br></div><div>but it didn&#39;t work. All I could find was:</div><div><br></div><div>&gt; Mount failed. Please check the log file for more details.<br></div><div><br></div><div>in the upstart logs, but no other log. Starting that upstart job manually after the computer finished booting up seemed to work, so I would guess that glusterfs didn&#39;t finish starting or something.</div>

<div><br></div><div>What&#39;s the proper way of doing this? Is there a proper way of mounting a localhost volume at boot time?</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 17, 2014 at 9:25 AM, J. Pablo Fernández <span dir="ltr">&lt;<a href="mailto:pupeno@pupeno.com" target="_blank">pupeno@pupeno.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hello,</div><div><div>I&#39;m running the official GlusterFS 3.5 packages on an Ubuntu 12.04 box that is acting as both, client and server, and everything seems to be working fine, except mounting the GlusterFS volumes at boot time. This is what I see in the log files:</div>


<div><br></div><div><font face="courier new, monospace">    [2014-06-17 08:20:52.969258] I [glusterfsd.c:1959:main] 0-/usr/sbin/glusterfs: Started running /usr/sbin/glusterfs version 3.5.0 (/usr/sbin/glusterfs --volfile-server=127.0.0.1 --volfile-id=/public_uploads /var/www/shared/public/uploads)</font></div>


<div><font face="courier new, monospace">    [2014-06-17 08:20:52.998985] I [socket.c:3561:socket_init] 0-glusterfs: SSL support is NOT enabled</font></div><div><font face="courier new, monospace">    [2014-06-17 08:20:52.999048] I [socket.c:3576:socket_init] 0-glusterfs: using system polling thread</font></div>


<div><font face="courier new, monospace">    [2014-06-17 08:20:53.000373] E [socket.c:2161:socket_connect_finish] 0-glusterfs: connection to <a href="http://127.0.0.1:24007" target="_blank">127.0.0.1:24007</a> failed (Connection refused)</font></div>


<div><font face="courier new, monospace">    [2014-06-17 08:20:53.000427] E [glusterfsd-mgmt.c:1601:mgmt_rpc_notify] 0-glusterfsd-mgmt: failed to connect with remote-host: 127.0.0.1 (No data available)</font></div><div><font face="courier new, monospace">    [2014-06-17 08:20:53.000442] I [glusterfsd-mgmt.c:1607:mgmt_rpc_notify] 0-glusterfsd-mgmt: Exhausted all volfile servers</font></div>


<div><font face="courier new, monospace">    [2014-06-17 08:20:53.013793] W [glusterfsd.c:1095:cleanup_and_exit] (--&gt;/usr/lib/x86_64-linux-gnu/libgfrpc.so.0(rpc_transport_notify+0x27) [0x7f686e0160f7] (--&gt;/usr/lib/x86_64-linux-gnu/libgfrpc.so.0(rpc_clnt_notify+0x1a4) [0x7f686e019cc4] (--&gt;/usr/sbin/glusterfs(+0xcada) [0x7f686e6ddada]))) 0-: received signum (1), shutting down</font></div>


<div><font face="courier new, monospace">    [2014-06-17 08:20:53.013830] I [fuse-bridge.c:5444:fini] 0-fuse: Unmounting &#39;/var/www/shared/public/uploads&#39;.</font></div><div><br></div><div>My fstab contains:</div><div>


<br></div><div><font face="courier new, monospace">    proc        /proc                        proc    defaults                       0       0</font></div><div><font face="courier new, monospace">    /dev/xvda   /                            ext4    noatime,errors=remount-ro      0       1</font></div>


<div><font face="courier new, monospace">    /dev/xvdb   none                         swap    sw                             0       0</font></div><div><font face="courier new, monospace">    /dev/xvdc   /var/lib/glusterfs/brick01   ext4    defaults                       1       2</font></div>


<div><font face="courier new, monospace">    127.0.0.1:/private_uploads /var/www/shared/private/uploads glusterfs defaults,_netdev 0 0</font></div><div><br></div><div>I know this used to be a bug in GlusterFS 3.2 for Ubuntu, but I understand it was solved in the PPA packages for GlusterFS 3.4 as shown here: <a href="https://bugs.launchpad.net/ubuntu/+source/glusterfs/+bug/876648" target="_blank">https://bugs.launchpad.net/ubuntu/+source/glusterfs/+bug/876648</a></div>


<div><br></div><div>I also remember this working in an experiment I run with some virtual machines (but since it just working, I didn&#39;t look too deep into it). I see that the gluster-client packages provides an upstart job called mounting-glusterfs.conf which contains:</div>


<div><br></div><div><font face="courier new, monospace">    author &quot;Louis Zuckerman &lt;<a href="mailto:me@louiszuckerman.com" target="_blank">me@louiszuckerman.com</a>&gt;&quot;</font></div><div><font face="courier new, monospace">    description &quot;Block the mounting event for glusterfs filesystems until the network interfaces are running&quot;</font></div>


<div><font face="courier new, monospace">    </font></div><div><font face="courier new, monospace">    instance $MOUNTPOINT</font></div><div><font face="courier new, monospace">    </font></div><div><font face="courier new, monospace">    start on mounting TYPE=glusterfs</font></div>


<div><font face="courier new, monospace">    task</font></div><div><font face="courier new, monospace">    exec start wait-for-state WAIT_FOR=static-network-up WAITER=mounting-glusterfs-$MOUNTPOINT</font></div><div><br></div>


<div>But I&#39;m not so sure how it should work. It doesn&#39;t seem to be working out of the box. Even though mounting of glusterfs volumes happens after the network starts, it happens before GlusterFS starts:</div><div>


<font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">     * Starting RPC portmapper replacement                                   [ OK ]</font></div><div><font face="courier new, monospace">     * Stopping rpcsec_gss daemon                                            [ OK ]</font></div>


<div><font face="courier new, monospace">     * Starting Start this job to wait until rpcbind is started or fails to s[ OK ]</font></div><div><font face="courier new, monospace">     * Starting configure network device                                     [ OK ]</font></div>


<div><font face="courier new, monospace">     * Stopping Start this job to wait until rpcbind is started or fails to s[ OK ]</font></div><div><font face="courier new, monospace">     * Starting Bridge socket events into upstart                            [ OK ]</font></div>


<div><font face="courier new, monospace">     * Starting NSM status monitor                                           [ OK ]</font></div><div><font face="courier new, monospace">     * Stopping cold plug devices                                            [ OK ]</font></div>


<div><font face="courier new, monospace">     * Stopping log initial device creation                                  [ OK ]</font></div><div><font face="courier new, monospace">     * Starting load fallback graphics devices                               [ OK ]</font></div>


<div><font face="courier new, monospace">     * Starting configure network device security                            [ OK ]</font></div><div><font face="courier new, monospace">     * Starting load fallback graphics devices                               [fail]</font></div>


<div><font face="courier new, monospace">     * Starting configure virtual network devices                            [ OK ]</font></div><div><font face="courier new, monospace">     * Starting Send an event to indicate plymouth is up                     [ OK ]</font></div>


<div><font face="courier new, monospace">     * Stopping Send an event to indicate plymouth is up                     [ OK ]</font></div><div><font face="courier new, monospace">     * Starting Mount network filesystems                                    [ OK ]</font></div>


<div><font face="courier new, monospace">     * Stopping configure virtual network devices                            [ OK ]</font></div><div><font face="courier new, monospace">     * Stopping Mount network filesystems                                    [ OK ]</font></div>


<div><font face="courier new, monospace">     * Starting Mount network filesystems                                    [ OK ]</font></div><div><font face="courier new, monospace">     * Stopping Mount network filesystems                                    [ OK ]</font></div>


<div><font face="courier new, monospace">     * Starting configure network device                                     [ OK ]</font></div><div><font face="courier new, monospace">     * Starting set sysctls from /etc/sysctl.conf                            [ OK ]</font></div>


<div><font face="courier new, monospace">     * Stopping set sysctls from /etc/sysctl.conf                            [ OK ]</font></div><div><font face="courier new, monospace">    The disk drive for /var/www/shared/public/uploads is not ready yet or not present.</font></div>


<div><font face="courier new, monospace">    Continue to wait, or Press S to skip mounting or M for manual recovery</font></div><div><font face="courier new, monospace">     * Starting Waiting for state                                            [fail]</font></div>


<div><font face="courier new, monospace">     * Starting Block the mounting event for glusterfs filesystems until the [fail]k interfaces are running</font></div><div><font face="courier new, monospace">    mountall: Event failed</font></div>


<div><font face="courier new, monospace">    </font></div><div><font face="courier new, monospace">    </font></div><div><font face="courier new, monospace">    Mount failed. Please check the log file for more details.</font></div>


<div><font face="courier new, monospace">     * Starting GNU Screen Cleanup                                           [ OK ]</font></div><div><font face="courier new, monospace">     * Starting flush early job output to logs                               [ OK ]</font></div>


<div><font face="courier new, monospace">     * Starting base                                                         [ OK ]</font></div><div><font face="courier new, monospace">     * Starting save udev log and update rules                               [ OK ]</font></div>


<div><font face="courier new, monospace">     * Starting OpenSSH server                                               [ OK ]</font></div><div><font face="courier new, monospace">     * Stopping Failsafe Boot Delay                                          [ OK ]</font></div>


<div><font face="courier new, monospace">     * Starting System V initialisation compatibility                        [ OK ]</font></div><div><font face="courier new, monospace">     * Stopping save udev log and update rules                               [ OK ]</font></div>


<div><font face="courier new, monospace">     * Stopping Mount filesystems on boot                                    [ OK ]</font></div><div><font face="courier new, monospace">     * Stopping GNU Screen Cleanup                                           [ OK ]</font></div>


<div><font face="courier new, monospace">     * Stopping flush early job output to logs                               [ OK ]</font></div><div><font face="courier new, monospace">     * Starting system logging daemon                                        [ OK ]</font></div>


<div><font face="courier new, monospace">     * Stopping System V initialisation compatibility                        [ OK ]</font></div><div><font face="courier new, monospace">     * Starting System V runlevel compatibility                              [ OK ]</font></div>


<div><font face="courier new, monospace">     * Starting save kernel messages                                         [ OK ]</font></div><div><font face="courier new, monospace">     * Starting deferred execution scheduler                                 [ OK ]</font></div>


<div><font face="courier new, monospace">     * Starting CPU interrupts balancing daemon                              [ OK ]</font></div><div><font face="courier new, monospace">     * Starting regular background program processing daemon                 [ OK ]</font></div>


<div><font face="courier new, monospace">     * Starting automatic crash report generation                            [ OK ]</font></div><div><font face="courier new, monospace">     * Starting GlusterFS Management Daemon                                  [ OK ]</font></div>


<div><br></div><div>Any ideas what&#39;s going on and/or how to fix it?</div></div><span class="HOEnZb"><font color="#888888"><div><br></div><div><br></div>-- <br>J. Pablo Fernández &lt;<a href="mailto:pupeno@pupeno.com" target="_blank">pupeno@pupeno.com</a>&gt; (<a href="http://pupeno.com" target="_blank">http://pupeno.com</a>)
</font></span><div><br></div><div>PS: I did post this in serverfault some time ago, but I didn&#39;t receive any reply other than a custom script to mount things after GlusterFS started: <a href="http://serverfault.com/questions/604860/glusterfs-is-failing-to-mount-on-boot" target="_blank">http://serverfault.com/questions/604860/glusterfs-is-failing-to-mount-on-boot</a></div>


</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>J. Pablo Fernández &lt;<a href="mailto:pupeno@pupeno.com" target="_blank">pupeno@pupeno.com</a>&gt; (<a href="http://pupeno.com" target="_blank">http://pupeno.com</a>)
</div>