jovialdude

updated

14 years ago

J

jovialdude

1 Rookie

•

3 Posts

0

2071

February 27th, 2013 17:00

API for OneFS 6.5

Hi all,

I don't know if this has been asked before but I'm having no luck finding anything on the web or in the support site.

We have a PHP application which access a share on Isilon with quota on. Is there an API we can use to find out what the quota is? The only thing I found is the Rest API for version 7, which we have no intention of upgrading to at this point. Any help is appreciated.

Regards,

Ray

  • Peter_Sero

    6 Operator

    •

    1169 Posts

    980

    0

    Posted February 27th, 2013 20:00

    Ray, you can use SNMP:

    Enable and configure in the WebGUI: Cluster -> Cluster Settings -> SNMP

    For example, enable v2c, set read-only community = public

    From the same WebGUI page, download the ISILON-MIB.txt file

    to a place on your client machine

    where snmpwalk expects to find MIB files.

    Query (on the client):

    snmpwalk -v2c -m ISILON-MIB -c public  CLUSTER  'quotas'

    where CLUSTER = resolvable hostname or IP of your cluster

    Need to parse the SNMP output of course...

    (Added:)

    If you need only the directory quota (rather than user quota),

    make sure to set the "container" flag in the quota definition.

    Then, a regular "df" on the client will show the hard threshold

    and the current usage as Size and Used parameters (resp.) of

    the mounted volume.

    Peter

  • cincystorage

    2 Intern

    •

    467 Posts

    980

    1

    Posted February 27th, 2013 19:00

    I've not used to API at all,  but I don't belive it has that info.  You can use command line to fine out what you need pretty easily..

    isi quota list --path=/ifs/what/ever/path

  • jovialdude

    1 Rookie

    •

    3 Posts

    980

    0

    Posted February 27th, 2013 23:00

    Thanks for you both. I had a look at both options and it appears the SNMP option is the most attractive. We are currently exposing the share as NFS and we mounted the parent directory but the quotas are active on the subdirectory level.

    I also checked out the "container" flag Peter suggested and it too appears to be a good option (minimal change to code), but unfortunately the client sees the parent directory so not much good there.

    Thanks again for your replies.

    Ray

  • Peter_Sero

    6 Operator

    •

    1169 Posts

    980

    0

    Posted February 28th, 2013 00:00

    You're welcome.

    A funny observation aside: Wether the "container" quotas are visible for

    subdirectories (where set)  -- that depends on the client...

    With RedHat 5 (Linux kernel 2.6.18), df actually sees subdir containers

    (when explicily queried with df), but under RedHat 4 (kernel 2.6.9)

    it would not. So from the Isilon side, subdir containers are supported

    with NFS3, but one has to understand/trust the client behavior.

    Peter

  • Peter_Sero

    6 Operator

    •

    1169 Posts

    980

    0

    Posted February 28th, 2013 01:00

    Great!

    I still would be careful. Like checking each time wether the

    reported subdir Size is actually different from the toplevel dir Size,

    before evaluating the returned Used values.

    Peter

  • jovialdude

    1 Rookie

    •

    3 Posts

    980

    0

    Posted February 28th, 2013 01:00

    Hi Peter,

    Yes, I quickly tested the function.

    Subdirectory with "container=false":

    root@yelvmcls01:~# df

    Filesystem                               1K-blocks    Used Available Use% Mounted on

    uhub.isilon.local:/ifs/CSLData    524288000  472768 523815232   1% /lms

    uhub.isilon.local:/ifs/CSLData/S1 524288000  472576 523815424   1% /mnt

    Subdirectory with "container=true":

    root@yelvmcls01:~# df

    Filesystem                               1K-blocks    Used Available Use% Mounted on

    uhub.isilon.local:/ifs/CSLData    524288000  472768 523815232   1% /lms

    uhub.isilon.local:/ifs/CSLData/S1   2097152  0 2097152   0% /mnt

    So it does work as advertised at the subdirectory level.

    Ray