[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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



On Thu, 27 Nov 2014 11:51:48 +0000 Simon McVittie <smcv@debian.org> wrote:
> 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.
[...]
> ---- 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.
[...]
> 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.

I'm proposing to add another hook for this, which will initially only be
implemented by lvm2.

So far as I can see, mdadm and lvm2 have to find the required devices in
different ways:

- mdadm cannot generally tell which RAID arrays are needed, as the root
  device may be identified by filesystem UUID or LV name but it only
  works with RAID array UUIDs and the component device names
- lvm2 can tell exactly which VG is needed as a root device on an LV
  is identified by VG and LV name

The same goes for mounting /usr.

Ben.

-- 
Ben Hutchings
The first rule of tautology club is the first rule of tautology club.

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: