Linux > Virtualization

Enabling second level quotas in openvz

(1/1)

Leo.Prince:
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: ---vzctl stop CT_ID
--- End code ---

2, Edit/set the QUOTAUGIDLIMIT parameter value. Say 100


--- Code: ---vzctl set CT_ID --quotaugidlimit 100 --save
--- End code ---

3, Start the Container


--- Code: ---vzctl start CT_ID
--- End code ---

Inorder to check if the parameter is correctly enabled in the container, Try grepping the parameter


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

--- End code ---

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: ---cat /etc/group|wc -l
50
cat /etc/passwd|wc -l
45
--- End code ---



--- Code: ---vzctl set VZID --quotaugidlimit 100 --save
--- End code ---

100 is more than enough in this case. Then restart the container. Enjoy  8)

Navigation

[0] Message Index

Go to full version