Logical Volume Manager

from Wikipedia, the free encyclopedia
Logical Volume Manager

The Logical Volume Manager ( LVM ) is a partition scheme that is mainly used in the Unix and Linux environment and provides an abstraction level between hard disks , partitions and file systems . The LVM makes it possible to create dynamically changeable partitions ( Logical Volumes , LV for short ), which can also extend over several hard disks. The size of these virtual data carriers can still be changed after a file system has been created, even if data has already been saved in it.

Both the name LVM and the implementation under Linux have their origins in AIX and are derived from it. It later became part of OSF / 1 and others adopted it as well.

Software architecture

The term “manager” is slightly misleading because the Logical Volume Manager essentially consists of two components: an administration level (the manager) with CLI and / or GUI and a driver integrated into the kernel , which implements the actual implementation. The LVM combines hard disks or partitions ( physical volume , PV) into a pool ( volume group , VG), from which LV “partitions” (the logical volumes , LV) can be requested dynamically . On these logical volumes that are file systems created. Under Windows this corresponds roughly to the "dynamic data carriers" that have been available since Windows 2000.

A volume group can be expanded by adding physical volumes , and logical volumes can extend over several physical volumes within the volume group. This means that a logical volume can be many times larger than the largest hard disk in the system.

The most important advantages of LVM compared to traditional static partitioning of hard disks are the possibility to enlarge a file system later. For this purpose, the volume groups, which can also be subsequently expanded, are expanded by adding physical volumes (hard drives). The additional storage space now available can then be allocated to the logical volumes, which can also be expanded at a later date, as required. The file system must then be expanded to include the newly available storage space - although this is not possible retrospectively with all file systems without problems. Under most operating systems, a logical volume and the file system created on it can also be enlarged during operation without the applications running on it being impaired by the enlargement.

In principle, it is not necessary to keep a precise overview of the physical volumes on which a logical volume is located, because the distribution to the physical volumes within a volume group is carried out automatically by the LVM. In performance-critical applications, however, care can be taken to ensure that simultaneous disk accesses are distributed to different physical volumes in order to optimize the movement of the read and write heads. In addition, it is common practice to control the distribution in such a way that a logical volume is not distributed over too many physical volumes. This can limit the effects of a hard drive failure. LVMs usually have corresponding commands to check and change the distribution of data on the physical volumes during operation.

RAID support through the LVM

Many LVMs support the organization of the logical volumes as a RAID network, so that the data can be protected against disk failures or access is accelerated. As a rule, the operating system manufacturers only implement joint management functions which control the largely independent volume managers and software raid implementations. The designation software raid (also SoftRAID ) comes from the fact that this procedure works without additional hardware. Depending on the system, RAID 0 (striping, no protection against disk failure) and RAID 1 (mirroring, mirroring) are typically supported. In some more experienced implementations, the LVMs also support RAID 5 ( redundancy through parity formation ). Since the latter also requires significant computing capacity, it is only an option with adequately equipped systems. In some systems (e.g. HP-UX or Linux ) software RAID and LVM are optional extensions and can be installed and used completely independently of one another. Some manufacturers therefore license volume management and RAID (mirroring and / or RAID 5) separately.

The ZFS integrated in Solaris and the free btrfs show a noticeably different, but also criticized, approach . Both implement a combination of a highly developed file system with LVM and software RAID in one piece. The RAID subsystem integrated in the file system offers the advantage over classic hardware or software raid implementations, for example, that the integrated RAID system can differentiate between occupied and free data blocks and thus only occupied disk space when reconstructing a raid volume must be mirrored, this results in an enormous time saving in the event of damage, especially with less full file systems.

Differentiation between LVM and RAID

The mode of operation of a Logical Volume Manager is often mixed up with that of a RAID system. There is a clear demarcation here. Real RAID systems always offer redundancy (except for RAID-0) and consequently always have a RAID engine that generates the additional data streams required for redundancy. The most common engine variants are data duplication with RAID 1 and XOR formation with RAID 5 and most other methods. With RAID, a considerable amount of additional data is always generated, so the data throughput of the RAID engine is an important performance factor.

The task of an LVM is to map physical volumes to logical ones. One of the most common use cases is the subsequent enlargement of partitions and file systems that are managed by the LVM. An LVM does not generate any additional data streams; it also has no engine and therefore offers no redundancy, so it only generates minimal computational effort. Therefore it has practically no influence on the performance (although some systems also have RAID 0 expansions integrated into the LVM implementation ). The main task of the LVM is to distribute the data streams from the file systems to the associated physical data carriers; it is most similar to how an MMU works . A RAID system also distributes data streams, but for redundancy reasons it always generates one or more additional data streams.

Physical and Logical Extents

