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