Ubuntu – How to resize a virtual machine running ubuntu in VMware 5

filesystemsUbuntuvmware-vcenter

I was attempting to follow the instructions listed here

http://www.joomlaworks.net/blog/item/168-resizing-the-disk-space-on-ubuntu-server-vms-running-on-vmware-esxi-5

I started with a 150 gig Drive that is running LVM and as you can see from the screenshots when I try to do the fdisk I am getting "no free sectors available"
VMware
(source: zillabunny.com)

Ubuntu
(source: zillabunny.com)

If possible I'd like to do this live as I would in windows (disk management, right click drive, extend[i understand this may not be possible]).

Can someone please assist me in this?

Thank you!

EDIT:

Here is what my GPARTED looks like, it says the extra 50 gigs I've added is unallocated and i'm still unable to resize my drive

enter image description here

Best Answer

You will need to get the disk geometry to be re-read, you can try the partprobe CLI command or rescanning your SCSI bus. Failing that, you will need to reboot the VM.

This will find your SCSI bus number, in my example, it's 2:

cwatson@odin:~$ grep mpt /sys/class/scsi_host/host?/proc_name
/sys/class/scsi_host/host2/proc_name:mptspi

Then rescan your bus using this command:

echo "- - -" > /sys/class/scsi_host/host2/scan

Another way to rescan your SCSI bus is by running this command:

echo 1 > /sys/class/scsi_device/0\:0\:0\:0/device/rescan

Note that the colons in the path are preceded with back-slashes. You can find your device ID by running this (you may have more than once SCSI device):

ls -l ls /sys/class/scsi_device

Update: As per your GParted screenshot, you'll need to unmount the LVM partition from within GParted, then resize the extended partition to take up the extra space, and then create a new partition within that extended partition, and use LVM to span your volume across both partitions (outside the scope of this answer).