kpartx.rules: Skip kpartx for multipath events
authorHannes Reinecke <hare@suse.de>
Fri, 13 Jun 2014 08:43:08 +0000 (10:43 +0200)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Sun, 29 Mar 2015 15:56:31 +0000 (17:56 +0200)
Whenever multipath signals a PATH_FAILED or PATH_REINSTATED
event we don't have to call 'kpartx'; the contents on the disk
haven't changed.
And we should never call kpartx if all paths are down, irrespective
of the uevent.

Signed-off-by: Hannes Reinecke <hare@suse.de>
kpartx/kpartx.rules

index 226e44a..022361f 100644 (file)
@@ -40,8 +40,8 @@ ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", \
        SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
 
 # Create dm tables for partitions
-ENV{DM_ACTION}=="PATH_FAILED", ENV{DM_NR_VALID_PATHS}=="0", \
-       GOTO="kpartx_end"
+ENV{DM_ACTION}=="PATH_FAILED|PATH_REINSTATED", GOTO="kpartx_end"
+ENV{DM_NR_VALID_PATHS}=="0", GOTO="kpartx_end"
 ENV{DM_STATE}!="SUSPENDED", ENV{DM_UUID}=="mpath-*", \
         RUN+="/sbin/kpartx -u -p -part /dev/$name"