Previous page

Next page

Locate page in Contents

Print this page

Enabling and Disabling Per-Container Quotas

For VZFS-based containers, per-Container disk quotas can be enabled or disabled with the DISK_QUOTA parameter in the global configuration file ( /etc/vz/vz.conf ). The same parameter in a Container configuration file ( /etc/vz/conf/< CT_ID >.conf ) overrides the one in the global configuration file. To enable quota support for some Containers and disable it for other, it is recommended to set DISK_QUOTA to yes in the global configuration file and then set it to no in the corresponding Container configuration files.

For ploop-based Containers, per-Container quotas do not work, as Container size is already limited by ploop image size. For such Containers, the commands below show disk space available in the ploop image.

Note: Setting the DISK_QUOTA parameter to no also disables second-level quotas for all VZFS and ploop-based Containers.

In the example below, per-Container quotas are enabled globally but disabled for Container 101:

  1. Check that quota is enabled.

    # grep DISK_QUOTA /etc/vz/vz.conf

    DISK_QUOTA=yes

  2. Check available space on the /vz partition.

    # df /vz

    Filesystem 1k-blocks Used Available Use% Mounted on

    /dev/sda2 8957295 1421982 7023242 17% /vz

  3. Set DISK_QUOTA to no in the Container 101 configuration file.

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

  4. Check that quotas are disabled for Container 101.

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

    DISK_QUOTA=no

    # prlctl start 101

    # prlctl exec 101 df

    Filesystem 1k-blocks Used Available Use% Mounted on

    /dev/ploop1p1 8282373 747060 7023242 10% /

As shown in the example above, a VZFS-based Container with quotas disabled has only one disk space limit: the available space on the partition where the Container's private area is.