aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNed Bass <[email protected]>2017-04-20 12:10:55 -0700
committerBrian Behlendorf <[email protected]>2017-04-20 12:10:55 -0700
commit2a152383a2bc54d43a7b478bd3c868b7165f2dca (patch)
tree5ca96ee638f8f592ce0314f6319546cb5ffe940a
parent587e228a6fcc03aa1135fda368666841dcb0e4c8 (diff)
vdev_id: fix failure due to multipath -l bug
Udev may fail to create the expected symbolic links in /dev/disk/by-vdev on systems with the device-mapper-multipath-0.4.9-100.el6 package installed. This affects RHEL 6.9 and possibly other downstream distributions. That version of the multipath command may incorrectly list a drive state as "unkown" instead of "running". The issue was introduced in the patch for https://bugzilla.redhat.com/show_bug.cgi?id=1401769 The vdev_id udev helper uses the state reported by "multipath -l" to detect an online component disk of a multipath device in order to resolve its physical slot and enclosure. Changing the command invocation to "multipath -ll" works around the above issue by causing multipath to consult additional sources of information to determine the drive state. Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Signed-off-by: Ned Bass <[email protected]> Closes #6039
-rwxr-xr-xcmd/vdev_id/vdev_id4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/vdev_id/vdev_id b/cmd/vdev_id/vdev_id
index 0d617a803..c7d962045 100755
--- a/cmd/vdev_id/vdev_id
+++ b/cmd/vdev_id/vdev_id
@@ -184,9 +184,9 @@ sas_handler() {
return
fi
- # Get the raw scsi device name from multipath -l. Strip off
+ # Get the raw scsi device name from multipath -ll. Strip off
# leading pipe symbols to make field numbering consistent.
- DEV=`multipath -l $DM_NAME |
+ DEV=`multipath -ll $DM_NAME |
awk '/running/{gsub("^[|]"," "); print $3 ; exit}'`
if [ -z "$DEV" ] ; then
return