Previous page

Next page

Locate page in Contents

Print this page

Turning On and Off Per-Container Disk Quotas

The parameter that defines whether to use first-level disk quotas is DISK_QUOTA in the global configuration file ( /etc/vz/vz.conf ). By setting it to “no”, you will disable disk quotas completely.

This parameter can be specified in the Container configuration file ( /etc/vz/conf/< CT_ID >.conf ) as well. In this case, its value will take precedence of the one specified in the global configuration file. If you intend to have a mixture of Containers with quotas turned on and off, it is recommended to set the DISK_QUOTA value to yes in the global configuration file and to no in the configuration file of that Container which does not need quotas.

The session below illustrates a scenario when first-level quotas are on by default and are turned off for Container 101:

[checking that quota is on]

# grep DISK_QUOTA /etc/vz/vz.conf

DISK_QUOTA=yes

[checking available space on /vz partition]

# df /vz

Filesystem 1k-blocks Used Available Use% Mounted on

/dev/sda2 8957295 1421982 7023242 17% /vz

[editing Container configuration file to add DISK_QUOTA=no]

# vi /etc/vz/conf/101.conf

[checking that quota is off for Container 101]

# grep DISK_QUOTA /etc/vz/conf/101.conf

DISK_QUOTA=no

# pctl start 101

Starting Container ...

Container is mounted

Adding IP address(es): 10.0.16.101

Hostname for Container set: ve101

Container start in progress...

# pctl exec 101 df

Filesystem 1k-blocks Used Available Use% Mounted on

vzfs 8282373 747060 7023242 10% /

As the above example shows, the only disk space limit a Container with the quotas turned off has is the available space and inodes on the partition where the Container private area resides.