EXAM OBJECTIVES COVERED
1.4 Given a scenario, manage storage in a Linux environment.
4.1 Given a scenario, analyze system properties and remediate accordingly.
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.
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.