ab92d3
From 3789ef258ecced4b91139b10e71dc787e48519e7 Mon Sep 17 00:00:00 2001
ab92d3
From: Harald Hoyer <harald@redhat.com>
ab92d3
Date: Fri, 23 Apr 2021 11:11:27 +0200
ab92d3
Subject: [PATCH] fix(multipath): stop multipath before udev db cleanup
ab92d3
ab92d3
All device-mapper based devices, including device-mapper-multipath,
ab92d3
do reuse the udev db from the initramfs after switching to the root fs.
ab92d3
ab92d3
Therefore device-mapper devices have to be correctly initialized before
ab92d3
the udev daemon is stopped, to have the correct entries in the udev db.
ab92d3
ab92d3
See also https://bugzilla.redhat.com/show_bug.cgi?id=1949076
ab92d3
ab92d3
(cherry picked from commit 3c244c7ca3555b526883dc20104c469b39085cbe)
ab92d3
ab92d3
Resolves: #1949076
ab92d3
---
ab92d3
 modules.d/90multipath/multipathd.service | 2 ++
ab92d3
 1 file changed, 2 insertions(+)
ab92d3
ab92d3
diff --git a/modules.d/90multipath/multipathd.service b/modules.d/90multipath/multipathd.service
ab92d3
index 646c7c14..b544de21 100644
ab92d3
--- a/modules.d/90multipath/multipathd.service
ab92d3
+++ b/modules.d/90multipath/multipathd.service
ab92d3
@@ -4,8 +4,10 @@ Before=iscsi.service iscsid.service lvm2-activation-early.service
ab92d3
 Wants=systemd-udev-trigger.service systemd-udev-settle.service local-fs-pre.target
ab92d3
 After=systemd-udev-trigger.service systemd-udev-settle.service
ab92d3
 Before=local-fs-pre.target
ab92d3
+Before=initrd-cleanup.service
ab92d3
 DefaultDependencies=no
ab92d3
 Conflicts=shutdown.target
ab92d3
+Conflicts=initrd-cleanup.service
ab92d3
 ConditionKernelCommandLine=!nompath
ab92d3
 ConditionKernelCommandLine=!rd.multipath=0
ab92d3
 ConditionKernelCommandLine=!rd_NO_MULTIPATH
ab92d3