]> sourceware.org Git - lvm2.git/commit
udev: also autoactivate on coldplug
authorPeter Rajnoha <prajnoha@redhat.com>
Fri, 19 Apr 2013 10:17:53 +0000 (12:17 +0200)
committerPeter Rajnoha <prajnoha@redhat.com>
Fri, 19 Apr 2013 10:43:36 +0000 (12:43 +0200)
commit764195207d4773cf6f1674a2fb16e9a0acda304a
treee04699a2ee7aa46ed172d5e4853348a0b897dfa4
parent2ccb9eb861c3b65ffc1aac024425e2cc10950077
udev: also autoactivate on coldplug

Commit 756bcabbfe297688ba240a880bc2b55265ad33f0 fixed autoactivation
to not trigger on each uevent for a PV that appeared in the system
most notably the events that are triggered artificially (udevadm
trigger or as the result of the WATCH udev rule being applied that
consequently generates CHANGE uevents). This fixed a situation in
which VGs/LVs were activated when they should not.

BUT we still need to care about the coldplug used at boot to
retrigger the ADD events - the "udevadm trigger --action=add"!

For non-DM-based PVs, this is already covered as for these we
run the autoactivation on ADD event only.

However, for DM-based PVs, we still need to run the
autoactivation even for the artificial ADD event, reusing
the udev DB content from previous proper CHANGE event that
came with the DM device activation.

Simply, this patch fixes a situation in which we run extra
"udevadm trigger --action=add" (or echo add > /sys/block/<dev>/uevent)
for DM-based PVs (cryptsetup devices, multipath devices, any
other DM devices...).

Without this patch, while using lvmetad + autoactivation,
any VG/LV that has a DM-based PV and for which we do not
call the activation directly, the VG/LV is not activated.

For example a VG with an LV with root FS on it which is directly
activated in initrd and then missing activation of the rest
of the LVs in the VG because of unhandled uevent retrigger on
boot after switching to root FS (the "coldplug").

(No WHATS_NEW here as this fixes the commit mentioned
above and which was not released yet.)
udev/10-dm.rules.in
udev/69-dm-lvm-metad.rules.in
This page took 0.037591 seconds and 5 git commands to generate.