Crate devicemapper [−] [src]
Low-level devicemapper configuration of the running kernel.
Overview
Linux's devicemapper allows the creation of block devices whose storage is mapped to other block devices in useful ways, either by changing the location of its data blocks, or performing some operation on the data itself. This is a low-level facility that is used by higher-level volume managers such as LVM2. Uses may include:
- Dividing a large block device into smaller logical volumes (dm-linear)
- Combining several separate block devices into a single block device with better performance and/or redundancy (dm-raid)
- Encrypting a block device (dm-crypt)
- Performing Copy-on-Write (COW) allocation of a volume's blocks enabling fast volume cloning and snapshots (dm-thin)
- Configuring a smaller, faster block device to act as a cache for a larger, slower one (dm-cache)
- Verifying the contents of a read-only volume (dm-verity)
Usage
Before they can be used, DM devices must be created using
DM::device_create(), have a mapping table loaded using
DM::table_load(), and then activated with
DM::device_suspend(). (This function is used for both suspending
and activating a device.) Once activated, they can be used as a
regular block device, including having other DM devices map to
them.
Devices have "active" and "inactive" mapping tables. See function descriptions for which table they affect.
Modules
| consts |
shared constants |
| device | |
| deviceinfo | |
| dm | |
| lineardev |
functions to create continuous linear space given device segments |
| result |
return results container |
| segment |
struct to represent a location, offset and size of a set of disk sectors |
| thindev |
allocate a device from a pool |
| thinpooldev |
thinpooldev is shared space for other thin provisioned devices to use |
| types |
basic types (Bytes, Sectors, DataBlocks) |
| util |
public utilities |