Monday, February 14, 2011

How to: resize expand partition on Centos hosted by Vmplayer

when you limited size warrning, run “df-h”,  80% is used on /, we will span the /dev/mapper/volgroup00-logvol00 here.


display LVM , “lvdisplay”, there are one volum group volGroup00 with two logic volumes 00 and 01

just one disk with 10G, shut down the VM, and click the utility to expand the disk to 13G


run “fdisk /dev/had” to add a lvm partition to the new expended disk.
p –>print current partition
n-> add one new partition with primary partation
t-> toggle the partition type to 8e which is lvm


press W to save the partition

after done, Run Pvcreate to create a new LVM.


if you get error like disk us not found , just reboot the vm

Extend the VolGroup00 , add /dev/hda3 to the group, and extend the /dev/VolGroup00/LogVol00 to the new lvm hda3

run resize2fs , refresh the change.  run df –h again, you will see free space is increased.



Vlad Rotaru said...

great HOW TO. Worked perfectly for me, just had to change some stuff, like hda to sda and the partition group to my partition group (vg_centos6) and some other minor stuff, but in rest ++

as a note, to get the partition group name:

AlWaYaBeThErE4U. said...

Gr8 article. This worked gr8 for me. Thanks!

Gabriel Huerta said...

When I run lvdisplay or vgdisplay command I get "No volume groups found". This means I do not need to run vgextend and resize2fs commands? If I just run pvcreate command with this is suffice to increase my partition?

cembalik said...

Thanks for article, it is great.

Locations of visitors to this page