Bug#774082: systemd: system with LVM and lvmetad does not bot after upgrade to jessie

Peter Rajnoha prajnoha at redhat.com
Fri Jan 2 11:13:06 UTC 2015


The way the LV with root FS is activated depends on distribution,
but most of the time, this LV is not activated automatically as
lvmetad is not running in initramfs. Therefore, it's a matter of
initramfs script to activate the LV with root FS directly with
direct vgchange/lvchange -aay call.

For the rest of the LVs (where non-root filesystems reside), we
can rely on lvmetad and the udev rule to activate these LVs
(it's the "pvscan --cache -aay" call in udev rule that does
the actual activation based on information cached in lvmetad -
if all the PVs making up the VG are present, the VG is activated).

Also, care must be taken that lvmetad socket unit (lvm2-lvmetad.socket)
is always enabled so whenever the use_lvmetad=1 is used in lvm.conf,
the lvm2-lvmetad.service is automatically started based on that
socket unit.

As for the messages about LVM scanning in initramfs - LVM does a
fallback to direct scanning instead of reading this info from
lvmetad if lvmtead is not yet running and at the same time use_lvmetad=1
is used - it means nobody started lvmetad daemon in lvmetad.
So either initramfs needs to include lvmetad (and make sure it's
started) OR initramfs needs modified lvm.conf which always has
use_lvmetad=0 (normally, when generating initramfs image, the lvm.conf
needs to be modified a bit so it's suitable for initramfs environment).

So this just seems that the initramfs scripts and systemd units
are not set up properly - this needs to be inspected:

  1) is lvm2-lvmetad.socket systemd unit enabled?
  2) is lvmetad supposed to be used in initramfs at all?
    2a) if yes, is systemd used in initramfs
      2aa) if yes, is lvm2-lvmetad.socket unit present and enabled there?
          (as well as lvm2-lvmetad.service unit and lvmetad binary present in initramfs)
      2ab) if no, is lvmetad started directly within initramfs script?
    2b) if no, is there a direct vgchange/lvchange -aay call in initramfs script?
        (also, is lvm.conf modified for initramfs script so that use_lvmetad=0 is used
         for the "fallback to direct LVM scan" warning messages to disappear)

And whenever lvmetad is used - either in initramfs in the system itself,
there must always be the udev rule with "pvscan --cache -aay" call present.

So these are the items to check (..by Debian maintainers of respective parts).



More information about the pkg-lvm-maintainers mailing list