A Little Help with Quota and Refquota

MidasMagoo

Cadet
Joined
May 24, 2019
Messages
4
Say I serve up three Windows SMB shares to my team, let's call them child1, child2 and child3. They exist as child datasets to parent, i.e.:

vol1/parent/child1
vol1/parent/child2
vol1/parent/child3

I want the three datasets to share a 20TB pool, not including snapshots. Snapshots are taken at the child level--no parent level snapshots. This is because the different children have different retention rules on the snapshots. I want to use refquota on the children because I need the team to be able to recover space on their own (by identifying files to archive to a different server and removing them from the primary server). I'll manage the total space and snapshots outside of the 20TB presented to them. Here's the problem from my experimentation so far:

1) If I quota parent and refquota each child, then the child snapshots still take up space under the parent quota, so the team doesn't really recover usable space.

2) If I refquota parent and refquota each child, then I can't figure out how to get the three children to share 20TB. For that matter, I suppose I wouldn't need to do anything with parent, just refquota each child. Same problem, though. The children aren't sharing the 20TB. I'd have to decide how to divide the 20TB (which I don't want to do).

3) If I refquota the parent and put no quota/refquota on the children, then the children have access to the whole of the pool. Refquota on the parent seems to not only ignore snapshots, but ignore the child datasets.

I had thought of going with option 1 and putting the quota on the parent as 25TB or 30TB, whatever I thought I might need for snapshots. I still can't figure out how to share the 20TB on the three children, though. If each child reports space available until the parent quota is reached, I end up having the same problem of the team being unable to free up space on their own. If it's not obvious, archiving happens only when sufficient primary space is gone. Nature abhors a vacuum.

Any thoughts on how to achieve what I'm looking for?
 

jro

iXsystems
iXsystems
Joined
Jul 16, 2018
Messages
80
I don't believe OpenZFS has a way to quota all children EXCEPT snaps, which I believe is what you're looking for. I think the best option would be to set a 20TB quota on the parent and leave it at that.

You could potentially set up replication to copy the snapshots out from under each child to some other dataset and configure the periodic snapshot task to prune them from the children shortly after that, but then you'd have to manually manage the snaps in their new home.

You might be able to quota things out on the SMB side, but I don't know much about it. Is there a single share running on vol1/parent, or do you have 3 shares, one on each child?
 
Joined
Jul 3, 2015
Messages
926
Yeah, I think you're over thinking it buddy. Set a 20TB quota on the parent and be done with it. Snapshots consume very little space and with scheduled retention expire automatically returning space to your users as they expire.

If we were talking about 500TB and snapshot retention of a year or more then perhaps it would be worth thinking a bit more about.
 

MidasMagoo

Cadet
Joined
May 24, 2019
Messages
4
Thanks to both of you for your responses. I've been away for a bit and have just gotten back into this project.

I don't believe OpenZFS has a way to quota all children EXCEPT snaps, which I believe is what you're looking for. I think the best option would be to set a 20TB quota on the parent and leave it at that.

You could potentially set up replication to copy the snapshots out from under each child to some other dataset and configure the periodic snapshot task to prune them from the children shortly after that, but then you'd have to manually manage the snaps in their new home.

You might be able to quota things out on the SMB side, but I don't know much about it. Is there a single share running on vol1/parent, or do you have 3 shares, one on each child?
The only solution I can find to quota except for snaps is to refquota---and that doesn't work on multiple children sharing. I share each child separately, each appearing as a mapped drive on the Windows side.

Yeah, I think you're over thinking it buddy. Set a 20TB quota on the parent and be done with it. Snapshots consume very little space and with scheduled retention expire automatically returning space to your users as they expire.

If we were talking about 500TB and snapshot retention of a year or more then perhaps it would be worth thinking a bit more about.
If I want the 3 children to share the same 20TB, I probably will need to do just that (set a quota at parent). Unfortunately, when we do archive data it is usually about 200GB to 500GB at a time in order to make room for an equivalent amount of new data. At that point, the latest snapshot will retain the archived data and new space is not freed up.

I'll give some more thought to either training new habits for the users or creating three separate smaller refquotas, one per child, that total 20TB. I can then tweak the allocation over time as needed.
 
Joined
Jul 3, 2015
Messages
926
Unfortunately, when we do archive data it is usually about 200GB to 500GB at a time in order to make room for an equivalent amount of new data. At that point, the latest snapshot will retain the archived data and new space is not freed up.
Then I would say you need to either set a larger quota to begin with to accommodate this or reduce the retention period of your snapshots.
 
Top