How to Increase Disk Space Size of the container in OpenVZ

Date: 28-11-2020

Step 1: Check the list of all running containers by using the below command.
#vzlist

Step 2: Run the following command to increase the disk space.

#vzctl set CTID --diskspace SoftLimit:HardLimit --save

Note:- CTID — Container Id number. You want to increase the disk space for which container and you can get this number from vzlist.
SoftLimit:HardLimit – Required Disk space. For example, you want to increase to 50GB for container id 109. You can use below command.
#vzctl set 109 --diskspace 50G:49G --save

Step 3: You can verify the disk space by using the below command.

#vzctl exec CTID df -h

Thank you!

Leave a Reply