1BLKDEACTIVATE(8) BLKDEACTIVATE(8)
2
3
4
6 blkdeactivate — utility to deactivate block devices
7
9 blkdeactivate [-d dm_options] [-e] [-h] [-l lvm_options] [-m mpath_op‐
10 tions] [-r mdraid_options] [-o vdo_options] [-u] [-v] [device]
11
13 The blkdeactivate utility deactivates block devices. For mounted block
14 devices, it attempts to unmount it automatically before trying to deac‐
15 tivate. The utility currently supports device-mapper devices (DM), in‐
16 cluding LVM volumes and software RAID MD devices. LVM volumes are han‐
17 dled directly using the lvm(8) command, the rest of device-mapper based
18 devices are handled using the dmsetup(8) command. MD devices are han‐
19 dled using the mdadm(8) command.
20
22 -d, --dmoptions dm_options
23 Comma separated list of device-mapper specific options. Ac‐
24 cepted dmsetup(8) options are:
25
26 retry Retry removal several times in case of failure.
27
28 force Force device removal.
29
30 -e, --errors
31 Show errors reported from tools called by blkdeactivate. Without
32 this option, any error messages from these external tools are
33 suppressed and the blkdeactivate itself provides only a summary
34 message to indicate the device was skipped.
35
36 -h, --help
37 Display the help text.
38
39 -l, --lvmoptions lvm_options
40 Comma-separated list of LVM specific options:
41
42 retry Retry removal several times in case of failure.
43
44 wholevg
45 Deactivate the whole LVM Volume Group when processing a
46 Logical Volume. Deactivating the Volume Group as a whole
47 is quicker than deactivating each Logical Volume sepa‐
48 rately.
49
50 -m, --mpathoptions mpath_options
51 Comma-separated list of device-mapper multipath specific op‐
52 tions:
53
54 disablequeueing
55 Disable queueing on all multipath devices before deacti‐
56 vation. This avoids a situation where blkdeactivate may
57 end up waiting if all the paths are unavailable for any
58 underlying device-mapper multipath device.
59
60 -r, --mdraidoptions mdraid_options
61 Comma-separated list of MD RAID specific options:
62
63 wait Wait MD device's resync, recovery or reshape action to
64 complete before deactivation.
65
66
67 -o, --vdooptions vdo_options
68 Comma-separated list of VDO specific options:
69
70 configfile=file
71 Use specified VDO configuration file.
72
73
74 -u, --umount
75 Unmount a mounted device before trying to deactivate it. With‐
76 out this option used, a device that is mounted is not deacti‐
77 vated.
78
79 -v, --verbose
80 Run in verbose mode. Use --vv for even more verbose mode.
81
83 Deactivate all supported block devices found in the system, skipping
84 mounted devices. # blkdeactivate
85
86 Deactivate all supported block devices found in the system, unmounting
87 any mounted devices first, if possible. # blkdeactivate -u
88
89 Deactivate the device /dev/vg/lvol0 together with all its holders, un‐
90 mounting any mounted devices first, if possible. # blkdeactivate -u
91 /dev/vg/lvol0
92
93 Deactivate all supported block devices found in the system. If the de‐
94 activation of a device-mapper device fails, retry it. Deactivate the
95 whole Volume Group at once when processing an LVM Logical Volume. #
96 blkdeactivate -u -d retry -l wholevg
97
98 Deactivate all supported block devices found in the system. If the de‐
99 activation of a device-mapper device fails, retry it and force removal.
100 # blkdeactivate -d force,retry
101
103 dmsetup(8), lsblk(8), lvm(8), mdadm(8), multipathd(8), vdo(8),
104 umount(8)
105
106
107
108Red Hat, Inc LVM TOOLS 2.03.11(2) (2021-01-08) BLKDEACTIVATE(8)