I want to enable quota inside LXD container so as to limit each user to 10GB storage. I’m using ZFS storage backend. However I got the following error:
root@test:~# quotacheck -avug
quotacheck: Cannot find filesystem to check or filesystem not mounted with quota option.
I can confirm the ZFS backend supports user/group quotas because I have another container on the same host with the following fstab and the quotacheck works as shown below.
That second container isn’t showing quotas on ZFS but on ext4 though, it shows that /home2 has quotas applied to it and that this comes from a ZFS volume (not a dataset) which is formatted as ext4.
Now I have a now question. Is the 1st entry “LABEL=cloudimg-rootfs / ext4 defaults 0 0” actually ignored? It was created by LXD by default when the container was created. The root is actually a bind-mount from the LXD zpool and the root is “in fact NOT” ext4 as what is shown in the fstab.