Bug#762984: Alert! /dev/vg0/usr does not exist
Elimar Riesebieter
riesebie at lxtec.de
Thu Nov 27 21:36:48 UTC 2014
* Simon McVittie <smcv at debian.org> [2014-11-27 21:19 +0000]:
> On 27/11/14 20:09, Elimar Riesebieter wrote:
> > 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.
>
> If your init is systemd, initramfs-tools >= 0.117 *does* automatically
> mount /usr before init, to ensure that rootfs <-> /usr interdependencies
> can never be a problem (for instance third-party udev rules often need
> helpers in /usr).
Not always. If the raid partition for /usr isn't initialized it
can't be mounted, though.
> That's the feature that I'm trying to get migratable
> into testing, because when it works, it'll make the boot sequence a lot
> simpler; but it's also the feature that caused this regression.
We have to catch the case whether /usr is on a seperated raid
partition here!
> (It was meant to do the same for non-systemd too, but initscripts
> doesn't currently support that.)
Doesn't matter
> >> 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?
>
> No, whether /usr/share/initramfs-tools is on the rootfs is irrelevant:
> it's only used when update-initramfs is run, on a fully booted system,
> usually as a result of a dpkg run.
>
> What the initramfs does is currently (in pseudocode):
>
> * (hook provided by cryptsetup)
> decrypt encrypted volumes needed for / or swap
> * (hook provided by mdadm) start RAID arrays needed for / or swap
Only if initialized by "INITRDSTART"
> * (hook provided by lvm2) start LVM volumes needed for / or swap
> * (basic functionality of initramfs-tools) if swap contains a
> hibernation image, resume from it
> * (basic functionality of initramfs-tools) mount /
> * (basic functionality of initramfs-tools) if /usr is a separate
> filesystem, mount it
Only if initialized by "INITRDSTART"
> * (basic functionality of initramfs-tools) run the real init
>
> The patch I attached to #767832 changes the cryptsetup step to "decrypt
> encrypted volumes needed for /, /usr or swap" so that, when we get to
> the "mount /usr" step, it actually works, even if /usr is on an
> encrypted volume.
Will have a further look at it on weekend
Elimar
--
Numeric stability is probably not all that
important when you're guessing;-)
More information about the pkg-mdadm-devel
mailing list