[dm-devel] [PATCH 26/78] 11-dm-mpath.rules: Import blkid values if all paths are down

Hannes Reinecke hare at suse.de
Mon Mar 16 12:36:13 UTC 2015


When all paths are failed we should not try to run any programs
requiring disk access. However, we still need to create the
symlinks so as not to confuse systemd.
So import the blkid values from the database in these cases.

Signed-off-by: Hannes Reinecke <hare at suse.de>
---
 multipath/11-dm-mpath.rules | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/multipath/11-dm-mpath.rules b/multipath/11-dm-mpath.rules
index 69c24b5..2e7076d 100644
--- a/multipath/11-dm-mpath.rules
+++ b/multipath/11-dm-mpath.rules
@@ -6,7 +6,13 @@ ENV{DM_UUID}!="mpath-?*", GOTO="mpath_end"
 # otherwise there would be a hang or IO error on access.
 # We'd like to avoid this, especially within udev processing.
 ENV{DM_NR_VALID_PATHS}!="?*", IMPORT{db}="DM_NR_VALID_PATHS"
-ENV{DM_NR_VALID_PATHS}=="0", ENV{DM_NOSCAN}="1"
+ENV{DM_NR_VALID_PATHS}!="0", GOTO="mpath_blkid_end"
+IMPORT{db}="ID_FS_TYPE"
+IMPORT{db}="ID_FS_USAGE"
+IMPORT{db}="ID_FS_UUID"
+IMPORT{db}="ID_FS_UUID_ENC"
+IMPORT{db}="ID_FS_VERSION"
+LABEL="mpath_blkid_end"
 
 # Also skip all foreign rules if no path is available.
 # Remember the original value of DM_DISABLE_OTHER_RULES_FLAG
-- 
1.8.4.5




More information about the dm-devel mailing list