Extend, Expand or Resize an LVM root partition ‘/’ in linux

If your linux root partition ‘/’ is an LVM, you could easily extend the drive. Make use of the commands listed later in this post.

First let me explain how an LVM is setup.

Different components in an LVM setup
Physical Volumes These are real physical hard drives or partitions attached to the machine.Favorite commands: pvdisplay, pvcreate, pvresize
Volume Groups Several physical volumes are combined to form a volume group. Multiple Volume groups are also possible. Additional PVs are added to a VG to expand it anytime online.Favorite commands: vgdisplay, vgextend, vgcreate
Logical Volumes  Logical Volumes are carved out of a Volume Group. Logical Volumes could be expanded anytime if its VG has enough free space availableFavorite commands: lvdisplay, lvextend, lvcreate

In short, several physical volumes(PV) are first created. Volume groups(VG) are then built on top of multiple PVs. Logical Volumes(LV) are then carved out of any VG until the VGs run out of storage. Adding more PVs to a VG would help increase the storage in the VG.

Now lets get to work. Continue reading.

Continue reading “Extend, Expand or Resize an LVM root partition ‘/’ in linux”