Skip to contentSkip to conversation

master - blkdeactivate: add -m|--mpathoption disablequeueing and use it for blk-availability systemd service and initscript

PATCH Peter Rajnoha 1 participant 1 message Jul 12, 2016

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=42e76a1920c9ee1ae13a3ca4ba2fdd96cad8fe3f
Commit:        42e76a1920c9ee1ae13a3ca4ba2fdd96cad8fe3f
Parent:        9f7e8f22dc42576875a436dee0034d37f89c468c
Author:        Peter Rajnoha <[email protected]>
AuthorDate:    Tue Jul 12 09:52:18 2016 +0200
Committer:     Peter Rajnoha <[email protected]>
CommitterDate: Tue Jul 12 10:01:07 2016 +0200

blkdeactivate: add -m|--mpathoption disablequeueing and use it for blk-availability systemd service and initscript

blkdeactivate -m disablequeueing causes "multipathd disablequeueing maps" call inside blkdeactivate script before deactivating devices. This avoids a situation where blkdeactivate may wait for paths to appear if multipath is set to queueing and there's a stack of other devices and/or mount points on top of such multipath device.

See also https://bugzilla.redhat.com/show_bug.cgi?id=1344381.

---
 WHATS_NEW_DM                                       |    2 +
 man/blkdeactivate.8.in                             |   12 ++++
 scripts/blk_availability_init_red_hat.in           |    2 +-
 .../blk_availability_systemd_red_hat.service.in    |    2 +-
 scripts/blkdeactivate.sh.in                        |   58 ++++++++++++++++----
 5 files changed, 64 insertions(+), 12 deletions(-)
WHATS_NEW_DM +2 -0
index 40452a1..a1d41b4 100644
@@ -1,5 +1,7 @@
 Version 1.02.131 -
 ================================
+  Disable queueing on mpath devs in blk-availability systemd service/initscript.
+  Add new -m|--mpathoption disablequeueing to blkdeactivate.
   Automatically group regions with 'create --segments' unless --nogroup.
   Fix resource leak when deleting the first member of a group.
   Allow --bounds with 'create --filemap' for dmstats.
man/blkdeactivate.8.in +12 -0
index 2eb4c6f..8bb10b5 100644
@@ -7,6 +7,7 @@ blkdeactivate \(em utility to deactivate block devices
 .RB [ \-e ]
 .RB [ \-h ]
 .RB [ \-l \  \fIlvm_options\fP ]
+.RB [ \-m \  \fImpath_options\fP ]
 .RB [ \-u ]
 .RB [ \-v ]
 .RI [ device ]
@@ -51,6 +52,16 @@ 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.
@@ -90,4 +101,5 @@ of device-mapper devices in case the deactivation fails and force removal.
 .BR lsblk (8),
 .BR lvm (8),
 .BR mdadm (8),
+.BR multipathd (8),
 .BR umount (8)
scripts/blk_availability_init_red_hat.in +1 -1
index 3bf2abf..a84ffe7 100644
@@ -33,7 +33,7 @@
 
 sbindir=@sbindir@
 script=blkdeactivate
-options="-u -l wholevg"
+options="-u -l wholevg -m disablequeueing"
 
 LOCK_FILE="/var/lock/subsys/blk-availability"
 
scripts/blk_availability_systemd_red_hat.service.in +1 -1
index 3506738..cc4c678 100644
@@ -7,7 +7,7 @@ Conflicts=shutdown.target
 [Service]
 Type=oneshot
 ExecStart=/usr/bin/true
-ExecStop=@sbindir@/blkdeactivate -u -l wholevg
+ExecStop=@sbindir@/blkdeactivate -u -l wholevg -m disablequeueing
 RemainAfterExit=yes
 
 [Install]
scripts/blkdeactivate.sh.in +48 -10

116 lines not on this page · raw message