Blame SOURCES/0014-lvm-mdraid-Fix-LVM-on-MD-activation.patch

18971c
From 32b970339f5439300fe6155352ec1f17c5e48d78 Mon Sep 17 00:00:00 2001
18971c
From: Peter Rajnoha <prajnoha@redhat.com>
18971c
Date: Fri, 4 Oct 2013 10:41:24 +0200
18971c
Subject: [PATCH] lvm/mdraid: Fix LVM on MD activation
18971c
18971c
The 69-dm-lvm-metad.rules set some udev env. variables that makes it
18971c
possible to detect the right time to activate LVM on MD. The MD is very
18971c
similar to DM during activation - it's usable only after proper device
18971c
activation - the CHANGE event. We need to make a difference between a
18971c
CHANGE event that comes from this activation and CHANGE event that is
18971c
the outcome of the WATCH udev rule (otherwise we'd end up with LVM
18971c
activation done on each CHANGE event - which is wrong).
18971c
18971c
So we need the udev databse to be persistent during pivot to root fs
18971c
even for MD devices.
18971c
---
18971c
 modules.d/90lvm/module-setup.sh                   | 2 +-
18971c
 modules.d/90mdraid/59-persistent-storage-md.rules | 1 +
18971c
 2 files changed, 2 insertions(+), 1 deletion(-)
18971c
18971c
diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
18971c
index 2ef9a514..f98ffffd 100755
18971c
--- a/modules.d/90lvm/module-setup.sh
18971c
+++ b/modules.d/90lvm/module-setup.sh
18971c
@@ -82,7 +82,7 @@ install() {
18971c
         } > "${initdir}/etc/lvm/lvm.conf"
18971c
     fi
18971c
 
18971c
-    inst_rules 11-dm-lvm.rules
18971c
+    inst_rules 11-dm-lvm.rules 69-dm-lvm-metad.rules
18971c
     # Gentoo ebuild for LVM2 prior to 2.02.63-r1 doesn't install above rules
18971c
     # files, but provides the one below:
18971c
     inst_rules 64-device-mapper.rules
18971c
diff --git a/modules.d/90mdraid/59-persistent-storage-md.rules b/modules.d/90mdraid/59-persistent-storage-md.rules
18971c
index bea93257..6ef858aa 100644
18971c
--- a/modules.d/90mdraid/59-persistent-storage-md.rules
18971c
+++ b/modules.d/90mdraid/59-persistent-storage-md.rules
18971c
@@ -20,4 +20,5 @@ IMPORT{program}="/sbin/mdadm --detail --export $tempnode"
18971c
 IMPORT BLKID
18971c
 OPTIONS+="link_priority=100"
18971c
 OPTIONS+="watch"
18971c
+OPTIONS+="db_persist"
18971c
 LABEL="md_end"