On 01/31/2011 02:03 PM, Graeme Davis wrote: >> On Wed, 2010-11-03 at 13:05 -0500, Craig Carl wrote: >> >/ Samuele - >> />/ You don't need to create a client vol file with 3.1. Please >> delete >> />/ it from the clients and follow these instructions to mount - >> />/ >> http://www.gluster.com/community/documentation/index.php/Gluster_3.1:_Manually_Mounting_Volumes >> />/ >> / >> thanks, >> but this then lead to a question: how can i provide to a client a pool >> of server to use for ha without relying to hearbeat/rhcs or other >> cluster suite ? i assumed - correct me if i'm wrong - that by using the >> vol file client would be able to go to the next server if one was down . >> >> many thanks >> Samuele > > I've come across this same issue (I was using vol files thinking they > would tell the client how to mount without relying on one hostname). > > For example, I have a test distributed-replicated cluster of 10 > servers and 2 client set up. If I have the client set up to "mount -t > glusterfs server1:/volume /mnt/volume" and I take down server1, > everything still works. But if I try and mount server1 again (with > the above command) on another client it will complete the mount > command but then just sit there and hang the machine if you try and do > df or cd into /mnt/volume. > > Basically I want to have a reliable way of mounting from clients just > in case a machine tries to mount a Gluster volume when one of the > servers in the cluster is down. > > Ideas? > > Thanks, > > Graeme This is pretty basic but it works for me. I've written a script to do the mount for me. It will first test if a server is running before attempting a mount from that server. If the server isn't running, it will go on to the next server in the list. Here's the main part of the script: server_list="server1 server2" test_port=24007 # Check if something is already mounted at this mount point. mountpoint -q /mnt/volume if [ $? -ne 0 ]; then for server in $server_list; do # Test if the server is responding on the first Gluster TCP port netcat -z $server $test_port if [ $? -eq 0 ]; then mount -tglusterfs $server:/volume /mnt/volume break fi done fi Steve