Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Enabling second level quotas in openvz  (Read 3682 times)

0 Members and 1 Guest are viewing this topic.

Leo.Prince

  • Guest
Enabling second level quotas in openvz
« on: November 03, 2013, 05:26:41 pm »
Hi,

The parameter that controls the second-level disk quotas is QUOTAUGIDLIMIT in the Container configuration file. By default, the value of this parameter is zero and this corresponds to disabled per-user and per-group quotas. If you assign a non-zero value to the QUOTAUGIDLIMIT parameter, The second level quota is literally enabled for that number of users and groups.

The session below turns on second-level quotas for Container

1, shutdown the container

Code: [Select]
vzctl stop CT_ID
2, Edit/set the QUOTAUGIDLIMIT parameter value. Say 100

Code: [Select]
vzctl set CT_ID --quotaugidlimit 100 --save
3, Start the Container

Code: [Select]
vzctl start CT_ID
Inorder to check if the parameter is correctly enabled in the container, Try grepping the parameter

Code: [Select]
grep -i QUOTAUGIDLIMIT /etc/sysconfig/vz-scripts/CT_ID.conf

If you get the respected qoutaaugidlimt value it is enabled
If you get an empty result, or a result of zero, second-level quotas are not supported by this environment.

NOTE : The second level quota limit value should be chosen very carefully. The bigger value you set, the bigger kernel memory overhead this virtual Server creates. This value must be greater than or equal to the number of entries in the VPS /etc/passwd and /etc/group files.


Suppose

Code: [Select]
cat /etc/group|wc -l
50
cat /etc/passwd|wc -l
45


Code: [Select]
vzctl set VZID --quotaugidlimit 100 --save
100 is more than enough in this case. Then restart the container. Enjoy  8)