BLKDEACTIVATE(8)
๐ BLKDEACTIVATE ๐
okay so bestie, this is a page from the System Manager's Manual โ it's the blkdeactivate manual, section 8. she's a little utility but she's literally the cleanup crew of your block device world, no cap. let's get into it โจ
๐ธ NAME ๐ธ
blkdeactivate โ the utility that deactivates block devices. yes she's that girl, and yes she says bye to your devices so they don't linger like an unread group chat ๐
๐ SYNOPSIS ๐
blkdeactivate [-d|--dmoptions dm_options] [-e|--errors] [-h|--help]
[-l|--lvmoptions lvm_options]
[-r|--mdraidoptions mdraid_options]
[-m|--mpathoptions mpath_options] [-u|--umount]
[-o|--vdooptions vdo_options] [-v|--verbose] [device]
like, that's the whole vibe. one utility, a bunch of optional flags, and optionally one [device] to target ๐
๐ฆ DESCRIPTION ๐ฆ
so the blkdeactivate utility deactivates block devices. periodt.
for mounted block devices, she attempts to unmount them automatically before she tries to deactivate them โ she's polite like that, she doesn't just yank the cord ๐ซถ
here's who she currently supports:
- device-mapper devices (DM), including LVM volumes ๐
- software RAID MD devices ๐
and here's the backstage crew handling the actual drama:
- LVM volumes are handled directly using the
lvm(8)command - the rest of device-mapper based devices are handled using the
dmsetup(8)command - MD devices are handled using the
mdadm(8)command
iykyk. she's basically the manager directing the talent โจ
โจ OPTIONS โจ
-d|--dmoptions dm_optionsโ a comma separated list of device-mapper specific options. the accepteddmsetup(8)options are:retryโ retry removal several times in case of failure. she's persistent fr fr ๐ชforceโ force device removal. no more negotiating ๐ค
-e|--errorsโ show errors reported from tools called byblkdeactivate. without this option, any error messages from these external tools are suppressed andblkdeactivateitself provides only a summary message to indicate the device was skipped. so like, silent treatment mode is the default ๐-h|--helpโ display the help text. classic.-l|--lvmoptions lvm_optionsโ comma-separated list of LVM specific options:retryโ retry removal several times in case of failure.wholevgโ deactivate the whole LVM Volume Group when processing a Logical Volume. deactivating the Volume Group as a whole is quicker than deactivating each Logical Volume separately. efficiency queen ๐
-r|--mdraidoptions mdraid_optionsโ comma-separated list of MD RAID specific options:waitโ wait for MD device's resync, recovery or reshape action to complete before deactivation. sit still and let her cook ๐
-m|--mpathoptions mpath_optionsโ comma-separated list of device-mapper multipath specific options:disablequeueingโ disable queueing on all multipath devices before deactivation. this avoids a situation whereblkdeactivatemay end up waiting if all the paths are unavailable for any underlying device-mapper multipath device. lowkey a lifesaver ๐ง
-u|--umountโ unmount a mounted device before trying to deactivate it. without this option, a device that is mounted is not deactivated. so if you want the unmount energy, you gotta ask for it ๐-o|--vdooptions vdo_optionsโ comma-separated list of VDO specific options:configfile=fileโ use specified VDO configuration file. bring your own config, main character move ๐
-v|--verboseโ run in verbose mode. use-vvfor even more verbose mode. she will tell you everything ๐
๐ EXAMPLES ๐
deactivate all supported block devices found in the system, skipping mounted devices.
blkdeactivate
deactivate all supported block devices found in the system, unmounting any mounted devices first, if possible.
blkdeactivate -u
deactivate the device /dev/vg/lvol0 together with all its holders, unmounting any mounted devices first, if possible.
blkdeactivate -u /dev/vg/lvol0
deactivate all supported block devices found in the system. if the deactivation of a device-mapper device fails, retry it. deactivate the whole Volume Group at once when processing an LVM Logical Volume.
blkdeactivate -u -d retry -l wholevg
deactivate all supported block devices found in the system. if the deactivation of a device-mapper device fails, retry it and force removal.
blkdeactivate -d force,retry
๐ SEE ALSO ๐
lsblk(8), mdadm(8), multipathd(8), vdo(8), umount(8)
bestie reminder: this page is brought to you by Red Hat, Inc. โ LVM TOOLS 2.03.44(2) dated 2026-10-27. she's been around, she's iconic, and she's got the receipts ๐โจ slay, go deactivate responsibly ๐
๐ฆ where this page comes from
- arch rolling: device-mapper 2.03.44-1 ยท GPL-2.0-only AND LGPL-2.1-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms