Understanding ZFS quotas

Fab Sidoli

Contributor
Joined
May 15, 2019
Messages
114
Dear all,

I'm failing to understand ZFS quotas based on the reporting of a share on Windows and Linux.

I have used the following command to set quotas for a bunch of user datasets. An example follows.

# zfs set quota=45G pool/name/myuser

UI shows that the "Quota for this dataset and all children" field gets set to '45 GiB'

zfs list shows the following for this user

root@server[~]# zfs list | grep "NAME\|myuser"
NAME USED AVAIL REFER MOUNTPOINT
pool/name/myuser 42.8G 2.16G 20.6G /mnt/pool/name/myuser

# zfs get all pool/name/myuser | grep quota
pool/name/myuser quota 45G local
pool/name/myuser refquota none local

I assume that AVAIL+REFER=QUOTA. I'm not sure what REFER is here.

On Windows, a right-click properties on this folder shows the following, which looks sensible
Capacity = 45G
Used: 42.8G
Free: 2.15G

On Linux, however
#
df -h | grep myuser
Filesystem Size Used Avail Use% Mounted on
server:/mnt/pool/name/myuser 23G 21G 2.2G 91% /homes/myuser

Now, Avail is the same (more or less) as Free on Windows and in ZFS. Size and Used are not what I expected by do approximately add up to 45G.

I've checked with another user and the results are the same. Size+Used on Linux = Quota size on ZFS = Capacity on WIndows.

In short, what is Size and Used actually showing me on Linux?
 

Fab Sidoli

Contributor
Joined
May 15, 2019
Messages
114
OK. I think I've answered my own question. It seems that I should set refquota instead of quota.

If someone could verify the sanity of that for me that would be wonderful. :smile:


Edit: This seems to mess with the Windows view of things, which now thinks my quota is larger than 45G.
 
Top