LVM (Logical Volume Manager)
LVM is the Logical Volume Manager provided by the Linux kernel. Its main purpose is to allow storage devices to be aggregated and subdivided. This is done by:
- formatting each storage device as an LVM ‘physical volume’,
- aggregating the physical volumes to form one or more pools called ‘volume groups’, then
- creating virtual block devices called ‘logical volumes’ within those volume groups.
One use for LVM is as an alternative to a partition table, but with the advantage that logical volumes need not be stored contiguously on the underlying physical volume. This makes resizing a logical volume a much simpler and safer operation than resizing a partition. Other useful features of LVM include:
- the ability to take a snapshot of a logical volume (which is useful for making backups) and
- the ability to stripe data across a number of physical volumes (which can improve performance if they are located on separate physical devices).
- Create a logical volume using LVM
- Increase the capacity of an LVM volume group
- Increase the size of an LVM logical volume
- Mount a partition located inside a file or logical volume
- Reduce the size of an LVM logical volume
- Replace one of the physical volumes in an LVM volume group