Volume and Qtrees Quotas in Clustered ONTAP: Tracking Quota

In the post we create a tracking quota and apply it to a volume.

Walkthrough

Create a Quota Policy {If not done already}

volume quota policy create -vserver PRICLU1V1 -policy-name quota_pol_1

Note: If you already have a quota policy you can skip this (or use the default.) A Vserver can have a maximum of 5 quota policies of which only one can be active at a time. Each quota policy can have a number of rules in.

Create Quota Policy Rule

vol quota policy rule create -vserver PRICLU1V1 -policy-name quota_pol_1 -volume v_PKD -type tree -target "" -soft-disk-limit 10g

Note: Coincidentally, 10g is the size of the volume v_PKD, so it will never trigger an event log alert!

Enable the Quota Policy on the Vserver {If not done already}

vserver modify -vserver PRICLU1V1 -quota-policy quota_pol_1

Turn On the Quota on the Volume

volume quota show -vserver PRICLU1V1
volume quota on -vserver PRICLU1V1 -volume v_PKD

Report on the Quota Policy

volume quota report -vserver PRICLU1V1

And an example output:

Vserver: PRICLU1V1

                                    ----Disk----  ----Files-----   Quota
Volume   Tree      Type    ID        Used  Limit    Used   Limit   Specifier
-------  --------  ------  -------  -----  -----  ------  ------   ---------
v_PKD              tree    *           0B      -       0       -   *
v_PKD    q_PKD_PDF
                   tree    1
                                  30.19MB      -      44       -   q_PKD_PDF
v_PKD    q_PKD_Other
                   tree    2
                                  20.43MB      -      47       -   q_PKD_Other

APPENDIX: Clustershell Commands

::volume qtree> ?
  create                      Create a new qtree
  delete                      Delete a qtree
  modify                      Modify qtree attributes
  oplocks                     Modify qtree oplock mode
  rename                      Rename an existing qtree
  security                    Modify qtree security style
  show                        Display a list of qtrees
  statistics                  Display qtree statistics
  statistics-reset            Reset qtree statistics in a volume

::volume quota> ?
  modify                      Modify quota state for volumes
  off                         Turn off quotas for volumes
  on                          Turn on quotas for volumes
  policy>                     Manage quota policies for a Vserver
  report                      Display the quota report for volumes
  resize                      Resize quotas for volumes
  show                        Display quota state for volumes

::volume quota policy> ?
  copy                        Copy a quota policy
  create                      Create a quota policy
  delete                      Delete a quota policy
  rename                      Rename a quota policy
  rule>                       Manage the rules for a quota policy
  show                        Display the quota policies

::volume quota policy rule> ?
  create                      Create a new quota rule
  delete                      Delete an existing quota rule
  modify                      Modify an existing quota rule
  show                        Display the quota rules

::volume quota policy rule> create -?
    -vserver {vserver name}            Vserver
   [-policy-name] {text (size 1..32)}  Policy Name
   [-volume] {volume name}             Volume Name
   [-type] {tree|user|group}           Type
   [-target] {text}                    Target
   [-qtree] {qtree name}               Qtree Name
  [[-user-mapping] {on|off}]           User Mapping
  [ -disk-limit {{size}|-} ]           Disk Limit
  [ -file-limit {{integer}|-} ]        Files Limit
  [ -threshold {{size}|-} ]            Threshold for Disk Limit
  [ -soft-disk-limit {{size}|-} ]      Soft Disk Limit
  [ -soft-file-limit {{integer}|-} ]   Soft Files Limit

Note: If you change quota limits, use “volume quota resize” to apply the new limits.

Comments