- Create a snapshot of the VM to revert back if needed
- Shut down the VM
- In XenCenter, select the VM and click the Storage tab
- Select the disk and click Properties
- Enter the new size under Size and Location
- Power on the VM
- Verify the additional storage is available
# fdisk -l
- Edit the expanded drive with fdisk
# fdisk /dev/xvda
- View the existing partitions by typing ‘p’
- Create a new partition by typing ‘n’
- If there are less than 4 partitions, select primary. Otherwise, select extended.
- Press Enter twice to use all of the free space
- Type ‘p’ to view the new table
- Type ‘t’ to change the partition type of the new partition to type ‘8e’
- Once the partition table looks correct, type ‘w’ to save and quit
- Reboot the VM
- Create a new LVM physical volume on the new partition
# pvcreate /dev/xvda4
- Extend the volume group to include the new PV
# vgextend vg_system /dev/xvda4
- Extend the logical volume to include the remaining free space in the VG
# lvextend -l+100%FREE /dev/mapper/vg_system-lv_root
- Resize the filesystem to fill the free space in the LV
# resize2fs /dev/mapper/vg_system-lv_root
- Verify the additional space is available
# df -h
Was this helpful?
0 / 0