|
|
fab351 |
From 08961eef2ad09e4ce38ee034baf4e8c2b3934cd1 Mon Sep 17 00:00:00 2001
|
|
|
fab351 |
From: Benjamin Marzinski <bmarzins@redhat.com>
|
|
|
fab351 |
Date: Tue, 3 Sep 2019 10:44:36 -0500
|
|
|
fab351 |
Subject: [PATCH] modules.d: fix udev rules detection of multipath devices
|
|
|
fab351 |
|
|
|
fab351 |
Starting with the 0.7.7 release of the multipath tools, the multipath
|
|
|
fab351 |
udev rules always set a value in ENV{DM_MULTIPATH_DEVICE_PATH} for any
|
|
|
fab351 |
device that multipath scans. A value of 0 means that the device is not
|
|
|
fab351 |
claimed by multipath, and a value of 1 means that it is. Because of
|
|
|
fab351 |
this, udev rules that check ENV{DM_MULTIPATH_DEVICE_PATH}=="?*" will
|
|
|
fab351 |
always return True, and act as if every scanned device is claimed by
|
|
|
fab351 |
multipath. Checking ENV{DM_MULTIPATH_DEVICE_PATH}=="1" will work
|
|
|
fab351 |
correctly for both the old and new versions of the multipath tools.
|
|
|
fab351 |
---
|
|
|
fab351 |
modules.d/90dm/59-persistent-storage-dm.rules | 2 +-
|
|
|
fab351 |
modules.d/90dmraid/61-dmraid-imsm.rules | 2 +-
|
|
|
fab351 |
modules.d/90lvm/64-lvm.rules | 2 +-
|
|
|
fab351 |
modules.d/90mdraid/59-persistent-storage-md.rules | 2 +-
|
|
|
fab351 |
modules.d/90mdraid/65-md-incremental-imsm.rules | 2 +-
|
|
|
fab351 |
modules.d/95udev-rules/59-persistent-storage.rules | 2 +-
|
|
|
fab351 |
modules.d/95udev-rules/61-persistent-storage.rules | 2 +-
|
|
|
fab351 |
7 files changed, 7 insertions(+), 7 deletions(-)
|
|
|
fab351 |
|
|
|
fab351 |
diff --git a/modules.d/90dm/59-persistent-storage-dm.rules b/modules.d/90dm/59-persistent-storage-dm.rules
|
|
|
fab351 |
index 73b09376..2be11227 100644
|
|
|
fab351 |
--- a/modules.d/90dm/59-persistent-storage-dm.rules
|
|
|
fab351 |
+++ b/modules.d/90dm/59-persistent-storage-dm.rules
|
|
|
fab351 |
@@ -1,7 +1,7 @@
|
|
|
fab351 |
SUBSYSTEM!="block", GOTO="dm_end"
|
|
|
fab351 |
ACTION!="add|change", GOTO="dm_end"
|
|
|
fab351 |
# Also don't process disks that are slated to be a multipath device
|
|
|
fab351 |
-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="dm_end"
|
|
|
fab351 |
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="dm_end"
|
|
|
fab351 |
|
|
|
fab351 |
KERNEL!="dm-[0-9]*", GOTO="dm_end"
|
|
|
fab351 |
ACTION=="add", GOTO="dm_end"
|
|
|
fab351 |
diff --git a/modules.d/90dmraid/61-dmraid-imsm.rules b/modules.d/90dmraid/61-dmraid-imsm.rules
|
|
|
fab351 |
index 72267d3c..8a6b215e 100644
|
|
|
fab351 |
--- a/modules.d/90dmraid/61-dmraid-imsm.rules
|
|
|
fab351 |
+++ b/modules.d/90dmraid/61-dmraid-imsm.rules
|
|
|
fab351 |
@@ -5,7 +5,7 @@
|
|
|
fab351 |
SUBSYSTEM!="block", GOTO="dm_end"
|
|
|
fab351 |
ACTION!="add|change", GOTO="dm_end"
|
|
|
fab351 |
# Also don't process disks that are slated to be a multipath device
|
|
|
fab351 |
-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="dm_end"
|
|
|
fab351 |
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="dm_end"
|
|
|
fab351 |
|
|
|
fab351 |
ENV{ID_FS_TYPE}=="linux_raid_member", GOTO="dm_end"
|
|
|
fab351 |
|
|
|
fab351 |
diff --git a/modules.d/90lvm/64-lvm.rules b/modules.d/90lvm/64-lvm.rules
|
|
|
fab351 |
index 3ce0c1f6..65f65249 100644
|
|
|
fab351 |
--- a/modules.d/90lvm/64-lvm.rules
|
|
|
fab351 |
+++ b/modules.d/90lvm/64-lvm.rules
|
|
|
fab351 |
@@ -7,7 +7,7 @@
|
|
|
fab351 |
SUBSYSTEM!="block", GOTO="lvm_end"
|
|
|
fab351 |
ACTION!="add|change", GOTO="lvm_end"
|
|
|
fab351 |
# Also don't process disks that are slated to be a multipath device
|
|
|
fab351 |
-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="lvm_end"
|
|
|
fab351 |
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="lvm_end"
|
|
|
fab351 |
KERNEL=="dm-[0-9]*", ACTION=="add", GOTO="lvm_end"
|
|
|
fab351 |
ENV{ID_FS_TYPE}!="LVM?_member", GOTO="lvm_end"
|
|
|
fab351 |
|
|
|
fab351 |
diff --git a/modules.d/90mdraid/59-persistent-storage-md.rules b/modules.d/90mdraid/59-persistent-storage-md.rules
|
|
|
fab351 |
index 6ef858aa..96b10108 100644
|
|
|
fab351 |
--- a/modules.d/90mdraid/59-persistent-storage-md.rules
|
|
|
fab351 |
+++ b/modules.d/90mdraid/59-persistent-storage-md.rules
|
|
|
fab351 |
@@ -1,7 +1,7 @@
|
|
|
fab351 |
SUBSYSTEM!="block", GOTO="md_end"
|
|
|
fab351 |
ACTION!="add|change", GOTO="md_end"
|
|
|
fab351 |
# Also don't process disks that are slated to be a multipath device
|
|
|
fab351 |
-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="md_end"
|
|
|
fab351 |
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="md_end"
|
|
|
fab351 |
|
|
|
fab351 |
KERNEL!="md[0-9]*|md_d[0-9]*|md/*", KERNEL!="md*", GOTO="md_end"
|
|
|
fab351 |
|
|
|
fab351 |
diff --git a/modules.d/90mdraid/65-md-incremental-imsm.rules b/modules.d/90mdraid/65-md-incremental-imsm.rules
|
|
|
fab351 |
index d66dd012..52f5b195 100644
|
|
|
fab351 |
--- a/modules.d/90mdraid/65-md-incremental-imsm.rules
|
|
|
fab351 |
+++ b/modules.d/90mdraid/65-md-incremental-imsm.rules
|
|
|
fab351 |
@@ -9,7 +9,7 @@ KERNEL=="md*", ENV{ID_FS_TYPE}!="linux_raid_member", GOTO="md_end"
|
|
|
fab351 |
KERNEL=="md*", ACTION!="change", GOTO="md_end"
|
|
|
fab351 |
|
|
|
fab351 |
# Also don't process disks that are slated to be a multipath device
|
|
|
fab351 |
-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="md_end"
|
|
|
fab351 |
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="md_end"
|
|
|
fab351 |
|
|
|
fab351 |
ENV{ID_FS_TYPE}=="ddf_raid_member|isw_raid_member|linux_raid_member", GOTO="md_try"
|
|
|
fab351 |
GOTO="md_end"
|
|
|
fab351 |
diff --git a/modules.d/95udev-rules/59-persistent-storage.rules b/modules.d/95udev-rules/59-persistent-storage.rules
|
|
|
fab351 |
index 47ff6edd..8d8650f7 100644
|
|
|
fab351 |
--- a/modules.d/95udev-rules/59-persistent-storage.rules
|
|
|
fab351 |
+++ b/modules.d/95udev-rules/59-persistent-storage.rules
|
|
|
fab351 |
@@ -1,7 +1,7 @@
|
|
|
fab351 |
SUBSYSTEM!="block", GOTO="ps_end"
|
|
|
fab351 |
ACTION!="add|change", GOTO="ps_end"
|
|
|
fab351 |
# Also don't process disks that are slated to be a multipath device
|
|
|
fab351 |
-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="ps_end"
|
|
|
fab351 |
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="ps_end"
|
|
|
fab351 |
|
|
|
fab351 |
KERNEL=="cciss[0-9]*", IMPORT BLKID
|
|
|
fab351 |
KERNEL=="nbd[0-9]*", IMPORT BLKID
|
|
|
fab351 |
diff --git a/modules.d/95udev-rules/61-persistent-storage.rules b/modules.d/95udev-rules/61-persistent-storage.rules
|
|
|
fab351 |
index 37148b07..895ecebd 100644
|
|
|
fab351 |
--- a/modules.d/95udev-rules/61-persistent-storage.rules
|
|
|
fab351 |
+++ b/modules.d/95udev-rules/61-persistent-storage.rules
|
|
|
fab351 |
@@ -1,7 +1,7 @@
|
|
|
fab351 |
SUBSYSTEM!="block", GOTO="pss_end"
|
|
|
fab351 |
ACTION!="add|change", GOTO="pss_end"
|
|
|
fab351 |
# Also don't process disks that are slated to be a multipath device
|
|
|
fab351 |
-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="pss_end"
|
|
|
fab351 |
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="pss_end"
|
|
|
fab351 |
|
|
|
fab351 |
ACTION=="change", KERNEL=="dm-[0-9]*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}!="1", GOTO="do_pss"
|
|
|
fab351 |
KERNEL=="cciss[0-9]*", GOTO="do_pss"
|
|
|
fab351 |
|