Resize a vmdk

Page content

Resizing a vmdk attached to Linux

  1. Do the needful of resizing in VMware. (settings -> edit -> change size)
  2. Rescan scsi bus on the linux host. Pick your poison here. echo 1 > /sys/class/scsi_disk/path/to/disk or rescan_scsi_bus.
  3. Maybe that works.
  4. 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).

  1. Run pvresize /dev/sdb1
  2. Trust but verify with pvdisplay
  3. Extend the lv with the usual lvextend -L+100G /dev/mapper/path/to/lv
  4. Resize your shitty filesystem: resize2fs /dev/mapper/path/to/lv