Understanding Logical Volume Manager (LVM) was a painful task for me. It took me quite a long and several failed configurations to set it up correctly. To help others and myself actually (So that I nail it down) I am writing this post on the Concepts of Logical Volume Manager (LVM).

There are some core terms or concepts that will make your Logical Volume Manager (LVM) life easier.

  • Physical Volume

  • Logical Volume

  • Logical Group

  • Physical Extents

The logical volume manager can be best explained with the help of a diagram. Assume we have two separate hard drives one 10 GB and another one 6 GB.

Now we can call the 10 GB and 6 GB hard drives as thephysical volumes(Because actually they are physically present).

understaning concept of logical volume manager lvm 1 Understanding The Concept Of Logical Volume Manager – LVM

Now the physical volumes are made up ofphysical extents. The physical extents are small chunks on the physical volumes, the default size being 4 MB. The physical volume with 10 GB will contain 25000 chunks (Sorry for poor MATH) similarly 6GB physical volume will contain 15000 chunks.

Now we can combine them i.e. 10GB and 6GB physical volumes to form a 16GB logical group. (Yes it will be a logical group as it is formed of two different physical volumes).

2 understaning concept of logical volume manager lvm  Understanding The Concept Of Logical Volume Manager – LVM

Now the real part LOGICAL VOLUMES in the LOGICAL VOLUME MANAGER (LVM). This can be best explained with the help of an example consider we need to mount a 12GB share and allocate 4GB space to another user directory.

With the help of traditional partitioning this wouldn’t have been possible as maximum size we have for our hard drive is 10GB and we need is 12 GB. To solve this problem we createLOGICAL VOLUMES. The logical volumes you can say are like partitions in the LOGICAL GROUP. So we will create two LOGICAL VOLUMES in the LOGICAL GROUP.

4understaning concept of logical volume manager lvm  Understanding The Concept Of Logical Volume Manager – LVM

The advantage of logical volumes is that it can be used for anything. The logical volumes can beformattedto any filesystem format supported by your LINUX DIST. Another advantage of LVM being that we canshrink or expandthe size of LOGICAL VOLUMES like in our case if we need 20 GB for the share we can just add another physical volume to the group and assign space from or if the space is available in the Logical group we can straight forwardly assign the space to the logical volume. The only exception is that youcannot mount /BOOTpartition to a logical volume. That’s a downside for the Logical Volume Manager (LVM).

I will be explaining HOW TO SETUP LOGICAL VOLUME MANAGER (LVM) in my next post. If I have missed something or you have some questions do post the comments.