Last active
August 6, 2018 14:27
-
-
Save gerard-kanters/295aebfc8fe08ae598b2dcde0edf3dff to your computer and use it in GitHub Desktop.
Increase disk on Xenserver with Centos 7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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