On Fri, 02 Jan 2015 12:13:06 +0100 Peter Rajnoha <prajn...@redhat.com> wrote: > 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?
By default this is the case. > 2) is lvmetad supposed to be used in initramfs at all? Debian uses initramfs-tools by default. The lvm2 hooks for initramfs-tools do not use lvmetad. > 2a) if yes, is systemd used in initramfs initramfs-tools does not use systemd. > 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). Vincent, looks like you weren't CCed, so you didn't get the message. Peter, if the initramfs does *not* use lvmetad (as is the case with the default initramfs-tools setup), does it actually work if the root file system uses lvm in lvmetad = 1 mode? -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
signature.asc
Description: OpenPGP digital signature