Skip to main content

Expand Linux LVM

Last Updated: December 5, 2020

Extend the partition

  1. Extend the disk in VMware (or other)

  2. Rescan the disk echo 1 > /sys/class/block/sda/device/rescan

  3. Run cfdisk to extend the partition

    • Select the partition you wish to expand, select Resize, press Enter. Select Write and type yes.
  4. Extend the LVM

pvresize /dev/sda3
lvextend -l+100%FREE /dev/ubuntu-vg/ubuntu-lv
resize2fs /dev/ubuntu-vg/ubuntu-lv