Difference between revisions of "Disk quota"

From OpenVZ Virtuozzo Containers Wiki
Jump to: navigation, search
(reiserfs (v3) should work fine, the only thing is it does not have inodes quota (because reiser don't have inodes). If you see different behavior, file a bug)
(Filesystem dependency)
Line 24: Line 24:
  
 
== Filesystem dependency ==
 
== Filesystem dependency ==
If your host filesystem is not ext2/3 (like ''XFS'') the disk quotas will not work inside containers.
+
If your host filesystem is not ext2/3 (like ''XFS'') the disk quotas will not work inside containers. Starting with 2.6.32, OpenVZ also suports ext4 i.e. one can limit per VE diskspace usage as well as per user diskspace usage.
  
 
[[Category: Disk quota]]
 
[[Category: Disk quota]]

Revision as of 18:19, 17 March 2010

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

Filesystem dependency

If your host filesystem is not ext2/3 (like XFS) the disk quotas will not work inside containers. Starting with 2.6.32, OpenVZ also suports ext4 i.e. one can limit per VE diskspace usage as well as per user diskspace usage.