Solaris · ZFS Quota & Reservation

Solaris · Lesson 19

ZFS Quota & Reservation

Quota restricts the maximum space a dataset can use. Reservation guarantees a minimum space that is always set aside. Both are powerful ZFS properties that help control disk usage in shared environments.

Understanding Quota and Reservation in ZFS

Both quota and reservation are filesystem-level properties used to control space allocation in ZFS datasets.

Quota

Quota sets the maximum limit a dataset can consume. It prevents a dataset from growing beyond the assigned size.

Reservation

Reservation guarantees space even if the pool becomes full. Ensures the dataset always has available capacity.

Difference Between Quota & Reservation

Key Differences

  • Quota caps usage — dataset cannot exceed quota.
  • Reservation guarantees — ensures dataset always has reserved space.
  • Quota affects df -h available space.
  • Reservation reduces pool's free space immediately even if unused.
  • Both properties can coexist (e.g., reservation=1G, quota=5G).

ZFS Quota & Reservation Commands

1. Check default quota/reservation

By default both values are 'none'.

terminal — zfs quota/reservation
solaris-lab
[root@solaris ~]# zfs get quota,reservation rpool/projectA
NAME PROPERTY VALUE SOURCE
rpool/projectA quota none default
rpool/projectA reservation none default

2. Set dataset quota

Quota limits how much maximum space the dataset can consume.

terminal — zfs quota/reservation
solaris-lab
[root@solaris ~]# zfs set quota=5G rpool/projectA
 
[root@solaris ~]# zfs get quota rpool/projectA
NAME PROPERTY VALUE SOURCE
projectA quota 5G local

3. Set dataset reservation

Reservation guarantees space for the dataset, even if pool is full.

terminal — zfs quota/reservation
solaris-lab
[root@solaris ~]# zfs set reservation=2G rpool/projectA
 
[root@solaris ~]# zfs get reservation rpool/projectA
NAME PROPERTY VALUE SOURCE
projectA reservation 2G local

4. Observe both quota and reservation

Dataset has guaranteed 2G minimum and max limit of 5G allowed.

terminal — zfs quota/reservation
solaris-lab
[root@solaris ~]# zfs get quota,reservation rpool/projectA
NAME PROPERTY VALUE SOURCE
projectA quota 5G local
projectA reservation 2G local

5. Remove quota (set to none)

Setting to none removes the limit.

terminal — zfs quota/reservation
solaris-lab
[root@solaris ~]# zfs set quota=none rpool/projectA

6. Remove reservation

Dataset no longer guarantees reserved space.

terminal — zfs quota/reservation
solaris-lab
[root@solaris ~]# zfs set reservation=none rpool/projectA

7. Verify mount space using df -h

df -h reflects quota effect on visible space.

terminal — zfs quota/reservation
solaris-lab
[root@solaris ~]# df -h /apps/projectA
Filesystem Size Used Available Mounted on
rpool/projectA 5G 32K 5G /apps/projectA

Quick Cheatsheet

Common Commands

  • zfs set quota=5G pool/fs
  • zfs set reservation=1G pool/fs
  • zfs get quota,reservation pool/fs
  • df -h /mountpoint

Remove Limits

  • zfs set quota=none pool/fs
  • zfs set reservation=none pool/fs

Important Notes

  • High reservation values can make the pool appear full even when datasets are empty.
  • Quota on root datasets may cause boot issues — apply carefully.
  • Removing reservation does not reclaim space until dataset usage is checked.

Next: ZFS compression, deduplication & performance tuning.