2012-10-12 16:37:57 +04:00
.TH "BLKDEACTIVATE" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
.SH "NAME"
2014-06-11 13:06:30 +04:00
blkdeactivate \(em utility to deactivate block devices
2012-10-12 16:37:57 +04:00
.SH SYNOPSIS
.B blkdeactivate
2017-03-27 17:45:48 +03:00
.RB [ -d \ \fIdm_options\fP ]
.RB [ -e ]
.RB [ -h ]
.RB [ -l \ \fIlvm_options\fP ]
.RB [ -m \ \fImpath_options\fP ]
2017-09-21 16:04:45 +03:00
.RB [ -r \ \fImdraid_options\fP ]
2020-04-09 16:23:58 +03:00
.RB [ -o \ \fIvdo_options\fP ]
2017-03-27 17:45:48 +03:00
.RB [ -u ]
.RB [ -v ]
2014-11-19 02:35:04 +03:00
.RI [ device ]
2012-10-12 16:37:57 +04:00
.SH DESCRIPTION
2017-03-14 17:55:36 +03:00
The blkdeactivate utility deactivates block devices. For mounted
block devices, it attempts to unmount it automatically before
2012-10-12 16:37:57 +04:00
trying to deactivate. The utility currently supports
2017-03-27 17:45:48 +03:00
device-mapper devices (DM), including LVM volumes and
2015-10-06 14:25:37 +03:00
software RAID MD devices. LVM volumes are handled directly
2017-03-27 17:45:48 +03:00
using the \fBlvm\fP(8) command, the rest of device-mapper
2015-10-06 14:25:37 +03:00
based devices are handled using the \fBdmsetup\fP(8) command.
MD devices are handled using the \fBmdadm\fP(8) command.
2012-10-12 16:37:57 +04:00
.SH OPTIONS
2014-06-10 21:32:39 +04:00
.TP
2017-09-21 18:03:42 +03:00
.BR -d ", " --dmoptions \ \fIdm_options\fP
2017-03-27 17:45:48 +03:00
Comma separated list of device-mapper specific options.
2014-11-19 02:35:04 +03:00
Accepted \fBdmsetup\fP(8) options are:
.RS
.IP \fIretry\fP
Retry removal several times in case of failure.
.IP \fIforce\fP
Force device removal.
.RE
.TP
2017-03-27 17:45:48 +03:00
.BR -e ", " --errors
2014-11-19 02:35:04 +03:00
Show errors reported from tools called by \fBblkdeactivate\fP. Without this
option, any error messages from these external tools are suppressed and the
2017-03-14 17:55:36 +03:00
\fBblkdeactivate\fP itself provides only a summary message to indicate
the device was skipped.
2014-06-10 21:32:39 +04:00
.TP
2017-03-27 17:45:48 +03:00
.BR -h ", " --help
2012-10-12 16:37:57 +04:00
Display the help text.
2014-06-10 21:32:39 +04:00
.TP
2017-09-21 18:03:42 +03:00
.BR -l ", " --lvmoptions \ \fIlvm_options\fP
2017-03-27 17:45:48 +03:00
Comma-separated list of LVM specific options:
2014-11-19 02:35:04 +03:00
.RS
.IP \fIretry\fP
Retry removal several times in case of failure.
.IP \fIwholevg\fP
Deactivate the whole LVM Volume Group when processing a Logical Volume.
2017-03-14 17:55:36 +03:00
Deactivating the Volume Group as a whole is quicker than deactivating
each Logical Volume separately.
2014-11-19 02:35:04 +03:00
.RE
.TP
2017-09-21 18:03:42 +03:00
.BR -m ", " --mpathoptions \ \fImpath_options\fP
2017-03-27 17:45:48 +03:00
Comma-separated list of device-mapper multipath specific options:
2016-07-12 10:52:18 +03:00
.RS
.IP \fIdisablequeueing\fP
2017-03-14 17:55:36 +03:00
Disable queueing on all multipath devices before deactivation.
2016-07-12 10:52:18 +03:00
This avoids a situation where blkdeactivate may end up waiting if
2017-03-27 17:45:48 +03:00
all the paths are unavailable for any underlying device-mapper multipath
2016-07-12 10:52:18 +03:00
device.
.RE
.TP
2017-09-22 12:10:57 +03:00
.BR -r ", " --mdraidoptions \ \fImdraid_options\fP
2017-09-21 16:04:45 +03:00
Comma-separated list of MD RAID specific options:
.RS
.IP \fIwait\fP
Wait MD device's resync, recovery or reshape action to complete
before deactivation.
.RE
2020-04-09 16:23:58 +03:00
.TP
.BR -o ", " --vdooptions \ \fIvdo_options\fP
Comma-separated list of VDO specific options:
.RS
.IP \fIconfigfile=file\fP
Use specified VDO configuration file.
.RE
2017-09-21 16:04:45 +03:00
.TP
2017-03-27 17:45:48 +03:00
.BR -u ", " --umount
2012-10-12 16:37:57 +04:00
Unmount a mounted device before trying to deactivate it.
Without this option used, a device that is mounted is not deactivated.
2014-06-10 21:32:39 +04:00
.TP
2017-03-27 17:45:48 +03:00
.BR -v ", " --verbose
Run in verbose mode. Use --vv for even more verbose mode.
2012-10-12 16:37:57 +04:00
.SH EXAMPLES
2017-03-14 17:55:36 +03:00
.
Deactivate all supported block devices found in the system, skipping mounted
devices.
.BR
#
2012-10-12 16:37:57 +04:00
.B blkdeactivate
2017-03-14 17:55:36 +03:00
.BR
.P
Deactivate all supported block devices found in the system, unmounting any
mounted devices first, if possible.
.BR
#
2017-03-27 17:45:48 +03:00
.B blkdeactivate -u
2017-03-14 17:55:36 +03:00
.BR
.P
Deactivate the device /dev/vg/lvol0 together with all its holders, unmounting
any mounted devices first, if possible.
.BR
#
2017-03-27 17:45:48 +03:00
.B blkdeactivate -u /dev/vg/lvol0
2017-03-14 17:55:36 +03:00
.BR
.P
Deactivate all supported block devices found in the system. If the deactivation
2017-03-27 17:45:48 +03:00
of a device-mapper device fails, retry it. Deactivate the whole
2012-10-12 16:37:57 +04:00
Volume Group at once when processing an LVM Logical Volume.
2017-03-14 17:55:36 +03:00
.BR
#
2017-03-27 17:45:48 +03:00
.B blkdeactivate -u -d retry -l wholevg
2017-03-14 17:55:36 +03:00
.BR
.P
Deactivate all supported block devices found in the system. If the deactivation
2017-03-27 17:45:48 +03:00
of a device-mapper device fails, retry it and force removal.
2017-03-14 17:55:36 +03:00
.BR
#
2017-03-27 17:45:48 +03:00
.B blkdeactivate -d force,retry
2017-03-14 17:55:36 +03:00
.
2012-10-12 16:37:57 +04:00
.SH SEE ALSO
2014-11-19 02:35:04 +03:00
.BR dmsetup (8),
.BR lsblk (8),
.BR lvm (8),
2015-10-06 14:25:37 +03:00
.BR mdadm (8),
2016-07-12 10:52:18 +03:00
.BR multipathd (8),
2020-04-09 16:23:58 +03:00
.BR vdo (8),
2012-10-12 16:37:57 +04:00
.BR umount (8)