如何使用配额报告来查看已生效的配额
由于配额的交互方法很多,所以多个配额同时生效,而不仅仅是显式创建的才生效。要查看哪些配额已生效,可查看配额报告。
以下示例显示为 FlexVol 卷 vol1 和该卷中包含的 Qtree q1 应用的不同配额类型的配额报告:
没有为 Qtree 指定用户配额的示例
vol1 的默认树配额限制为 400 MB
vol1 的默认用户配额限制为 100 MB
用户 jsmith 在 vol1 上的显式用户配额限制为 200 MB
#Quota target type disk files thold sdisk sfile #----------- ---- --- ----- ---- ----- ----- * tree@/vol/vol1 400M * user@/vol/vol1 100M jsmith user@/vol/vol1 200M
cluster1::> volume quota report
Vserver: vs1
----Disk---- ----Files----- Quota
Volume Tree Type ID Used Limit Used Limit Specifier
------- -------- ------ ------- ----- ----- ------ ------ ---------
vol1 - tree * 0B 400MB 0 - *
vol1 - user * 0B 100MB 0 - *
vol1 - user corp/jsmith
150B 200MB 7 - corp/jsmith
vol1 q1 tree 1 0B 400MB 6 - q1
vol1 q1 user * 0B 100MB 0 -
vol1 q1 user corp/jsmith 0B 100MB 5 -
vol1 - user root 0B 0MB 1 -
vol1 q1 user root 0B 0MB 8 -
配额报告的前三行显示管理员指定的三个配额。由于其中两个配额是默认配额,所以 ONTAP 会自动创建派生配额。
第四行显示从 vol1 中每个 Qtree(本示例中只有 q1)的默认树配额派生的树配额。
第五行显示因为存在卷的默认用户配额和 Qtree 配额而为 Qtree 创建的默认用户配额。
第六行显式在 Qtree 中为 jsmith 创建的派生用户配额,因为 Qtree 有默认用户配额(第 5 行),并且用户 jsmith 拥有该 Qtree 中的文件。请注意,在 Qtree q1 中为用户 jsmith 应用的限制不取决于显式用户配额限制(即 200 MB)。这是因为显式用户配额限制是卷的,所以不影响 Qtree 的限制。相反,Qtree 的派生用户配额限制取决于 Qtree 的默认用户配额(即 100 MB)。
最后两行显示从卷和 Qtree 的默认用户配额派生的更多用户配额。在卷和 Qtree 中都为根用户创建了派生用户配额,因为根用户同时拥有卷和 Qtree 中的文件。由于根用户在配额方面享有特殊待遇,所以其派生配额仅是跟踪配额。
为 Qtree 指定了用户配额的示例
此示例类似上一个示例,除了管理员已在 Qtree 中添加了两个配额。
vol1 的默认树配额限制为 400 MB
vol1 的默认用户配额限制为 100 MB
用户 jsmith 在 vol1 上的显式用户配额限制为 200 MB
Qtree q1 的默认用户配额限制为 50 MB
用户 jsmith 在 Qtree q1 上的显式用户配额限制为 75 MB
#Quota target type disk files thold sdisk sfile #----------- ---- --- ----- ---- ----- ----- * tree@/vol/vol1 400M * user@/vol/vol1 100M jsmith user@/vol/vol1 200M * user@/vol/vol1/q1 50M jsmith user@/vol/vol1/q1 75M
cluster1::> volume quota report
Vserver: vs1
----Disk---- ----Files----- Quota
Volume Tree Type ID Used Limit Used Limit Specifier
------- -------- ------ ------- ----- ----- ------ ------ ---------
vol1 - tree * 0B 400MB 0 - *
vol1 - user * 0B 100MB 0 - *
vol1 - user corp/jsmith
2000B 200MB 7 - corp/jsmith
vol1 q1 user * 0B 50MB 0 - *
vol1 q1 user corp/jsmith 0B 75MB 5 - corp/jsmith
vol1 q1 tree 1 0B 400MB 6 - q1
vol1 - user root 0B 0MB 2 -
vol1 q1 user root 0B 0MB 1 -
配额报告的前五行显示管理员创建的五个配额。由于其中部分配额是默认配额,所以 ONTAP 会自动创建派生配额。
第六行显示从 vol1 中每个 Qtree(本示例中只有 q1)的默认树配额派生的树配额。
最后两行显示从卷和 Qtree 的默认用户配额派生的用户配额。在卷和 Qtree 中都为根用户创建了派生用户配额,因为根用户同时拥有卷和 Qtree 中的文件。由于根用户在配额方面享有特殊待遇,所以其派生配额仅是跟踪配额。
即使用户 jsmith 同时在卷和 Qtree 中拥有文件,也没有为其创建派生用户配额,因为该用户已经在两个级别拥有了显式配额。
没有为其他用户创建派生用户配额,因为没有其他用户拥有卷或 Qtree 中的文件。
卷的默认用户配额没有在 Qtree 中创建默认用户配额,因为 Qtree 已经有了默认用户配额。