2012/01/27

Expand existing disk on VM Oracle Linux


VMWare Client Setting

Change the Hard Disk by double click
image
Utilities > Expand

image
Change the Maximum disk size to desired size, and Expand
image

Oracle Linux Setting


Turn on your Oracle Linux, type fdisk /dev/sda
p to see current partion status
n for new partition
give 3 to use next partition number, currently is 2
we use the whole increased space so accept the default cylinder parameter
and w to write the partition table to disk and exit
image
The result message want us to do a reboot, so do it.

image
After reboot still logon as root
pvcreate /dev/sda3
to create a physical volume
image
vgextend VolGroup00 /dev/sda3
to add the physical volume to volume group
image
vgdisplay
to see current Volume Group
image
We have 20G free to add volume group
lvextend -L+20G /dev/VolGroup00/LogVol00
image
resize2fs /dev/VolGroup00/LogVol00
image
Congratulation! You’ve sucessfully increase new space and can be used in your Oracle Linux on VMWare

Reference url
http://www.techotopia.com/index.php/Adding_a_New_Disk_to_an_RHEL_5_Volume_Group_and_Logical_Volume
http://echenh.blogspot.com/2010/04/how-to-extend-lvm-on-vmware-guest-os.html

No comments:

Post a Comment