SnippetOct 28, 2023Linux · VMware
Resize an Ubuntu LVM Partition
With the VMware VM disk expanded, the next step involves resizing the Ubuntu LVM partition to use the new space.
bash
1sudo pvdisplay
2sudo pvresize /dev/sdaX
3sudo vgdisplay
4sudo lvresize -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
5sudo resize2fs /dev/ubuntu-vg/ubuntu-lv
Line 2Replace
sdaX with the appropriate disk identifier from the pvdisplay output.Line 4–5Ensure you replace
/dev/ubuntu-vg/ubuntu-lv with your logical volume path, if different.