The physical extent (also: physical partition depending on the implementation ) is the storage unit in which the volume group data is organized. The size of a logical volume always corresponds to a multiple of the size of a physical extent in the volume group.

The logical extent (also implementation- dependent : logical partition ) summarizes the number of mirrors in LVMs that support the mirroring of logical volumes on multiple hard drives. If there are two mirror halves, one logical extent corresponds to two physical extents. In LVM implementations that do not support mirroring, a logical extent always corresponds to exactly one physical extent.

Operating systems with LVM support

AIX , HP-UX , Tru64 UNIX
Complete LVM support with mirroring and online expansion of logical volumes. The latter also require a license under HP-UX (MirrorDisk UX, OnlineJFS) and Tru64 (AdvFS, LSM).
Linux
LVM implementation (written by Heinz Mauelshagen in 1998), which is based heavily on HP-UX in terms of operation. Online enlargement is possible with the following file systems, among others: ext2 , ext3 , and ext4 , JFS , ReiserFS v3 and XFS . The mirroring of the logical volumes is also possible and independent of the file system used. In addition to the LVM implementation from Red Hat (formerly Sistina), there is also an implementation from IBM, EVMS , which in addition to LVM also supports almost all other mass storage tasks (partitioning, RAID, file system management). Since kernel 2.6, LVM has been based on the device mapper .
Solaris
In 1991, the Online DiskSuite (ODS) was presented as an additional product for SunOS, which was then renamed Solstice DiskSuite (SDS). As of Solaris 8, the name was changed again to Solaris Volume Manager (SVM) and has been part of the operating system ever since . As of Solaris 10, ZFS pooled storage can also be used. ZFS implements a combination of a highly developed file system with LVM and software RAID from a single source. This means that disks or disk areas are assigned to a storage pool. The file systems (ZFS) are created directly in this storage pool. Storage pool and file systems can be expanded dynamically.
IRIX
Both the old XLV and the new XVM LVM are supplied with IRIX 6.5, but an additional license (plexing license) is required to set up mirrors.
OS / 2 , eComStation
With the introduction of the JFS in 2000, an LVM was also introduced. Management can take place via a command line (CLI) or a graphical user interface (GUI). The OS / 2 port of JFS was the basis for JFS2.
Windows 2000 and higher
Here the logical volume management corresponds roughly to the management of dynamic data carriers . The logical volume management integrated in all newer versions at the factory requires the NTFS file system . It supports the mirroring as well as the online expansion of logical volumes, which the manufacturer calls dynamic volumes .
FreeBSD , NetBSD , OpenBSD
Vinum or Gvinum is an LVM that was inspired by the Veritas Volume Manager , but is not based on it. It was initially developed for FreeBSD and is included in its scope of delivery from version 3.0-RELEASE; now there are also NetBSD and OpenBSD versions. The raid levels 0, 1, 5 and JBOD are supported. The name is derived from the Latin proverb ' in vino veritas ' ( Vino is the ablative of Vinum ) and means, loosely translated, “There is truth in wine”.
macOS
An LVM under the name CoreStorage has been implemented since Mac OS X Lion . Initially, only Apple's FileVault (2nd generation) was supported for full hard disk encryption. For OS X Mountain Lion , CoreStorage has been expanded to include tiering support. Apple's so-called Fusion Drive connects an SSD and a hard disk to a logical drive, in which the SSD is used as a buffer memory.

Other LVM support

Veritas Volume Manager
Support of various operating systems such as HP-UX, Linux, Solaris and Windows including a command line-oriented and a graphic interface. Veritas also offers a Cluster Volume Manager , which enables logical volume management in clusters . Both volume managers require a license.
Oracle Automatic Storage Management (ASM)
Support of logical volumes for Oracle databases including disk striping and mirroring. The data is distributed in so-called stripes not based on the amount of data, but according to the I / O load. This load is stored and evaluated via an internal repository (Automatic Workload Repository, AWR for short). ASM is provided free of charge with the Oracle database software.

history

There have been LVM implementations for Linux operating systems since 1997. Since 2002 there has been a new metadata format called LVM2 with a set of associated new command line programs. At the beginning of the work on kernel version 2.5, in addition to the Enterprise Volume Management System (EVMS) from IBM, there was a second implementation of an LVM that was finally adopted for kernel 2.6. However, EVMS offers more extensive capabilities and then lived on without its own kernel parts as a user mode frontend to LVM2 and was finally abandoned in 2006.

Web links

Individual evidence

  1. Comparison of dynamic memory and basic memory in Windows 2000 and Windows XP
  2. os2voice.org
  3. The Vinum Volume Manager - (Accessed: September 24, 2013)
  4. arstechnica.com
  5. blog.fosketts.net
  6. Understanding Apple's Fusion Drive
  7. haifux.org