0

I have configured glusterfs between two ubuntu servers and mounting the gluster volume under /var/www directory. Since I am using only two servers, I had to install glusterfs-client in the same machine itself(http://gopukrish.wordpress.com/high-availability-load-balanced-wordpress-site/). My primary objective was to get the two servers replicated. Currently I am mounting the volume as below : mount -t glusterfs server1:/datavol /var/www When I add the same entry in /etc/fstab, server wont come online since it cant detect such a volume at bootup. Otherwise I should add the fstab entry with the server2. But in worst case(both servers down), no server will come online after the restart as both the servers are using one another server's volume.

Is there anyway to automatically mount the volume automatically only after the server came up online ?

0

The mount option "_netdev" in /etc/fstab combined with enabling the netfs service will delay mounting the filesystem until the network stack is online.

From the man page:

_netfs

          The  filesystem resides on a device that requires network access
          (used to prevent the  system  from  attempting  to  mount  these
          filesystems until the network has been enabled on the system).

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.