Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

Understanding Quota Terminology

troudee

Member
Joined
Mar 26, 2020
Messages
59
I know, this question has been posted already, but the answer confuses me even more than I was before.

In the manual, there are two types of dataset quotas given:
  • Quota for this dataset
  • Quota for this dataset and all children
Does the "and all children" mean...
  • ...the quota is applied to the dataset, as well as to all children (value inherited).
    When I have a dataset (mySet) with two children (childOne, childTwo) and set this value of the parent dataset to 10 GB, I can store 10 GB in childOne and 10 GB in childTwo, because both inherited the quota of 10 GB from their parent.
  • ...the quota is applied to the dataset and all its children altogether.
    When I have a dataset (mySet) with two children (childOne, childTwo) and set this value of the parent dataset to 10 GB, I can store x GB in childOne and 10-x GB in childTwo (x <= 10), because all children of mySet together with mySet itself are not allowed to get bigger than 10 GB.
At least I can interpret that and all children in both ways!
 

troudee

Member
Joined
Mar 26, 2020
Messages
59
In this posting, @Nick2253 says:
Your question is about the difference between setting a quota and a refquota.
This is exactly my case as well, however, I cannot see which one is which one.

My guess:

  • ...the quota is applied to the dataset, as well as to all children (value inherited).
    When I have a dataset (mySet) with two children (childOne, childTwo) and set this value of the parent dataset to 10 GB, I can store 10 GB in childOne and 10 GB in childTwo, because both inherited the quota of 10 GB from their parent.
This (above) is a refquota.

This (below) is a quota:

  • ...the quota is applied to the dataset and all its children altogether.
    When I have a dataset (mySet) with two children (childOne, childTwo) and set this value of the parent dataset to 10 GB, I can store x GB in childOne and 10-x GB in childTwo (x <= 10), because all children of mySet together with mySet itself are not allowed to get bigger than 10 GB.
If that is correct... ...then, in the next step, which one of the two is meant with "and all children" in the FreeNAS GUI? o_O
 

Nick2253

Neophyte Sage
Joined
Apr 21, 2014
Messages
1,460
Perhaps a better way to understand is this:

quota is a way to limit the total amount of disk space that a dataset takes up.

refquota is a way to limit the amount of usable data stored in a dataset.

Imagine I have a dataset, with no decendents (snapshots, subdatasets, etc) that holds 10GB of data. Both quota and refquota would see 10GB of data. Now imagine that I have a snapshot on this dataset that's about 5GB. quota would see 15GB in use, while refquota would only see 10GB.

Usually, if your goal is to prevent a dataset from using too much of your total pool space, you want to use a refquota. For example, if you're a school administrator, and you're trying to limit the home space of all your students, you might set up a home dataset, and within, a dataset for each student. You'd set the "home" dataset have a quota that limits the total amount of disk space the entire home dataset (children and snapshots included) takes up. But for each student, you'd want to limit them to 5GB of usable space with a refquota. This way, students are "penalized" by your snapshot schedule, but you still have an effective limit on the total amount of actual disk space the entire home dataset takes up.
 

troudee

Member
Joined
Mar 26, 2020
Messages
59
Perhaps a better way to understand is this:

quota is a way to limit the total amount of disk space that a dataset takes up.

refquota is a way to limit the amount of usable data stored in a dataset.

Imagine I have a dataset, with no decendents (snapshots, subdatasets, etc) that holds 10GB of data. Both quota and refquota would see 10GB of data. Now imagine that I have a snapshot on this dataset that's about 5GB. quota would see 15GB in use, while refquota would only see 10GB.

Usually, if your goal is to prevent a dataset from using too much of your total pool space, you want to use a refquota. For example, if you're a school administrator, and you're trying to limit the home space of all your students, you might set up a home dataset, and within, a dataset for each student. You'd set the "home" dataset have a quota that limits the total amount of disk space the entire home dataset (children and snapshots included) takes up. But for each student, you'd want to limit them to 5GB of usable space with a refquota. This way, students are "penalized" by your snapshot schedule, but you still have an effective limit on the total amount of actual disk space the entire home dataset takes up.
Thank you very much for that explanation -- but which one is meant by the two GUI options I mentioned? I can interpret the "and all children" both as inheritance (refquote) as well as all-together-ance (quota).

When I want to restrict a dataset, including all of its children, I want to set a quota if I get you right. Which of the two options defines a quota and which a refquota?
 

troudee

Member
Joined
Mar 26, 2020
Messages
59
which one is meant by the two GUI options I mentioned? I can interpret the "and all children" both as inheritance (refquote) as well as all-together-ance (quota).
Does really nobody know or care, which one of the two GUI options means a refquota and which one a quota? o_O
 

troudee

Member
Joined
Mar 26, 2020
Messages
59
I just tried it: When I input a value into "Quota for this dataset and all children", zfs get refquota, quota ... gives me that value as quota.

So I think, "Quota for this dataset and all children" = QUOTA, "Quota for this dataset" = REFQUOTA.
 
Top