To extend a partition on a VM on CentOS 6 or RHEL 6, do the following:
Extend the Partition in vSphere to the size that you need:
in the VM, refresh the Partition Tables by the following command:
echo 1 > /sys/block/sda/device/rescan
Run fdisk to create a new primary partition:
Press p to print the number of partitions
Press n to create a new primary patition
Press p for primary
The partition number should automatically be selected, and press enter twice to accept the beginning and ending blocks on the free space.
Press w to write the changes.
Reboot the system: shutdown -r now
Verify that the new partition exists:
Convert the new partition to a physical volume:
Extend the Physical Volume (run vgdisplay to obtain the name of the Volume Group; default is VolGroup00):
vgextend VolGroup00 /dev/sda3
Extend the Logical Volume (run vgdisplay to obtain the free space and replace # below, and lvdisplay to obtain the name of the Logical Volume; default is /dev/VolGroup00/LogVol00)
lvextend -L+#G /dev/VolGroup00/LogVol00
Expand the ext3 online using the following command (substituting your proper Volume Group and Logical Volume names):
Confirm that your new space is available:
This was written using VMware's KB article on the subject as a reference.