OpenVZ - Change Disk Quota

To check if your VE ran out of its disk quota, use the following commands (inside a VPS).

# df
   -To show disk space usage

# df -i
   -To show the inodes usage

If one of the commands give you usage of 100%, that means you hit one of the disk quota limit. You can increase the limit from the host system (Hardware Node) only.

To change the current Disk Quota,

1.Login to Hardware Node,

# vzquota stat <VPSID>
   -To  get the current values for disk quota. The result will be as shown in the figure.


2. To increase the disk space quota, use vzctl set --diskspace

# vzctl set <VPSID> --diskspace  $(( 1048576*3 )):$(( 1153434*3 )) --save
   -To increase quota by a factor 3

3. To increase the disk inodes quota, use vzctl set --diskinodes.


# vzctl set <VPSID> --diskinodes $(( 200000*4 )):$(( 220000*4 )) --save 
   -To increase quota by a factor 4

# vzctl exec <VPSID> df -i
   -To check whether the changes affected or not.

Leave a Reply