LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

dmsetup

device-mapper low-level administration

TLDR

List all device mapper devices
$ dmsetup ls
copy
Show device status
$ dmsetup status [device_name]
copy
Show detailed information
$ dmsetup info
copy
Show device table
$ dmsetup table [device_name]
copy
Create a device mapper target
$ dmsetup create [name] --table "[0 size linear /dev/sda 0]"
copy
Remove a device
$ dmsetup remove [device_name]
copy
Suspend a device
$ dmsetup suspend [device_name]
copy

SYNOPSIS

dmsetup command [options] [devicename_]

DESCRIPTION

dmsetup is the low-level administration tool for the Linux device-mapper. Device-mapper provides a generic way to create virtual block devices that map onto physical devices through various target types.The tool can create, configure, and manage device-mapper devices including linear mappings, striped volumes, snapshots, mirrors, and more. It's the foundation underlying LVM, dm-crypt, and other Linux storage technologies.While typically used indirectly through LVM or cryptsetup, dmsetup provides direct access for debugging, custom configurations, or understanding device-mapper internals.

PARAMETERS

COMMAND

Operation: ls, status, info, table, create, remove, etc.
ls
List device mapper devices.
status [DEVICE]
Show device status.
info [DEVICE]
Show detailed information.
table [DEVICE]
Show device table.
create NAME
Create new device.
remove DEVICE
Remove device.
suspend/resume DEVICE
Suspend/resume device.
--table TABLE
Device table specification.

INSTALL

sudo apt install dmsetup
copy
sudo dnf install device-mapper
copy
sudo pacman -S device-mapper
copy
sudo apk add device-mapper
copy
sudo zypper install device-mapper
copy
brew install device-mapper
copy

CAVEATS

Requires root privileges. Incorrect use can cause data loss. Tables must specify valid targets and parameters. Some operations require suspended devices.

HISTORY

dmsetup is part of the device-mapper component of LVM2, developed primarily by Red Hat and Sistina Software. Device-mapper was merged into the Linux kernel in 2003, providing the foundation for flexible storage management.

SEE ALSO

lvm(8), cryptsetup(8), dmraid(8)

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid