Skip to content

Commit b874d4b

Browse files
prajnohaharaldh
authored andcommitted
lvm/mdraid: Fix LVM on MD activation
The 69-dm-lvm-metad.rules set some udev env. variables that makes it possible to detect the right time to activate LVM on MD. The MD is very similar to DM during activation - it's usable only after proper device activation - the CHANGE event. We need to make a difference between a CHANGE event that comes from this activation and CHANGE event that is the outcome of the WATCH udev rule (otherwise we'd end up with LVM activation done on each CHANGE event - which is wrong). So we need the udev databse to be persistent during pivot to root fs even for MD devices.
1 parent 283d385 commit b874d4b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

modules.d/90lvm/module-setup.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ install() {
8282
} > "${initdir}/etc/lvm/lvm.conf"
8383
fi
8484

85-
inst_rules 11-dm-lvm.rules
85+
inst_rules 11-dm-lvm.rules 69-dm-lvm-metad.rules
8686
# Gentoo ebuild for LVM2 prior to 2.02.63-r1 doesn't install above rules
8787
# files, but provides the one below:
8888
inst_rules 64-device-mapper.rules

modules.d/90mdraid/59-persistent-storage-md.rules

+1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ IMPORT{program}="/sbin/mdadm --detail --export $tempnode"
2020
IMPORT BLKID
2121
OPTIONS+="link_priority=100"
2222
OPTIONS+="watch"
23+
OPTIONS+="db_persist"
2324
LABEL="md_end"

0 commit comments

Comments
 (0)