Check for !SUSPENDED in kpartx rules
authorHannes Reinecke <hare@suse.de>
Wed, 16 Jan 2013 12:14:05 +0000 (13:14 +0100)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Wed, 16 Jan 2013 20:45:26 +0000 (21:45 +0100)
Read-only devices appear as DM_STATE=READONLY, so we should
invert the check in kpartx rules to have kpartx run on
readonly devices, too.

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

index 64863a0..febac90 100644 (file)
@@ -22,7 +22,7 @@ ENV{DM_PART}=="?*", \
         SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_NAME}-part$env{DM_PART}"
 
 # Create dm tables for partitions
-ENV{DM_STATE}=="ACTIVE", ENV{DM_UUID}=="mpath-*", \
+ENV{DM_STATE}!="SUSPENDED", ENV{DM_UUID}=="mpath-*", \
         RUN+="/sbin/kpartx -u -p -part /dev/$name"
 
 LABEL="kpartx_end"