Increase root partition in LVM

I have a RHEL6 guest running on vmware esx server and the root disk size is 30G and i increased the disk size and create another partition /dev/sda3 but i do not know how to increase the size of the VG and then intrun LV .. can anyone help me on this .


 fdisk -l /dev/sda

Disk /dev/sda: 64.4 GB, 64424509440 bytes
64 heads, 32 sectors/track, 61440 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000646cf

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           2         501      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2             502       30720    30944256   8e  Linux LVM
Partition 2 does not end on cylinder boundary.
/dev/sda3           30721       61440    31457280   8e  Linux LVM

What's the output of vgdisplay and lvdisplay?

Usually the process is something like this:

pvcreate /dev/sda3
vgextend VolumeGroupName /dev/sda3
lvextend -L +16G /dev/VolumeGroupName/LogicalVolumeName /dev/sda3

And then you extend the filesystem:

ext2online /dev/VolumeGroupName/LogicalVolumeName

Also I'd suggest you have a working backup of your root partition in case something goes wrong.

1 Like