ONTAP Discussions

Tree or user quota type

netappmagic
4,927 Views

Quota type can be Tree or User. My question is, when should I use Tree type and when use User type? 

Why do we have have to have these two different type?

 

I guess, fundamentally, I don't understand how these two type of quotas work.

 

Thanks

9 REPLIES 9

hmoubara
4,899 Views

Hello,

 

Please find the link below for reference regarding the difference with each quota type:

 

https://docs.netapp.com/ontap-9/topic/com.netapp.doc.pow-fg-mgmt/GUID-07CDD7F3-5958-478F-AE58-62AE4B8699D7.html

 

 

netappmagic
4,878 Views

Yeah, I had already read the link before I post the question. Unfortunately, I still don't understand. 

In real cases, why do we need to have the tree type of quota if already have  the user type ? or vise versa?

hmoubara
4,872 Views

It is going to depend on how you want to set this up with quota type tree to affect whoever access that volume or per user if you want to limit to certain users with quota type user.

Here is a link for some example; not sure if you had that link or not:

 

https://docs.netapp.com/ontap-9/topic/com.netapp.doc.pow-fg-mgmt/GUID-8B800B77-3E82-409B-BEE9-B5998BFE7460.html

netappmagic
4,868 Views

I didn't have the link.  Although it is talking about quota on FlexGroup, I guess it would apply to Flex Volume as well. 

 

cluster1::> quota policy rule create -vserver vs0 -policy-name default -volume FG -type tree -target tree_4118314302 -qtree "" -disk-limit 48GB -soft-disk-limit 30GB

So, for this particular example,

- what this "tree type" command can do, but the other "user type" command cannot do?
- what is "tree_4118314302"? is this an unix user id?
- it is using tree type, but with -qtree "", does that mean this quota is not using qtree?

 

Thanks for your patience.
 

hmoubara
4,861 Views

Please find the answer to your questions below:

 

- what this "tree type" command can do, but the other "user type" command cannot do?
In user quota type, the user is target is the user but in qtree quota type; the target is a qtree specified by the path name to the qtree.

 

-what is "tree_4118314302"? is this an UNIX user id?
This parameter specifies the target to which the quota policy rule applies,For explicit tree quotas rules, this parameter should indicate the qtree name.
tree_4118314302 is the qtree name in the example.

 

-it is using tree type, but with -qtree "", does that mean this quota is not using qtree?
This parameter specifies the name of the qtree to which the quota rule applies. This parameter is not applicable for tree type rules. For user or group type rules at the volume level, this parameter should contain ""

It should not had have the -qtree "" as it is applicable when using tree quota type. i tested in a lab and when i am going through the command in my ssh session, the "quota policy rule create -vserver <> -volume <> -type tree -target <qtree name> -disk-limit <> " without the need of the -qtree parameter.

 

https://library.netapp.com/ecmdocs/ECMP1366832/html/volume/quota/policy/rule/create.html

netappmagic
4,855 Views

Your messages helped.

 

-  Can I then say that the quota with tree type is not for the case if I wanted to put a disk limit on users, and tree type is for the case if I waned to put a limit for an application? 

-  Can I use tree type to limit space for users?

- In following example, target is empty, which means essentially not limiting any users, just a quota and not being applied to any users, or is it a default quota for all other user not being fall into any other quota policy?

cluster1::> volume quota policy rule create -vserver vs0 -policy-name default -volume FG -type user -target "" -qtree "" -disk-limit 1T -soft-disk-limit 800G

Thank you!

parisi
4,847 Views

 

The use of each type of quota is dependent on what you are trying to accomplish with the quotas.

 

  • If a qtree is used as a homedir, then you can choose user or tree quotas based on your preference.
  •  
  • If a qtree is used for a project where multiple users are creating files at the same time, you may want to limit capacity/file counts based on the tree itself, rather than per-user, as you don't want to hinder the work the users are doing.
  •  
  • If you simply want to limit file counts in a single folder (for instance, you want to prevent exceeding maxdirsize) then you can limit file counts.

 

You could even combine using both - tree quotas to limit capacity + user quotas to simply track who is using what capacity.

netappmagic
4,841 Views

I am understanding better now. But to help me further:

 

The user quota can also limit the capacity for users, in addition to track the usage, right?

Can I use tree quota to limit the user's capacity as well. 

 

 

parisi
4,833 Views

Yes, all quotas can limit capacity.

 

If you set a tree quota to 1TB, then only 1TB can be written to the qtree.

If you also set a user quota to 100GB, then that user will only be able to write 100GB to that qtree, even if the tree quota is 1TB.

Public