Turning On and Off Quotas for Container

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/group quotas.

If you assign a non-zero value to the QUOTAUGIDLIMIT parameter, this action brings about the two following results:

  1. Second-level (per-user and per-group) disk quotas are enabled for the given Container;
  2. The value that you assign to this parameter will be the limit for the number of file owners and groups of this Container, including Linux system users. Note that you will theoretically be able to create extra users of this Container, but if the number of file owners inside the Container has already reached the limit, these users will not be able to own files.

Enabling per-user/group quotas for a Container requires restarting the Container. The value for it should be carefully chosen; the bigger value you set, the bigger kernel memory overhead this Container creates. This value must be greater than or equal to the number of entries in the Container /etc/passwd and /etc/group files. Taking into account that a newly created Red Hat Linux-based CT has about 80 entries in total, the typical value would be 100. However, for Containers with a large number of users this value may be increased.

The session below turns on second-level quotas for Container 101:

# vzctl set 101 --quotaugidlimit 100 --save
Unable to apply new quota values: ugid quota not initialized
Saved parameters for CT 101
# vzctl restart 101
Restarting container
Stopping container ...
Container was stopped
Container is unmounted
Starting container ...
Container is mounted
Adding IP address(es):
Setting CPU units: 1000
Configure meminfo: 65536
File resolv.conf was modified
Container start in progress...
  • Email, SSL
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Test Benchmark Server

Jalankan perintah berikut untuk melihat hasil. wget https://www.hostnic.id/downloads/bench.sh -O...

OpenVz template for hypervm

Apabila anda membutuhkan berbagai macam template untuk vps di hypervm, anda bisa mengunduh...

Back Up and Restore OpenVZ VMs With vzdump on CentOS

Pertama anda perlu melakukan instalasi vzdump # yum install vzdump rsync Kemudian membuat...

Install and manage iSCSI Volume

Internet SCSI (iSCSI) is a network protocol s that allows you to use of the SCSI protocol over...

Set Up an NFS Storage on CentOS 6

About NFS (Network File System) Mounts NFS mounts work to share a directory between several...