Bug#791869: lvm2: updating src:lvm2 from 2.02.111-2.2 to 2.02.122-1 breaks booting, mounting LVs other than / fails

Peter Rajnoha prajnoha at redhat.com
Mon Jul 27 14:12:53 UTC 2015


On 07/27/2015 03:57 PM, Peter Rajnoha wrote:
> That's how it was supposed to work. I can imagine the problematic
> part here may be the transfer of the udev database state from initramfs
> to root fs - there is a special way that udev uses to mark devices
> so that the udev db state is kept from initramfs - I need to recall
> that/check that because I don't remember that method right now...
> 

It's the OPTIONS+="db_persist" that needs to be used in initramfs
for MD devices. This marks udev db records related to this device with
sticky bit then which is then recognized by udev code and the udev
db state is not cleaned up in that case:

https://github.com/systemd/systemd/blob/master/src/udev/udevadm-info.c#L220

(the udevadm-info --cleanup-db - the records marked with sticky bit persist)

So once this udev db state is properly handed over from initramfs to root fs,
the rules in 69-dm-lvm-metad.rules should work (as it will use the
IMPORT{db}="LVM_MD_PV_ACTIVATED" to retrieve the state from previous runs
and this should fire pvscan then on coldplug properly:

  IMPORT{db}="LVM_MD_PV_ACTIVATED"
  ACTION=="add", ENV{LVM_MD_PV_ACTIVATED}=="1", GOTO="lvm_scan"
-- 
Peter



More information about the pkg-lvm-maintainers mailing list