[GEDI] Getting information on gluster volume quotas

Aleksandar Čekrlić pathlidge.ann at gmail.com
Fri Oct 26 09:38:47 UTC 2018


Hi all,

I have a question regarding the gluster api for retrieving quotas for a
volume..

One of my gluster setups is v3.7.9 and the other is 3.10.11. I need
information about disk quotas set and space used for a certain volume for
some monitoring and reports I am working on. Basically I would run *sudo
gluster volume quota glusterfs_main list* and pick out the path, hard limit
and used space.

My first version was written in perl and it works, but it turns out that in
the subsystem where this is supposed to work, I am running as a regular
user and have no root access, not a sudoer etc..
I should be able to rewrite it in C++ and use setuid() for the single CLI
call, but then I have to parse textual data from C++ which is less than
ideal.

Is there a different method of retrieving this information? I'm currently
looking into the libgfapi in the glustersfs git repo
<https://github.com/gluster/glusterfs/tree/master/api/src>, but since I
have time constraints I figured I also drop an email in case anyone can
point me in the right direction..

Thanks in advance!

Best regards,
Aleksandar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gluster.org/pipermail/integration/attachments/20181026/68489d0d/attachment.html>


More information about the integration mailing list