diff mbox

[02/33] multipathd: start daemon after udev trigger

Message ID 20170228162329.14517-3-mwilck@suse.com (mailing list archive)
State Superseded, archived
Delegated to: Mike Snitzer
Headers show

Commit Message

Martin Wilck Feb. 28, 2017, 4:22 p.m. UTC
From: Hannes Reinecke <hare@suse.de>

As multipath now relies on udev for device enumeration it needs
to be started after udev trigger has finished sending all events.
Otherwise the daemon will not find any devices during startup
(as udev trigger hasn't been called yet and the udev database is empty).
But after switchover from the initrd there will already be some
multipath device-mapper tables, for which the daemon cannot find
any device. Consequently the daemon will be removing these tables,
only to recreate them later on once udev trigger has run.
This induces a short window during which the device mapper devices
won't be present, causing systemd to umount devices or drop into
emergency mode.

Signed-off-by: Hannes Reinecke <hare@suse.com>
---
 multipathd/multipathd.service | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/multipathd/multipathd.service b/multipathd/multipathd.service
index be13138c..126012b8 100644
--- a/multipathd/multipathd.service
+++ b/multipathd/multipathd.service
@@ -1,8 +1,9 @@ 
 [Unit]
 Description=Device-Mapper Multipath Device Controller
+Wants=systemd-udev-trigger.service systemd-udev-settle.service
 Before=iscsi.service iscsid.service lvm2-lvmetad.service lvm2-activation-early.service
-Before=local-fs-pre.target systemd-udev-trigger.service blk-availability.service
-After=multipathd.socket systemd-udevd.service
+Before=local-fs-pre.target blk-availability.service
+After=multipathd.socket systemd-udev-trigger.service systemd-udev-settle.service
 DefaultDependencies=no
 Conflicts=shutdown.target