Logical Volume Manager (Linux)

The Logical Volume Manager (LVM ) is a mainly used in Unix and Linux environment abstraction layer between disks, partitions and file systems. With the LVM, it is possible to dynamically changeable partitions (logical volumes, LV short ) form, which can extend over several disk drives. The size of the virtual disk can be changed even after the creation of a file system, even if data has already been stored in it.

Both the name LVM and Linux deployment originate in AIX and are derived from this. It was later part of OSF / 1 and others have it then also transferred.

Software Architecture

The term "manager" is somewhat misleading, because the Logical Volume Manager consists of two main components: an administrative level ( the manager ) with CLI and / or GUI as well as a built- in kernel driver, which performs the actual implementation. The LVM summarizes disks or partitions ( physical volumes, PV) together to a pool ( volume group, VG), dynamic LV " partition " ( the logical volumes LV) can be requested from the. On these logical volumes, the file systems are created. On Microsoft Windows, this is roughly equivalent to the "dynamic disks ", which are available since Windows 2000.

A volume group can be extended by adding physical volumes and logical volumes can span volumes within the volume group across multiple physical. Thus, a logical volume to be greater by far than the largest existing in the system disk.

The main advantages of LVM over the traditional static partitioning hard drives are the possibility to enlarge a filesystem afterwards. To this end, the expandable volume groups also subsequently be expanded by adding physical volumes ( hard disks). The now additionally available memory may be allocated to subsequently also extensible logical volumes subsequently as required. Then, the file system must be expanded to include the newly available disk space - where the all file systems without problems is not possible later. Under most operating systems, the enlargement of a logical volume and file system applied thereto during operation is possible, without it running applications affected by the magnification.

Basically, it is not necessary to keep the exact overview on which physical volumes comes a Logical Volume to lie, because the distribution of the physical volumes within a volume group is automatically set by the LVM. For performance- critical applications, however, can be taken to ensure that simultaneous disk accesses are distributed to different physical volumes to optimize the movement of the read and write heads. Moreover, it is common practice to control the distribution so that LVM is not distributed to too many physical volumes. Thus, the effects of a hard drive failure can be limited. LVMs usually have corresponding commands to check the distribution of data on the physical volumes on the fly and change.

RAID support from the LVM

Many LVM support the organization of the logical volumes as RAID array, so that the data can be protected against disk failures or latency low. In general, the operating system vendors implement only to common administrative functions, which control the largely working independently of each other Volume Manager and software RAID implementations. The term software RAID ( also SoftRAID ) stems from the fact that this process works without any additional hardware. Depending on the system typically RAID 0 (striping, no protection against disk failures ) and RAID 1 (mirroring, mirrors ) are supported. In some implementations, the more experienced LVMs also supported RAID 5 ( redundancy through parity). As the latter also requires significant computing capacity, it comes only with sufficiently equipped systems in question. In some systems (eg, HP- UX or Linux) software RAID and LVM are optional extensions and can be installed and used completely independently. Therefore, some manufacturers license volume management and RAID (mirroring and / or RAID 5) separately.

A notable others, but partly also criticized approach show the integrated in Solaris ZFS and the free btrfs. Both implement in a cast up a summary of sophisticated file system with LVM and software RAID. The built- in file system RAID subsystem provides over traditional hardware or software RAID implementations, for example, the advantage that can be distinguished by the integrated RAID system between used and unused data blocks and thus when reconstructing a RAID volumes only used disk space must be mirrored, this results in case of damage, especially for poorly filled file systems, a tremendous time saver.

Delineation of LVM and RAID

The work and operation of a logical volume manager is often mixed with that of a RAID system. Here there is a clear demarcation. True RAID systems always offer (up to RAID -0) redundancy and thus always have a RAID engine, which generates the additional, required for the redundancy data streams. The most common engine variants are in RAID 1, the data replication and RAID 5 and most other methods, the XOR education. It will therefore always generates additional data to a considerable extent in RAID, the data throughput of RAID engine is therefore an important performance factor.

Task of an LVM is to map physical volumes to logical. One of the most common applications is the subsequent enlarge partitions and file systems that are managed by LVM. An LVM but generates no additional data streams; he also has no engine and therefore also offers no redundancy, thus it produces only minimal computational effort. Therefore, he has virtually no impact on performance ( although some systems in the LVM implementation have built-in RAID 0 - extensions). The task of the LVM is thus essentially is to distribute the data streams from the file system to the physical disks respectively associated, it was most similar to the operation of an MMU. Although a RAID system also distributed data streams, but it produces redundancy reasons whatsoever one or more additional data streams.

Physical and Logical Extents

The physical extent ( implementation dependent also: Physical partition) is the memory unit in which the data of the volume group to be organized. The size of a logical volume is always equal to the multiple of the size of a physical extent in the volume group.

The Logical Extent ( implementation dependent also: Logical Partition ) summarizes in LVMs that support the mirroring of logical volumes on multiple disks, the number of mirrors together. If there are two mirror halves, corresponding to a Logical Extent two physical extents. In LVM implementations that do not support mirroring, corresponding to a logical extent to exactly one physical extent.

Operating systems with LVM support

Other LVM support

History

For Linux operating systems, there is LVM implementations since 1997. Been available since 2002 with a new LVM2 metadata format with an associated set of new user - mode - tools. It was at the beginning of the work on kernel version 2.5 branch next to the Enterprise Volume Management System ( EVMS ) IBM a second implementation of LVM, which was eventually taken over for kernel 2.6. However, EVMS provides further skills and then lived without the custom kernel parts as a user - mode front-end to LVM2 further and in 2006 was finally abandoned.

527409
de