Difference between revisions of "Disk quota"
Baseline0x0 (talk | contribs) (New page: Basic disk quota management: vzctl set 101 --diskspace 6G:7G --save To set disk space, run the following commands: <pre> vzctl set CTID --diskspace $SoftLimite$:$HardLimit$ --save </pr...) |
(added →See also) |
||
(12 intermediate revisions by 9 users not shown) | |||
Line 1: | Line 1: | ||
Basic disk quota management: | Basic disk quota management: | ||
− | |||
To set disk space, run the following commands: | To set disk space, run the following commands: | ||
<pre> | <pre> | ||
− | vzctl set CTID --diskspace $ | + | vzctl set CTID --diskspace $SoftLimit$:$HardLimit$ --save |
</pre> | </pre> | ||
− | |||
Line 14: | Line 12: | ||
[host-node]# vzctl set 101 --diskspace 6G:7G --save | [host-node]# vzctl set 101 --diskspace 6G:7G --save | ||
</pre> | </pre> | ||
+ | |||
+ | You could verify the space available with this command (ie : CTID =101) | ||
+ | <pre> | ||
+ | [host-node]# vzctl exec 101 df -h | ||
+ | </pre> | ||
+ | |||
+ | If you want remove disk quota: | ||
+ | <pre> | ||
+ | DISK_QUOTA=no | ||
+ | </pre> | ||
+ | |||
+ | This is also possible via this option: | ||
+ | <pre> | ||
+ | DISKSPACE="unlimited" | ||
+ | </pre> | ||
+ | |||
+ | == Filesystem dependency == | ||
+ | If your host filesystem is not ext2/3/4 (like ''XFS'') the disk quotas will not work inside containers. | ||
+ | |||
+ | {{Note|'''ext4''' is also fully supported in 2.6.32 kernels and in RHEL5-based kernels since 028stab066.7}} | ||
+ | |||
+ | == See also == | ||
+ | |||
+ | * [[Disk quota, df and stat weird behaviour]] | ||
+ | |||
+ | |||
+ | [[Category: Disk quota]] |
Latest revision as of 21:32, 17 November 2016
Basic disk quota management:
To set disk space, run the following commands:
vzctl set CTID --diskspace $SoftLimit$:$HardLimit$ --save
Example:
[host-node]# vzctl set 101 --diskspace 6G:7G --save
You could verify the space available with this command (ie : CTID =101)
[host-node]# vzctl exec 101 df -h
If you want remove disk quota:
DISK_QUOTA=no
This is also possible via this option:
DISKSPACE="unlimited"
Filesystem dependency[edit]
If your host filesystem is not ext2/3/4 (like XFS) the disk quotas will not work inside containers.
Note: ext4 is also fully supported in 2.6.32 kernels and in RHEL5-based kernels since 028stab066.7 |