1

I have a lot of CPanel clients and I've seen some host automatically enable secondary level quotas on signup. I was wondering how do I do that?

Do I need to run a script on signup? Do I need to edit a default container config file?

Thanks.

HopelessN00b
  • 53,795
  • 33
  • 135
  • 209
Tiff Aleis
  • 11
  • 1
  • 3
  • First check [the documentation](https://openvz.org/User_Guide/Managing_Resources#Turning_On_and_Off_Second-Level_Quotas_for_Container). – Michael Hampton Apr 16 '13 at 02:30
  • [Administration panels are off topic](http://serverfault.com/help/on-topic). [Even the presence of an administration panel on a system,](http://meta.serverfault.com/q/6538/118258) because they [take over the systems in strange and non-standard ways, making it difficult or even impossible for actual system administrators to manage the servers normally](http://meta.serverfault.com/a/3924/118258), and tend to indicate low-quality questions from *users* with insufficient knowledge for this site. – HopelessN00b Mar 11 '15 at 18:34

1 Answers1

1

As Micheal Hampton alluded to in the comments with the docs link you need to enable this at the default container configuration. You're going to want to change the QUOTAUGIDLIMIT from the default of 0 to an amount that will cover all the users on a VM. The docs suggest 100, but I usually deploy 1000 as the default to be safe. I've even seen 10,000 used before, so it's really your choice. That will deploy every new VM with quotas enabled.

Fixing already provisioned VMs

What about VMs already provisioned? First, the container must be powered off, then issue the vzctl set "VMID" --quotaugidlimit 1000 --save. Note that "VMID" is a placeholder for the container ID. Then start the container and you will have the second quotas enabled for use.

Fixing cPanel Quotas

Once you have the quotas enabled you will want to manual force cPanel to refresh the quotas. I would suggest running vzctl enter "VMID" to simply gain access to the VM. Again "VMID" is a placeholder for the container ID. Once inside the VM run the cPanel /script command to force the recheck on quotas /scripts/fixquotas You should see it force a recheck and will print out all of the quotas the accounts are getting set to. Once you see this you are finished,and cPanel is now showing disk usage correctly.

Jacob
  • 9,204
  • 4
  • 45
  • 56
  • Is there anyway to make this auto? It seems like some providers do this with a presetup script. What about under /etc/vz/conf can't I just add something to I guess the default so it becomes auto? And doesn't SolusVM have something that allows you to run a command before the creation of the VM? – Tiff Aleis Apr 16 '13 at 03:31
  • You can add this to the VM template, but to be honest we check to ensure it is enabled with our automated cPanel installer. – Jacob Apr 16 '13 at 03:45