Resize a vmdk
Page content
Resizing a vmdk attached to Linux
- Do the needful of resizing in VMware. (settings -> edit -> change size)
- Rescan scsi bus on the linux host. Pick your poison here.
echo 1 > /sys/class/scsi_disk/path/to/diskorrescan_scsi_bus. - Maybe that works.
- If not, reboot.
Then I couldn’t get the new size to show up without running fdisk, deleting the existing partition and recreate it with the new size.
NOTE: Make sure you change the partition type to LVM (
8e).
- Run
pvresize /dev/sdb1 - Trust but verify with
pvdisplay - Extend the lv with the usual
lvextend -L+100G /dev/mapper/path/to/lv - Resize your shitty filesystem:
resize2fs /dev/mapper/path/to/lv