ZFS Subvolumes quotas for cpanel

sahostking

Renowned Member
Currently all users have unlimited quotas:

This is the example disk
rpool/data/subvol-103-disk-1 50G 25G 26G 50% /rpool/data/subvol-103-disk-1

I found this mentioned:

https://forum.proxmox.com/threads/disk-quota-inside-lxc-container.24272/#post-132886

and then tried running:

zfs set userquota@1000=4G rpool/data/subvol-103-disk-1

But nothing works.

Kindly confirm if this will work as does not seem to

One client inform us of this today:

Resetting quota for userto 0 M
No filesystems with quota detected.
 
Last edited:
I would prefer an other method. I don't know that it is helping you but i would like do this, this way.

First yes, i create a normal LXC. Then for every user i create an extra dataset with quota:
Code:
zfs create -V 2G yourpool/user1
Then you can mount it over the configfile from your lxc:
Code:
mp0: /yourpool/user1,mp=/home/user1
https://pve.proxmox.com/wiki/LXC_Bind_Mounts
But newly there is an option to do this directly in the webinterface. See attachement.
 

Attachments

  • mountlxc.png
    mountlxc.png
    19.9 KB · Views: 29
One client inform us of this today:

Resetting quota for userto 0 M
No filesystems with quota detected.

that sounds like the tool in question (cpanel?) does not understand zfs quotas. does "zfs get all rpool/data/subvol-103-disk-1" show the quota? what happens when you fill the dataset up?
 
I can't test anymore sorry - I quickly had to change the box to LVM with hardware RAID and ext4 and everything works great even quotas.

Too many customers were complaining about quota issues and stating services are not autostarting. Made no sense but anyway had to quickly change back to LVM and now all works great in LXC. :)

I'll setup a test server when I'm done taking a day or 2 off away from PC.
 
note that quotas in ext4 and quotas in zfs are completely separate..
 
Hello

I am running the same issue. I have pve installed with ZFS. On the rootdisk i have quota enabled
root@pvez1:~# pct config 100
arch: amd64
cores: 2
hostname: host2.netto.local
memory: 4096
net0: name=eth0,bridge=vmbr0,gw=192.168.100.1,hwaddr=02:00:00:bf:a4:6c,ip=192.168.100.10/24,type=veth
ostype: debian
rootfs: local-zfs-pool:subvol-100-disk-1,quota=1,size=15G
swap: 2048

When checking the quota with zfs get all command, i found quota is not activated.

root@pvez1:~# zfs get all /rpool/data/subvol-100-disk-1

NAME PROPERTY VALUE SOURCE
rpool/data/subvol-100-disk-1 quota none default

Any help on how to enable the quota on the LXC container.

Thanks