[Gluster-devel] Remote volume listing

Niels de Vos ndevos at redhat.com
Mon Nov 19 15:47:10 UTC 2012


On 11/16/2012 09:21 PM, Pete Zaitcev wrote:
> Guys, I've got a vague qustion if I may:
>
> In Gluster UFO there's a piece of code like so:
>
> def _get_export_list():
>      if REMOTE_CLUSTER:
>          cmnd = 'ssh %s gluster volume info' % MOUNT_IP
>      else:
>          cmnd = 'gluster volume info'
>      export_list = []
>      if os.system(cmnd + '>>  /dev/null'):
>      ............
>
> So, Gluster server has to allow root ssh without password from clients.
> This strikes me as less than optimal, even though the clients in my
> case are Swift proxy nodes that have to be secure.
>
> Now the question. I seem to recall that Jeff Darcy implemented something
> like that for HekaFS, where an additional daemon is run at the server
> with access to bricks, and delivers the things like volfiles over HTTP.
> It would be ideal to get the list of volumes through it. In UFO we don't
> even need to run curl, just invoke one of standard libraries.

You can get the list with the 'gluster' command from the glusterfs-server package:

# gluster --remote-host=storage-01.example.com volume list

or if you prefer parsing XML:

# gluster --xml --remote-host=storage-01.example.com volume list

There is no need for the client system to be in the peer-list of the storage 
servers, so it is pretty straight forward.

Cheers,
Niels


> Is this something we have by default in GlusterFS these days? If yes,
> how to access it (what port/path)? I believe it was a part of glusterfsd.
>
> -- Pete
>




More information about the Gluster-devel mailing list