Skip to content

Expand Disk

  1. Expand disk in vSphere
  2. Restart VM
  3. fdisk /dev/sda
  4. Enter p to print your initial partition table.
  5. Enter d (delete) followed by 2 to delete the existing partition definition (partition 1 is usually /boot and partition 2 is usually the root partition).
  6. Enter n (new) followed by p (primary) followed by 2 to re-create partition number 2 and enter to accept the start block and enter again to accept the end block which is defaulted to the end of the disk.
  7. Enter p to print your new partition table and make sure the start block matches what was in the initial partition table printed above.
  8. Enter w to write the partition table to disk. You will see an error about Device or resource busy which you can ignore.
  9. partx -a /dev/sda
  10. xfs_growfs /