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.

 

 

 

Advertisements

March 27, 2011 - Posted by | Uncategorized | , ,

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: