Crate devicemapper [−] [src]
Low-level devicemapper configuration of the running kernel.
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)
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
Devices have "active" and "inactive" mapping tables. See function descriptions for which table they affect.
Structure to represent bytes
Context needed for communicating with devicemapper.
A type for Data Blocks as used by the thin pool.
A struct containing the device's major and minor numbers
A DM construct of combined Segments
A separate type to store counts and offsets expressed in 512-byte sectors.
struct to represent a continuous set of sectors on a disk
DM construct for a thin block device
Contains values indicating the thinpool's used vs total allocations for metadata and data blocks.
DM construct to contain thin provisioned devices
Used as a parameter for functions that take either a Device name or a Device UUID.
Define a common error enum. See http://blog.burntsushi.net/rust-error-handling/
Top-level thinpool status that indicates if it is working or failed.
Indicates if a working thinpool is working optimally, or is experiencing a non-fatal error condition.
Thin device status.
return result for DM functions