Centos, I have already expanded Virtual disk in Vmware, now i need to add additional space to LVM Group but most tutorials out there are saying to create new partition and add it to LVM. Since there is a limit four partitions i can't do that way.
How i would do it in this situation ?
Filesystem size used aval. %used. mounted on
/dev/mapper/VolGroup00-LogVol00
328G 293G 18G 95% /
/dev/sda1 99M 13M 82M 14% /boot
tmpfs 1006M 0 1006M 0% /dev/shm
Disk /dev/sda: 590.5 GB, 590558003200 bytes
255 heads, 63 sectors/track, 71797 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 19581 157179960 8e Linux LVM
/dev/sda3 19582 23497 31455270 8e Linux LVM
/dev/sda4 23498 44384 167774827+ 8e Linux LVM
Nr Begining End Size Type Filesystem Flag
1 32,3kB 107MB 107MB main ext3 boot
2 107MB 161GB 161GB main lvm
3 161GB 193GB 32,2GB main lvm
4 193GB 365GB 172GB main lvm
365GB 591GB 225GB Free space
Thank you in advance
Best Answer
You should reboot the system to a rescue media of some sort that includes the LVM tools, and a partition editor. Extend the 4th partition to the new end of the virtual drive. Then use
pvresize
to enlarge that physical volume.Another solution would have been to create an additional Virtual Disk instead of expanding the existing disk. Setup a partition on the new drive, use
pvcreate
to prepare it as a physical volume. Then usevgextend
to add the new new drive to the volume group.As in all cases. It would be a very good idea to verify that you have good working backups before messing around with partitions/lvm.