[SOLVED] lxc quota

cserem

Active Member
Jan 15, 2017
18
8
43
Hello!

I have recently moved a physical machine into a Proxmox LXC container. Apparently i haven't done my research properly beforehand, because i'm stuck without quota support on the ZFS subvol based LXC filesystem.

My questions, findings about this:
- On the GUI, the CT creation wizard, or the mount point creation wizard doesn't permit enabling of quotas if zfs type storage is selected. However, if you edit the mountpoint afterwards it lets you select quota, not that it does anything with quota inside the container. Is it by purpose, or is this an inconsistency in the GUI?

- I understand that quotas are only supported on blockdevice (such as lvm,raw) based container mounts.
ZFS could also give out a blockdevice as a ZVOL, why isn't this an option when creating CT mountpoints?

-What should I do to get quota support and enjoy the features of zfs?
Is there a recommended way I could mount an ext4 fs on a ZVOL inside an LXC,
Or I have to use QEMU if I want to keep ZFS as storage?

Thanks
 
Hi,

ZFS support fs quotas, but I guess you talking about user quotas what zfs does not support.
Also, LVM,raw,.... doesn't provide user quotas but ext4 what is installed on it.

What should I do to get quota support and enjoy the features of zfs?
There is no convenient way.
One way would be to use zfs as dir storage, but then you lose the snapshot capability of zfs.
 
Hello!

Thank you for your answer.

Yes, I was talking about user quotas.

My findings about this is, ZFS itself does support user quotas, though not compatible with existing "quota-utils":
For example zfs set userquota@myuser=1M rpool/ROOT/pve-1 is respected properly on the pve itself.

If I set quotas like that on a subvol which is used by an unprivileged container (using user ids only existing inside the container), they are also respected (but with some delay)

Besides it somewhat working this way, i would also have to figure out a way to set the quotas from inside the container.

So for me QEMU / zvol / ext4 will be the solution.
 
ZFS support fs quotas, but I guess you talking about user quotas what zfs does not support.
There is no convenient way.
One way would be to use zfs as dir storage ....

Could you briefly elaborate on using zfs as dir storage? Would that enable the 2nd-level user-group quotas in an LXC container?

Thanks.
 
Just use the directory storage plugin on a ZFS path.
2nd-level user-group quotas are related to OpenVZ.
I don't know what you mean?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!