Pcornel
Browse topics
Options
Recent
Favorites
Storage · Technical reference

device-mapper

Direct answer

Device-mapper is the Linux kernel framework that creates virtual block devices from other devices. LVM, dm-crypt (LUKS), dm-multipath and thin provisioning are all built on it; inspect with dmsetup.

When to use this

Use this when tracing LVM, LUKS, multipath or thin devices through device-mapper.

First 30 seconds

1. device-mapper underlies LVM, LUKS, multipath, thin, cache.

2. dm-N devices map to targets.

3. dmsetup inspects/repairs carefully.

4. Stuck devices: check holders before removal.

5. Prefer higher-level tools.

Operational verification

dm target → mapping → underlying devices

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common problems
  • device or resource busy when removing a disk — something still maps it (dmsetup ls --tree, lsblk).
  • Stale device-mapper entries after LUN removal — dmsetup remove, then remove the SCSI device.
  • Wrong order when removing stacked devices (unmount → LVM → LUKS → multipath → disk).
Platform / version applicability
Linux Storage
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformLinux Storage
Scope / prerequisiteUse this when tracing LVM, LUKS, multipath or thin devices through device-mapper.
What next?2 suggested next steps
Evidence1
On this pageJump to a specific section
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • dm devices appear as /dev/dm-N and /dev/mapper/name.
  • dmsetup shows tables and dependencies.
  • Stacking order matters for removal.
Key checks
  • dmsetup ls --tree — dm stack
  • dmsetup table — mappings
  • dmsetup status — target status
ReferenceHow it works1 section · depth on demand

Device-mapper users

TargetUsed by
linear / stripedLVM
thin / thin-poolLVM thin
snapshotLVM snapshots
multipathdm-multipath
cryptLUKS/dm-crypt
raidLVM RAID
cache / writecachelvmcache, dm-writecache
dmsetup ls --tree
dmsetup table
dmsetup info -c
ReferenceImportant terms & boundaries1 section · depth on demand

In depth

device-mapper is the kernel framework that builds virtual block devices from tables of targets: linear, striped, mirror/raid, thin, crypt (LUKS), multipath, snapshot, cache, vdo. LVM, cryptsetup, multipath and Docker's devicemapper driver all use it.

dmsetup ls --tree
dmsetup table vg_data-lv_app        # e.g. 0 419430400 linear 8:16 2048
dmsetup status
dmsetup info -c

A table line reads: start sector, length in sectors, target type, target arguments. dmsetup remove of a busy device fails; find the holder in /sys/block/dm-N/holders or with lsof.

ReferenceConfiguration & state1 section · depth on demand
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docLinux Storage current

Authoritative/upstream documentation reviewed for bounded claims in Linux Storage → device-mapper. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://docs.kernel.org/block/index.html · confidence 94%
Confirmation

Confirm action

Continue?