Английская Википедия:Device mapper

Материал из Онлайн справочника
Перейти к навигацииПерейти к поиску

Шаблон:Short description 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.[1]

Device mapper works by passing data from a virtual block device, which is provided by the device mapper itself, to another block 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.

This article focuses on the device mapper implementation in the Linux kernel, but the device mapper functionality is also available in both NetBSD and DragonFly BSD.[2][3]

Usage

Applications (like LVM2 and Enterprise Volume Management System (EVMS)) that need to create new mapped devices talk to the device mapper via the libdevmapper.so shared library, which in turn issues ioctls to the /dev/mapper/control device node.[4] Configuration of the device mapper can be also examined and configured interactivelyШаблон:Mdashbor from shell scriptsШаблон:Mdashbby using the Шаблон:Man utility.[5][6]

Both of these two userspace components have their source code maintained alongside the LVM2 source.[7]

Features

Файл:The Linux Storage Stack Diagram.svg
The position of the device mapper targets within various layers of the Linux kernel's storage stack.[8]

Functions provided by the device mapper include linear, striped and error mappings, as well as crypt and multipath targets. For example, two disks may be concatenated into one logical volume with a pair of linear mappings, one for each disk. As another example, crypt target encrypts the data passing through the specified device, by using the Linux kernel's Crypto API.[1]

Шаблон:As of, the following mapping targets are available:[1][5]

Шаблон:AnchorApplications

Linux kernel features and projects built on top of the device mapper include the following:

References

Шаблон:Reflist

External links

Шаблон:Linux kernel Шаблон:Linux Шаблон:Operating system