How to resize a VM hard drive - Oliver-Mustoe/Oliver-Mustoe-Tech-Journal GitHub Wiki
Taken from:
- https://askubuntu.com/questions/116351/increase-partition-size-on-which-ubuntu-is-installed
- https://ostechnix.com/resize-lvm-partitions-linux/
- https://packetpushers.net/ubuntu-extend-your-default-lvm-space/ - need to add steps from this!
The following describes in short detail how to resize a VM in VMware:
-
Resize the VM in the VM options
-
Inside the system, use
cfdisk
to resize the root partition (type should beLinux filesystem
) to the size desired- The command
df -h
can be used to find the root aka/
partition - MUST THEN REBBOT THE SYSTEM
- The command
-
Then run the command
resize2fs <ROOT PARTITION DEVICE NAME>
To resize the partition!
To resize a lvm parition, make sure the pool has enough space (using cfdisk
like above) and resize the lvm partition with:
sudo lvextend -L +<AMOUNT>G /dev/<lvm_partition_path>
And then use resize2fs
to use the space!