SOLVED Quota, Refquota, Time Machine Quota ??

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
I got an email saying
Refquota exceeded on dataset Ark/TM-Jim.
Used 80.01% (1.5 TB of 1.88 TB)

(A bit confusing because the email is in TB when the quotas are set in TiB or GiB.
1.5 TB = 1.36424 TiB or 1397 GiB;
1.88 TB = 1.71 TiB, which is indeed the quota set on the dataset )

First, I don't know what Refquota is. There is no mention of it in the Guide, and old threads I found it in are not clear.

Second, this is a Time Machine dataset. To avoid filling the dataset completely, I need to find a way for Time Machine to start deleting backups when it gets to some level below full, like say 80% = 1397 GiB. I found in the Sharing options one called Time Machine Quota. Aha! said I - I set it to 1397 GiB, removed the 'disk' from Time Machine and readded it. But Time Machine is still reporting "373 GB of 1.88 TB" available when it has already exceeded its TM quota.

What is Refquota and how is it set?
Why isn't the Time Machine Quota setting working?
How do I keep Time Machine from filling the whole dataset?
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Quotas apply to raw storage, including snapshots, child datasets, etc. Refquotas apply only to "referenced" data - think of it like a quota on the current state, which also ignores child datasets.
 

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
So refquota applies to just your data in that dataset, without snapshots or child datasets. Sounds like that won't help me with the Time Machine issue. But is there a way to set it?

And based on the email, it seems like FreeNAS thinks it was already set, at 80% of quota.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
But is there a way to set it?
Of course, same way as any property. If the GUI doesn't offer it, zfs set refquota=newquota poolname/dataset should do the trick.
 

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,211
I think/hope I have resolved this.
  1. On the FreeNAS settings for the Time Machine Share, I set the "Time Machine Quota" to 90% of the dataset quota.
  2. From the Mac, I used tmutil to list and manually thin enough selected backups to get the total size well below 80% of the dataset quota.
  3. On the Mac, I used hdiutil to compact the sparsebundle, then resize it to 90% of the dataset quota (I thought this was supposed to set the maximum size it could grow to, but it seems to have set it to that size.)
At first, Time Machine showed that it had the full size of the dataset for use, even after ejecting the TM share and logging out. Some days later however, I found it is now showing the desired total space, 90% of the dataset quota. I don't know if it is taking that from the Time Machine Quota on FreeNAS, or the size set on the sparsebundle with hdiutil, but either way, it seems to have gotten its head straight. We'll see for sure when the size creeps back up to that limit.

As an aside, I checked what the refquota is:
Code:
[jim@Tabernacle ~]$ zfs get refquota Ark/TM-Jim
NAME        PROPERTY  VALUE     SOURCE
Ark/TM-Jim  refquota  1.71T     local

That is the same as the quota on the dataset (assuming 'T' is short for 'TiB'). I never got near there, only hit 80% of it. So the email saying "Refquota exceeded" makes no sense.
 
Top