.TH "BLKDEACTIVATE" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
.SH "NAME"
blkdeactivate \(em utility to deactivate block devices
.SH SYNOPSIS
.B blkdeactivate
.RB [ \-d \  \fIdm_options\fP ]
.RB [ \-e ]
.RB [ \-h ]
.RB [ \-l \  \fIlvm_options\fP ]
.RB [ \-m \  \fImpath_options\fP ]
.RB [ \-u ]
.RB [ \-v ]
.RI [ device ]
.SH DESCRIPTION
blkdeactivate utility deactivates block devices. If a device
is mounted, the utility can unmount it automatically before
trying to deactivate. The utility currently supports
device-mapper devices (DM), including LVM volumes and
software RAID MD devices. LVM volumes are handled directly
using the \fBlvm\fP(8) command, the rest of device-mapper
based devices are handled using the \fBdmsetup\fP(8) command.
MD devices are handled using the \fBmdadm\fP(8) command.
.SH OPTIONS
.TP
.BR \-d ", " \-\-dmoption \ \fIdm_options\fP
Comma separated list of device-mapper specific options.
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
.BR \-e ", " \-\-errors
Show errors reported from tools called by \fBblkdeactivate\fP. Without this
option, any error messages from these external tools are suppressed and the
\fBblkdeactivate\fP itself provides only a summary message about device being
skipped or not.
.TP
.BR \-h ", " \-\-help
Display the help text.
.TP
.BR \-l ", " \-\-lvmoption \ \fIlvm_options\fP
Comma separated list of LVM specific options:
.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.
Deactivating Volume Group as a whole takes less time than deactivating each
Logical Volume separately.
.RE
.TP
.BR \-m ", " \-\-mpathoption \ \fImpath_options\fP
Comma separated list of device-mapper multipath specific options:
.RS
.IP \fIdisablequeueing\fP
Disable queueing on all multipath devices first before deactivation.
This avoids a situation where blkdeactivate may end up waiting if
all paths are unavailable for any underlying device-mapper multipath
device.
.RE
.TP
.BR \-u ", " \-\-umount
Unmount a mounted device before trying to deactivate it.
Without this option used, a device that is mounted is not deactivated.
.TP
.BR \-v ", " \-\-verbose
Run in verbose mode. Use \-\-vv for even more verbose mode.
.SH EXAMPLES
.sp
Deactivate all supported block devices found in the system. If a device
is mounted, skip its deactivation.
.sp
.B blkdeactivate

Deactivate all supported block devices found in the system. If a device
is mounted, unmount it first if possible.
.sp
.B blkdeactivate \-u

Deactivate supplied device together with all its holders. If any of the
devices processed is mounted, unmount it first if possible.
.sp
.B blkdeactivate \-u /dev/vg/lvol0

Deactivate all supported block devices found in the system. Retry deactivation
of device-mapper devices in case the deactivation fails. Deactivate the whole
Volume Group at once when processing an LVM Logical Volume.
.sp
.B blkdeactivate \-u \-d retry \-l wholevg

Deactivate all supported block devices found in the system. Retry deactivation
of device-mapper devices in case the deactivation fails and force removal.
.sp
.B blkdeactivate \-d force,retry

.SH SEE ALSO
.BR dmsetup (8),
.BR lsblk (8),
.BR lvm (8),
.BR mdadm (8),
.BR multipathd (8),
.BR umount (8)
