[PATCH 25/78] multipath.rules: fixup race condition with systemd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



systemd will call 'fsck' on any device, even if no device
type is found. This might cause a race between the mount call
and any fsck call on the device-mapper device.
So for multipath we should arbitrary set the device type to
'none', as then systemd with detect a missing 'fsck.none'
command and skip fsck here.

Signed-off-by: Hannes Reinecke <hare@xxxxxxx>
---
 multipath/multipath.rules | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/multipath/multipath.rules b/multipath/multipath.rules
index 56056bf..c76e6b8 100644
--- a/multipath/multipath.rules
+++ b/multipath/multipath.rules
@@ -4,10 +4,11 @@ SUBSYSTEM!="block", GOTO="end_mpath"
 ENV{MPATH_SBIN_PATH}="/sbin"
 TEST!="$env{MPATH_SBIN_PATH}/multipath", ENV{MPATH_SBIN_PATH}="/usr/sbin"
 
-SUBSYSTEM=="block", ACTION=="add|change", KERNEL=="sd*[!0-9]|dasd*[!0-9]", \
+SUBSYSTEM=="block", ACTION=="add|change", KERNEL=="sd*|dasd*", \
 	ENV{DM_MULTIPATH_DEVICE_PATH}!="1", \
 	PROGRAM=="$env{MPATH_SBIN_PATH}/multipath -u %k", \
 	ENV{DM_MULTIPATH_DEVICE_PATH}="1" \
+	ENV{ID_FS_TYPE}="none" \
 	ENV{SYSTEMD_READY}="0"
 
 LABEL="end_mpath"
-- 
1.8.4.5

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux