Difference between quota and reserved space

Status
Not open for further replies.

fakefox

Cadet
Joined
Feb 21, 2012
Messages
8
Just a quick question.. In practice, what's the difference between quota and reserved space in datasets? Seems the same to me.
 

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
Quota means "use no more than".

Reservation means "keep at least this much free". Almost like a quota on all other datasets.
 

fakefox

Cadet
Joined
Feb 21, 2012
Messages
8
"keep at least this much free"
Thank you so much! This really explained it all! :)

This means that if I i.e. have three datasets it makes no difference if I use quota or reserved space as long as I do it on all three of them.
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
I wouldn't say no difference. Using all reservations for example would make it harder to complete the initial setup. I'm presuming that if you have a pool of one TB, you can't create three datasets, each with reservations of 500 GB.

Personally, I'd set a reservation on a low proportion of datasets if they are used for tasks that might break if they run out of space (a log repository). I'd use quotas for a majority of datasets to keep those tasks in check (limiting users / restricting the size of a TimeMachine backup).

What's your goal? Do you want to restrict a task? Or guarantee a task?
 

fakefox

Cadet
Joined
Feb 21, 2012
Messages
8
I'm just trying to understand the theory behind all the choices I have. What I meant was that if you i.e. set a reservation of 400, 400 and 200GB of a 1TB pool none of the dataset would have the ability to expand over the reservation and it might as well be a quota. But I understand now that this is not what you would use reservation for.

Sounds like quota is what I need. I only use the NAS for storage so I just need one dataset for my shared stuff and one restricted dataset for my private stuff. So I'll just use quota to set the sizes for the two datasets.
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
If you're going to set a quota on both datasets, you're right it shouldn't matter whether you use quotas or reservations. Based on your description I'd be more tempted to set a quota on the private dataset and leave it at that. Setting a quota or reservation on each could also be achieved by setting a quota and reservation on only the private dataset. It'd be restricted in size, but also guaranteed to be able to access that amount of data.

It sounds like you've got the understanding you need though. I hope I was able to help.
 

fakefox

Cadet
Joined
Feb 21, 2012
Messages
8
The reason for setting a quota on both datasets was that I read that It's recommended to always keep about 20% of free space on pools. So by setting 600GB on the shared and 200GB on the private dataset it would assure that the last 200GB are never used.
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
The reason for setting a quota on both datasets was that I read that It's recommended to always keep about 20% of free space on pools. So by setting 600GB on the shared and 200GB on the private dataset it would assure that the last 200GB are never used.
Or you can directly set a 800GB quota on the parent pool.
 

fakefox

Cadet
Joined
Feb 21, 2012
Messages
8
Or you can directly set a 800GB quota on the parent pool.
You see, this was the first thing I tried. When setting a quota of 700GB on the parent pool, freenas, the datasets server and system still shows around 900GB available space (without quota).

(Haven't really figured out what's the deal with the sizes is yet. My four mirrored disks are 500.1GB but my pool is only around 900GB and not 1TB as I would expect)
 

Attachments

  • FreeNAS.JPG
    FreeNAS.JPG
    49.8 KB · Views: 578

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
Hmm, I never noticed that. There are actually two quotas you can set on a ZFS dataset (a pool has also all the properties of a dataset):
  1. quota: limits the space used by the dataset including all its descendants (nested datasets, snapshots, clones of those snapshots, ...)
  2. refquota: limits only the space used directly by the dataset (does not include descendants)
The Edit ZFS Options GUI form allows you to change both quotas for a dataset -- Quota for this dataset = refquota, Quota for this dataset and all children = quota. However, it only allows you to set refquota for "pool" datasets. Strange. There is no such limitation in the CLI.
 
Status
Not open for further replies.
Top