If you've ever wondered how you could rebuild the filesystem and disk parts of your computer without having to redo everything, LVM is the answer.
Explained most simply, LVM is what is used to allow your Linux operating system to access the hard drive partitions through a layer that is flexible enough to be changed without requiring changes to the structures actually stored on the disk.
You can do the following things with LVM:
This topic deserves more discussion which I will be adding shortly -BMC
Logical Volume Management is one way of virtualizing resources. See the discussion on Virtualization for more general information.
LVM consists of three manageable sections:
It is possible to combine drives and partitions in pretty much any way imaginable and treat them as a single drive or split them into virtual drives. The Physical Extents create managed sections that can be managed at the most basic layer. Think of it as virtual drive blocks. The Volume Groups create what are best thought of as virtual hard drives and at the last layer, the Logical Volumes are virtual partitions.
These separations give administrators the ability with Physical Volumes to move data between sets of blocks and to optimize those blocks without requiring modifications to the systems using them. Further with Volume Groups, the system can combine, do basic RAID, or split the physical extents into virtual drives. Finally, the Logical Volumes can be used as virtual partitions, but expanded or contracted to match the changing layer below.
Note the PE Size. This is the size of the "Physical Extents" or physical sections assigned to this volume group. The Free PE are the physical extents that are available to be assigned to something new and by multiplying the space per extent by the numbers of extents, you can determine how much space is available to be assigned.
In this example, there are 52GB of unassigned space.
To make that space available for use, it has to be assigned to a volume group.
Now you will see that the Volume Group name has it assigned:
To create a logical volume of 10GB carved out of volume group 52GLVM with a name of mylv:
lvcreate -L 10G -n mylv 52GLVM
Don't forget to activate the LVM:
# lvchange -a y /dev/52GLVM/mylv
Really short cut