Software Development Kit (SDK) and API Discussions

List Quota Policy(Quota Management Pack) : WFA 4.0

Vikramjeet_Singh

Hi, I am using the latest quota management pack to work with qtrees.

 

Everything is working fine,  it is listing volumes, vserver etc but I am not able to list the quota policies available for that qtree.

 

Could anyone please help me with that.

 

Thanks

 

6 REPLIES 6

FelipeMafra
Hi,

I haven't worked with WFA 4. I stopped working at version 3.1.

I think it doesn't have a built in feature for that. So you can write your custom function.

Follwing is the query that I am using to list policies on a vserver. Can you please have look. Thanks.

 

SELECT
DISTINCT quota.quota_policy,
vs.name as Vservername,
cluster.primary_address
FROM
cm_storage_quota.quota_policy quota,
cm_storage.vserver vs,
cm_storage.cluster cluster
WHERE
vs.name = quota.vserver_name
AND quota.vserver_name = '${VserverName}'
AND cluster.primary_address = quota.cluster
AND (
cluster.name= '${ClusterName}'
or cluster.primary_address= '${ClusterName}'
)

This quota table does not exists in my old WFA 3.1.

Can you tell me what columns are available in this table?

You can check your cluster but I think you are not receiving any quota from qtree because it's applied to a target which happens to be a qtree.

Something like this:

 

mycluster::> quota policy rule show

Vserver: myVserver      Policy: default           Volume: myVolume

                                               Soft             Soft
                         User         Disk     Disk   Files    Files
Type   Target    Qtree   Mapping     Limit    Limit   Limit    Limit  Threshold
-----  --------  ------- -------  --------  -------  ------  -------  ---------
tree   ""        ""      -            10GB        -       -        -          -
tree   Qtree1    ""      -           1.5TB        -       -        -          -
tree   Qtree2    ""      -             5GB        -       -        -          -

By the way your query looks good. If you want you can use MySQL Workbench to query database. It's much easier than use WFA internal system.

It looks something like this:

 

Capture.PNG

 

CAGENASCLD02::> quota policy show -vserver cagevsd01


Vserver Policy Name Last Modified
-------------- -------------------- ----------------
cagevsd01 Def_Users_20GB 7/8/2016 23:32:19
cagevsd01 default 2/16/2017 14:59:53
2 entries were displayed.

 

Since I know quotas on cluster mode are applied to qtrees by using rules.  Policies by them self are only applied to volumes. Thus I think you should query rules not only policies.

Vikramjeet_Singh

anyone can help?

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public