Skip to content

Instantly share code, notes, and snippets.

@gerard-kanters
Last active August 6, 2018 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gerard-kanters/295aebfc8fe08ae598b2dcde0edf3dff to your computer and use it in GitHub Desktop.
Save gerard-kanters/295aebfc8fe08ae598b2dcde0edf3dff to your computer and use it in GitHub Desktop.
Increase disk on Xenserver with Centos 7
Bring down the VM with XenCenter
Go to storage and change storage size of the VM in properties. In this case 160GB
Boot VM with XenCenter or #reboot
Change the run level to single user mode
#init 1
Show partitions
#fdisk -l
Change partition of root /dev/mapper/centos-root in this case /dev/xvda2
#fdisk /dev/xvda
#d (Delete partition 2 and recreate it)
#n (New partition) (primary)
#w (Write out table)
Reboot to let partition table take effect and change the run level to Multi-user mode
#reboot
//Change size to 160G or whatever you changed the size in the first step.
#pvresize -v /dev/xvda2
#lvextend -L156G /dev/mapper/centos-root
#xfs_growfs /dev/mapper/centos-root
Done
check the size of your volumes
#df -BG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment