Skip to main content

Using quotas for FlexGroup volumes

Starting with ONTAP 9.5, you can enforce limits on quota rules that are applied to FlexGroup volumes.

About this task

  • Starting with ONTAP 9.5, you can specify hard, soft, and threshold limit quotas for FlexGroup volumes.

    You can specify these limits to constrain the amount of space, the number of files that a specific user, group, or qtree can create, or both. Quota limits generate warning messages in the following scenarios:

    • When usage exceeds a configured soft limit, ONTAP issues a warning message, but further traffic is still allowed.

      If usage later drops below the configured soft limit again, an all-clear message is issued.

    • When usage exceeds a configured threshold limit, ONTAP issues a second warning message.

      No all-clear administrative message is issued when usage later drops below a configured threshold limit.

    • If usage reaches a configured hard limit, ONTAP prevents further resource consumption by rejecting traffic.

  • In ONTAP 9.5, quota rules cannot be created or activated on the destination FlexGroup volume of a SnapMirror relationship.

  1. Create quota rules for targets : volume quota policy rule create -vserver vs0 -policy-name quota_policy_of_the_rule -volume flexgroup_vol -type {tree|user|group} -target target_for_rule -qtree qtree_name [-disk-limit hard_disk_limit_size] [-file-limit hard_limit_number_of_files] [-threshold threshold_disk_limit_size] [-soft-disk-limit soft_disk_limit_size] [-soft-file-limit soft_limit_number_of_files]
    • In ONTAP 9.5 and later, the quota target type can be user , group , or tree for FlexGroup volumes.

    • A path is not supported as the target when creating quota rules for FlexGroup volumes.

    • Starting with ONTAP 9.5, you can specify hard disk limit, hard file limit, soft disk limit, soft file limit, and threshold limit quotas for FlexGroup volumes.

    Example

    The following example shows a default quota rule being created for the user target type:

    cluster1::> volume quota policy rule create -vserver vs0 -
    policy-name quota_policy_vs0_1 -volume fg1 -type user -target "" -qtree ""

    The following example shows a tree quota rule being created for the qtree named qtree1:

    cluster1::> volume quota policy rule create -policy-name default 
    -vserver vs0 -volume fg1 -type tree -target "qtree1"
  2. Activate the quotas for the specified FlexGroup volume: volume quota on -vserver svm_name -volume flexgroup_vol -foreground true

    Example

    cluster1::> volume quota on -vserver vs0 -volume fg1 -foreground true
  3. Monitor the state of quota initialization: volume quota show -vserver svm_name

    FlexGroup volumes might show the mixed state, which indicates that all of the constituent volumes are not in the same state yet.

    Example

    cluster1::> volume quota show -vserver vs0
    Scan
    Vserver Volume State Status
    --------- ------------ --------------- ------
    vs0 fg1 initializing 95%
    vs0 vol1 off -
    2 entries were displayed.
  4. View the quota report for the FlexGroup volume with active quotas: volume quota report -vserver svm_name -volume flexgroup_vol

    You cannot specify a path with the volume quota report command for FlexGroup volumes.

    Example

    The following example shows the user quota for the FlexGroup volume fg1:

    cluster1::> volume quota report -vserver vs0 -volume fg1
    Vserver: vs0
    ----Disk---- ----Files----- Quota
    Volume Tree Type ID Used Limit Used Limit Specifier
    ------- -------- ------ ------- ----- ----- ------ ------ ---------
    fg1 user * 0B - 0 - *
    fg1 user root 1GB - 1 - *
    2 entries were displayed.

    The following example shows the tree quota for the FlexGroup volume fg1:

    cluster1::> volume quota report -vserver vs0 -volume fg1
    Vserver: vs0

    ----Disk---- ----Files----- Quota
    Volume Tree Type ID Used Limit Used Limit Specifier
    ------- -------- ------ ------- ----- ----- ------ ------ ---------
    fg1 qtree1 tree 1 68KB - 18 - qtree1
    fg1 tree * 0B - 0 - *
    2 entries were displayed.

Result

The quota rules and limits are applied on the FlexGroups volume.

The usage might reach up to 5 percent higher than a configured hard limit before ONTAP enforces the quota by rejecting further traffic.