I have several samba shares, one of which is used for storing some backups.

I want to set a disk space quota on said share, as the ZFS volume the share resides on is huge and multi-purpose... I don't want the backups taking up more than 20Tb.

Can anyone point me in the right direction on how I can achieve this?

Thanks in advance!


To set the quota for a filesystem:

zfs set quota=20TB poolname/backup-filesystem

To query the current quota setting:

zfs get quota poolname/backup-filesystem

Note that quotas can only be set on ZFS filesystems (i.e. made with zfs create pool/fsname), not on subdirectories (made with mkdir).

subdirectories of a ZFS filesystem are included within that filesystem's quota usage. Child filesystems inherit their parent's quota (if any) unless overridden with their own zfs set quota=size pool/parent/child command (but this is an additional restriction - child filesystems, like snapshots, are included in the parent's total quota usage).

  • Thank you cas - not only did you give me the exact answer I needed, you steered me away from the next pitfall. big thanks! – John Apr 11 '16 at 13:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.