How do I set second level quotas for VM

Cezar

New Member
Jan 18, 2019
10
0
1
39
Hello!
I have a VM running centos & cPanel and it would seem that quotas are not enabled.
My disk is mounted as a zfs raid1 inside the VM. cPanel support told me to enable second level quota support in PVE. Can you please guide me on how to do this? There is no such option in the web interface.
Thank you!
 
Hi,

If you say VM do you mean KVM or LXC?
KVM has no second level quota because it uses blk devices like a normal server.
LXC on ZFS does not support user quotas over quotatool, so I guess this will not work for cPanal.
 
I just clicked on Create VM and created a centos vm. I guess none of those options work? :(
 
Hi

Dont think it would work. Like wolfgang said ZFS does not support userquotas and you said and quote:
"My disk is mounted as a zfs raid1"

which is ZFS. For cPanel like we do it I recommend using KVM or LXC but the main thing is directly on local or shared storage (Not ZFS), LVM works fine too.
 
Ok, thank you!
How about performance? Do you feel one being better than the other in raid 1? Which one?
 
We keep things standard so that if anything breaks its easy for us to just setup new box and restore VM and because IPs are on same VLAN VPS just goes online.

Secondly with performance in mind really depends on you if you using SSDs you wont notice much difference. SATA disks you will.

But you can always mix them up by putting OS and MySQL disks on SSDs and /home directory on SATA disks as a seperate disk if you want to keep costs down.

Really depends on your needs.

But ZFS is in my opinion far superior as it has amazing features. But for cPanel hosting its a NO NO at the moment.
 
Great answer :) Thank you!
Then, in my case... what should I do to fix this problem? Destroy the zfs and replace it with another type specified above, and then reattach it to the vm? Or what are the steps you would take ?
Os is on ssd, raid 1.
Thanks!
 
I just clicked on Create VM and created a centos vm. I guess none of those options work? :(

If you are running the guest in a VM, as opposed to a container, quotas should work just as they do for that guest OS on real hardware. The storage appears as a block device to the guest, which you then put a filesystem on just as on real hardware. How quotas work will depend on what OS and filesystem you are using in the guest. On Linux for some filesystems you can set quotas per directory while for others it is per whole filesystem while others don't support quota at all.

In a container the host OS is what is really in charge of quotas, because the guest is just in a sort of jail and shares a kernel with the host. This is where a second level quota would make sense.
 
Great answer :) Thank you!
Then, in my case... what should I do to fix this problem? Destroy the zfs and replace it with another type specified above, and then reattach it to the vm? Or what are the steps you would take ?
Os is on ssd, raid 1.
Thanks!

Really not sure as I usually just rebuild from scratch. :)
 
That is not an option for me. It's a live production server, and the resources are already allocated... I just have to find a way to enable quota for home2 on centos then...
 

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!