Increase a disk in XCP-ng - OS UBUNTU
Only works if Ubuntu is setup to use LVM!
Steps to follow:
- Stop the running VM from within the VM.
- Go into Xen Orchestra and increase disk size of the running VM.
- Start the VM again.
- Check partitions:
sudo lsblk - Grow the relevant partition:
sudo growpart /dev/xvda 1 - Check again:
sudo lsblk fdisk -lpvresize /dev/xvda1lvdisplaylvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lvresize2fs /dev/ubuntu-vg/ubuntu-lv- final check
df -h
Useful links:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recognize-expanded-volume-linux.html
https://carleton.ca/scs/2019/extend-lvm-disk-space/