Setting Up Per-Container Disk Quota ParametersThree parameters determine how much disk space and inodes a Container can use. These parameters are specified in the Container configuration file:
The first two parameters have both soft and hard limits (or, simply, barriers and limits). The hard limit is the limit that cannot be exceeded under any circumstances. The soft limit can be exceeded up to the hard limit, but as soon as the grace period expires, the additional disk space or inodes allocations will fail. Barriers and limits are separated by colons (":") in Container configuration files and in the command line. The following session sets the disk space available to Container 101 to approximately 1 GB and allows the Container to allocate up to 90,000 inodes. The grace period for the quotas is set to 10 minutes: # pctl set 101 --diskspace 1000000:1100000 --save Saved parameters for Container 101 # pctl set 101 --diskinodes 90000:91000 --save Saved parameters for Container 101 # pctl set 101 --quotatime 600 --save Saved parameters for Container 101 # pctl exec 101 df Filesystem 1k-blocks Used Available Use% Mounted on vzfs 1000000 747066 252934 75% / # pctl exec 101 stat -f / File: "/" ID: 0 0 Namelen: 255 Type: UNKNOWN (0x565a4653) Blocks: Total: 1000000 Free: 252934 Available: 252934 Size: 1024 Inodes: Total: 90000 Free: 9594
It is possible to change the first-level disk quota parameters for a running Container. The changes will take effect immediately. If you do not want your changes to persist till the next Container startup, do not use the
|
||||||||||
|