MilesWeb
MilesWeb Hosting Forum

Please login or register.

Login with username, password and session length

 

News:

SMF - Just Installed!


Author Topic: How to increase diskspace of VM from OpenVZ host node via command line?  (Read 4154 times)

0 Members and 1 Guest are viewing this topic.

Offline Dipak Bhoi

  • MilesWeb Team Member
  • Full Member
  • ***
  • Posts: 208
  • Karma: +5/-0
    • View Profile
    • MilesWeb Internet Services
Hello Guys,

You can reset the disk size via command line using vzctl command. OpenVZ containers have two storage related limits:

 Disk space This is the amount of space which can be used by the container, usually measured in gigabytes.
 inodes The total number of inodes and the space reserved for these inodes is set when the filesystem is first created. This loosely translates to the number of files which can be stored on the filesystem.

Use the vzctl command to apply the new limits immediately to a running container. There is no need to restart VM.

Please check first DISKSPACE and DISKINODES to assign your VM from configuration file /etc/vz/conf/103.conf, here I used 103 for VMID as a example.

Run below commands to reset disk size:

Quote
#vzctl set 103 --diskspace 50G:60G --save

Quote
#vzctl set 103 --diskinodes 6000000:6800300 --save

Now run below command to check the disk size of VM.

Quote
#vzctl exec 103 df -h

Or login to the container and performed a df -h to view the disk usage.

That's all. Enjoy !!
« Last Edit: December 12, 2014, 04:06:26 PM by Dipak Bhoi »
MilesWeb.com
cPanel Hosting in India - cPanel Hosting in India.

Grab an SSL for your website and SAVE 20% now. Coupon Code SSLSAVE20.

MilesWeb Hosting Forum