Skip to main content
Engineering LibreTexts

04-B.9: Logical Volume Management

  • Page ID
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    1.4 Given a scenario, manage storage in a Linux environment.
    4.1 Given a scenario, analyze system properties and remediate accordingly.

    Device Mapper

    The device mapper is a framework provided by the Linux kernel for mapping physical block devices onto higher-level virtual block devices. It forms the foundation of the logical volume manager (LVM), software RAIDs and dm-crypt disk encryption, and offers additional features such as file system snapshots.

    In Linux the device mapper creates the virtual device, then passes data from the virtual device to one of the physical devices that make up the virtual device. Data can be also modified in transition, which is performed, for example, in the case of device mapper providing disk encryption or simulation of unreliable hardware behavior.

    The /dev/mapper/ Directory

    The /dev/mapper/ directory is where you will find all of the logical volumes on the system that are managed by LVM. The devices listed in this directory are typically formatted as: /dev/mapper/<volume group name>-<logical volume name> . In some cases, this directory may just include links to the actual logical volume location.


    DM-Multipath provides input-output fail-over and load-balancing by using multiple data paths for Linux storage devices. By utilizing device-mapper, multiple paths on a redundant network are used to provide continuous availability and higher-bandwidth connectivity between the host server and the storage device. DM-Multipath handles the rerouting of data to an alternate path in the event of a path failure. DM-Multipath can also balance the data transmission load across all of the available network paths. DM-Multipath is based on the device mapper, which provides the basic framework that maps one block device onto another.

    A multipath storage systems - 2 network connections to provide redundancy.The server has 2 interfaces, each connection to a different switch, and the switches are connected to separate controllers on the storage device. THis provides true redundancy - there is NOT a single point of failure.
    Figure \(\PageIndex{1}\): Simple example of hardware RAID. ("Multipath_simple_example1.jpg" by 3itrekkerWikimedia is in the Public Domain, CC0)

    Without DM Multipath, each path from a server node to a storage controller is treated by the system as a separate device, even when the I/O path connects the same server node to the same storage controller. DM Multipath provides a way of organizing the I/O paths logically, by creating a single multipath device on top of the underlying devices.

    In the image on the right, the server has 2 hosts bus adapters (HBA1, HBA2) that connect the server to a fiber channel network. Each connection goes through a different switch, and a different controller on the other end, where the storage devices are located. This provides redundant connections in case one network connect fails. It also provides for the ability to perform load balancing if necessary to improve performance.

    The mdadm Command

    mdadm is a Linux utility used to manage software RAID devices. The name is derived from the md (multiple device) device nodes it administers.

    Redundant Array of Independent Disks (RAID) is a storage technology that combines multiple disk drive components (typically disk drives or partitions thereof) into a logical unit. Depending on the RAID implementation, this logical unit can be a file system or an additional transparent layer that can hold several partitions. Data is distributed across the drives in one of several ways called #RAID levels, depending on the level of redundancy and performance required. The RAID level chosen can thus prevent data loss in the event of a hard disk failure, increase performance, or a combination of both.

    Adapted from:
    "Linux DM Multipath" by Multiple ContributorsWikipedia is licensed under CC BY-SA 3.0

    04-B.9: Logical Volume Management is shared under a CC BY-SA 4.0 license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?