在 ONTAP 9.4 及更早版本中,您只能出于报告目的将配额规则应用于 FlexGroup 卷,而不能用于执行配额限制。从 ONTAP 9.5 开始,您可以对应用于 FlexGroup 卷的配额规则实施限制。
步骤
- 为目标创建配额规则: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]
示例
以下示例显示了为用户目标类型创建的默认配额规则:
cluster1::> volume quota policy rule create -vserver vs0 -policy-name quota_policy_vs0_1 -volume fg1 -type user -target "" -qtree ""
以下示例显示了为名为 qtree1 的 qtree 创建的树配额规则:
cluster1::> volume quota policy rule create -policy-name default -vserver vs0 -volume fg1 -type tree -target "qtree1"
- 激活指定 FlexGroup 卷的配额:volume quota on -vserver svm_name -volume flexgroup_vol -foreground true
示例
cluster1::> volume quota on -vserver vs0 -volume fg1 -foreground true
- 监控配额初始化的状态:volume quota show -vserver svm_name
FlexGroup 卷可能会显示 mixed 状态,这表示所有成分卷尚不处于相同状态。
示例
cluster1::> volume quota show -vserver vs0
Scan
Vserver Volume State Status
--------- ------------ --------------- ------
vs0 fg1 initializing 95%
vs0 vol1 off -
2 entries were displayed.
- 查看具有活动配额的 FlexGroup 卷的配额报告:volume quota report -vserver svm_name -volume flexgroup_vol
不能使用 volume quota report 命令为 FlexGroup 卷指定路径。
示例
以下示例显示了 FlexGroup 卷 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.
以下示例显示了 FlexGroup 卷 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.
结果
对 FlexGroup 卷应用配额规则和限制。
使用量可能比配置的硬限制高 5%,然后 ONTAP 通过拒绝更多流量来执行配额。