Refquota is not working

Status
Not open for further replies.

Inacio Alves

Dabbler
Joined
Mar 5, 2015
Messages
14
First, sorry my poor english.

I create a zpool named ifce and create two DataSet ifce/inacio and ifce/inacio/vbox.
So, I set refquota=2G to ifce/inacio and refquota=5G to ifce/inacio/vbox.
After that, I try some dd to write files on disk in both DataSet. I was capable to exceed my quotas.

The same experiment in FreeBSD. So, if I try write on ifce/inacio, this has impact on both ifce/inacio and ifce/inacio/vbox. But if I try write on ifce/inacio/vbox just has impact on this DataSet. Futhermore, the refquota allow me to write at most 5GB in ifce/inacio/vbox.
 

Inacio Alves

Dabbler
Joined
Mar 5, 2015
Messages
14
No!!

It doesn't. I see that refquota on terminal translate to "quota to this dataset" on GUI, and quota on terminal translate to "Quota for this dataset and all children:"
erro-refquota.jpeg

As we can see, there are three files that have together 250MB but the quota/refquota is set to 200M
 
D

dlavigne

Guest
Please create a bug report at bugs.freenas.org and post the issue number here.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
Did you create those files with dd and if=/dev/zero? Betting money the answer is "yes".

They're compressing to like .00001% of the actual 100MB you think they are using. Since the quota is for 200MB and you are using only 153KB (since the test files compress so well) you have 199MB free. So the info you are showing in the screenshot is reflecting reality.

When you allocate 200MB for a quota, that is 200MB after compression. If compression allows you to store 1TB of super highly compressible data in a dataset with a quota of 200MB, fantastic. But until you've written the actual quota to the dataset, after compression, then everything is "as expected".

You were probably expecting the quota to be "before compression", but that's not how ZFS rolls. ;)

The bug ticket will likely be closed to exactly what I said above.
 

Inacio Alves

Dabbler
Joined
Mar 5, 2015
Messages
14
Did you create those files with dd and if=/dev/zero? Betting money the answer is "yes".
Yes!!

They're compressing to like .00001% of the actual 100MB you think they are using. Since the quota is for 200MB and you are using only 153KB (since the test files compress so well) you have 199MB free. So the info you are showing in the screenshot is reflecting reality.

When you allocate 200MB for a quota, that is 200MB after compression. If compression allows you to store 1TB of super highly compressible data in a dataset with a quota of 200MB, fantastic. But until you've written the actual quota to the dataset, after compression, then everything is "as expected".

You were probably expecting the quota to be "before compression", but that's not how ZFS rolls. ;)

The bug ticket will likely be closed to exactly what I said above.
Thanks for the answer.

I will try if=/dev/random.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
Once you try /dev/random and see I'm right please update that bug ticket and close it. ;)
 
Status
Not open for further replies.
Top