Vijay Bellur

Life, Technology and a little more…

Finding Gluster volumes from a client machine

One of the questions that I come across in IRC and other places often is how to obtain a list of gluster volumes that can be mounted from a client machine. NFS provides showmount which helps in figuring out the list of exports from a server amongst other things. GlusterFS currently does not have an equivalent of showmount and this is one of the nifty utilities that we intend to develop in the near term.

Right now, there is a way of figuring out the list of volumes on a client machine. Gluster 3.1 exports volumes through NFS by default. Owing to this, showmount itself can be leveraged to figure out the volumes that are exported by Gluster servers. The output of  ‘showmount -e <server>‘ will be the list of volumes that can be mounted from the client. For e.g.

# showmount -e deepthought
Export list for deepthought:
/dr    *
/music *

If you just need a list of volumes, you can clear the extra output too by making use of your favorite filters. Something like:

#showmount -e  <server> | grep /  | tr -d ‘/’ | cut -d ‘ ‘ -f1

would yield you the list.

Once you have the list on your client, you can mount it through NFS and/or GlusterFS protocols, based on your choice of access protocol.

 

 

 

March 27, 2011 Posted by | Uncategorized | , , | Leave a comment