Logical Volume Managers
Logical volume management is a relatively new approach to UNIX disks
and filesystems. Instead of dealing directly with physical disk partitions,
the logical volume manager (abbreviated LVM) splits disk space
up into logical partitions.
The difference between an ordinary disk partition and
a logical partition is analogous to the difference between a physical
filesystem and the UNIX logical filesystem. A logical partition may
span multiple physical disks, but is accessed transparently
as if it were a single disk.
There are numerous advantages to using a logical volume manager:
- They offer greater flexibility for disk partitioning.
- The size of logical volumes can be modified according to need,
while the operating system is running
- Logical volumes can span multiple disks.
- Disk mirroring is often supported, for greater data reliability
The simplest way to understand logical volume management is to
look at the structure of the system from the bottom up:
Disks, Physical Volumes, and Volume Groups
The lowest level is that of the physical disk itself. A physical
disk is formatted into a physical volume for use by the
LVM. Each physical volume is split up into discrete chunks,
called physical partitions or physical extents. Note
that this is not the same thing as an ordinary disk
partition; physical partitions/extents are allocatable units of space,
on the order of 4MB.
Physical volumes are combined into a volume group. A volume
group is thus a collection of disks, treated as one large storage
area. The physical volume is analogous to the physical disk under
the ordinary UNIX partitioning scheme -- it is a single storage
area that can be split up into several independent filesystems.
Logical Volumes
Logical volumes are the LVM's equivalent to the ordinary
UNIX disk partition. A logical volume is made into a filesystem,
or may be used as a swap device, a boot device, and so on. A logical
volume consists of some number of physical partitions/extents,
allocated from a single volume group. The allocation of physical
partitions within a volume group is generally arbitrary, though
some LVM's may allow a logical volume to be allocated from a
specific physical volume. Logical volumes may be any size
that is a multiple of the size of a physical partition within
a given volume group.
Terms used: filesystem, partition, logical volume, logical volume manager, LVM, physical volume, volume group, physical partition, physical extent.