Bug#762984: Alert! /dev/vg0/usr does not exist

Elimar Riesebieter riesebie at lxtec.de
Thu Nov 27 20:09:09 UTC 2014

* Simon McVittie <smcv at debian.org> [2014-11-27 11:51 +0000]:

> On Wed, 01 Oct 2014 at 22:18:53 +0100, Ben Hutchings wrote:
> > I suspect this is essentially the same bug as #616689 and #678696,
> > except that now it may affect mounting /usr as well as /.
> I think this bug report is actually describing more than one bug in more
> than one package that have similar symptoms. There might be things
> that can be fixed in mdadm and lvm2 to fix the initramfs-tools/0.117
> regressions without needing to implement a full event-driven setup in
> initramfs-tools.
> ---- RAID (Elimar, Sven) ----
> Elimar Riesebieter's "System 2" has a bunch of mdadm (RAID) partitions.
> Elimar, what is in your /etc/default/mdadm on "System 2" (and "System 1"
> for that matter)? I predict that the answer includes something like
> "INITRDSTART=/dev/md6".

Right, adding root and usr raid partitions to INITRDSTART like
"INITRDSTART='/dev/md3 /dev/md5'" or just 'all' does the job. There
is no need to involve initramfs to mount /usr before init.

> ---- LVM (Elimar's "System 1", Sven, Torsten, IOhannes, Javier) ----
> In the LVM case, debian/initramfs-tools/lvm2/scripts/local-top
> does this:
>     activate_vg "$ROOT"
>     activate_vg "$resume"
> Note the lack of handling for /usr here.
> Further, activate_vg uses "lvm lvchange" to activate only the LV
> necessary for the root filesystem; if /usr is on a separate VG,
> it's not going to work.
> This on its own would be enough to make Sven Hartge's system fail:
> /usr needs a LVM partition activated that / does not. Similarly,
> I think Elimar's "System 1" is going to activate vg0/root but not
> vg0/usr.


> We don't have enough information in this bug report to know what
> layout Torsten, IOhannes, Javier used on their systems, but we can
> guess from the fact that "vgchange -a y" is a successful workaround...
> I predict that these are LVM over either a single RAID array, or
> real partitions.
> --------
> The ideal thing in both of these situations would be to use the same
> logic as *mounting* /usr - mount the rootfs first, then read its fstab
> to find out where /usr is, avoiding hard-coding that knowledge into
> the initramfs - but I think that would need a significantly more
> complicated hook structure.
> Perhaps modifying mdadm and lvm2 so they will set up enough md/lvm bits
> for /usr in the initramfs would be sufficient for a 95% solution?

What do you propose to adapt it to lvm2? Why should we avoid hardcoding via
/etc/initramfs-tools/scripts? Maybe a move from
/usr/share/initramfs-tools/scripts/local-top/lvm2 to
/lib/initramfs-tools/scripts/local-top/lvm2 should work?

 Learned men are the cisterns of knowledge,
  not the fountainheads ;-)

More information about the pkg-lvm-maintainers mailing list