So you decide to increase the disk size in VMWare Fusion cause your running out of space or you just like to have room to breathe.
You head on to the settings of your VM and click on your Hard Disk and drag the slider across. W00t your done... um no.
Here's how I did it.
First after I increased the disk in the vmware via the settings gui and fired up the Leopard Terminal. I needed to set the guest to boot into an ISO on start. I typed the following:
vi /Volumes/External.Disk/Centos5OpenVZHost.vmwarevm/Centos5OpenVZHost.vmx
I then added the following line to the VMX file.
bios.forceSetupOnce = "TRUE"
Then I set up the CDROM to connect on boot and load up GPARTED iso I have.
Once I was in the gparted GUI I formated the un-allocated space ext3 and added a flag 8E for LVM. I then committed the changes, rebooted, and disconnected the CDROM in the vmware settings.
Once the guest is booted, here is the free space before
[root@openvzdev ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
37G 8.6G 27G 25% /
/dev/sda1 99M 35M 59M 38% /boot
tmpfs 505M 0 505M 0% /dev/shm
Here is what I did to increase it.
[root@openvzdev ~]# pvcreate /dev/sda3
Physical volume "/dev/sda3" successfully created
[root@openvzdev ~]# vgextend VolGroup00 /dev/sda3
Volume group "VolGroup00" successfully extended
[root@openvzdev ~]# lvresize -L +32GB /dev/VolGroup00/LogVol00
Extending logical volume LogVol00 to 69.94 GB
Logical volume LogVol00 successfully resized
[root@openvzdev ~]# resize2fs /dev/VolGroup00/LogVol00
resize2fs 1.39 (29-May-2006)
Filesystem at /dev/VolGroup00/LogVol00 is mounted on /; on-line resizing required
Performing an on-line resize of /dev/VolGroup00/LogVol00 to 18333696 (4k) blocks.
The filesystem on /dev/VolGroup00/LogVol00 is now 18333696 blocks long.
And now, ta-da!
[root@openvzdev ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
68G 8.6G 56G 14% /
/dev/sda1 99M 35M 59M 38% /boot
tmpfs 505M 0 505M 0% /dev/shm
No need to take anything offline, reboot or anything. Yay!
