Expand Linux LVM
Last Updated: December 5, 2020
Extend the partition
Extend the disk in VMware (or other)
Rescan the disk
echo 1 > /sys/class/block/sda/device/rescan
Run
cfdisk
to extend the partition- Select the partition you wish to expand, select Resize, press Enter. Select Write and type yes.
Extend the LVM
pvresize /dev/sda3
lvextend -l+100%FREE /dev/ubuntu-vg/ubuntu-lv
resize2fs /dev/ubuntu-vg/ubuntu-lv