Extend Xen Disk Space

Xen VMs use lvms and extending disk space from SolusVM control panel may not work properly. So, we will need to extend the lvm manually.
Shutdown VM from SolusVM control panel or use the following command on node :

# xm shutdown vm_ID 

(Replace vm_id with the xen ID of the VPS)
Extend LVM :

# lvextend /dev/Xen/vm_ID_img -L +50G 

(This will increase the main disk size for vm by 50G)
Checking File System for errors :

# e2fsck -f /dev/vg0/vm_ID_img 

Resize File System :

# resize2fs /dev/vg0/vm1_ID_img 

(This will increase the disk’s filesystem to the maximum new amount)
Boot up the VM:

# xm create vm_ID /home/xen/vm_ID/vm_ID.cfg 

Done..!! Now check the VPS Disk Space using df command.

About Sarath

A Techie from Kochi, India with 8+ years of experience in Linux and Windows server administration. I learn new things almost everyday and I enjoy the fun of learning and sharing my knowledge.