Bug#566965: lvm2 initscript breaks most "advanced" setups (e.g. stacked block devices) or booting via UUID/LABEL

Christoph Anton Mitterer calestyo at scientia.net
Sun Sep 26 13:50:25 UTC 2010


retitle 566965 lvm2 initscript breaks most "advanced" setups (e.g.
stacked block devices) or booting via UUID/LABEL
severity 566965 important
stop

Hi.

I've changed the title and increased the severity as this breaks so many
setups.


Bastian, could you please _strongly_ reconsider to correct the initramfs
boot-script.

1) The current implementation seems to expect $ROOT (which is the root=
kernel command line parameter) to be the final LVM logical volume.

This is AFAIU a misconception of it. As $ROOT is the final device
containting the root-filesystem.

This must not necessarily be an LV, just imagine setups like:
physical disk -> MD -> LV -> dm-crypt/LUKS -> ext4-root-fs


2) As it expects some rather fixed device pathnames.
This in addition breaks using things like UUID/LABEL, even if there are
no stacked block devices.


I've also seen several other classes of setups which are broken by this.



IMHO it would be fully ok, to just let the lvm2 initramfs script scan
for any VGs and activate _all_ of them.
- This should have no worse performance as lvm will have to scan all PVs
anyway.
- It should do no harm to activate VGs/LVs that are not yet required
(just to mount the root-fs).


I'd also say that it's nearly impossible to make a script which
automatically detects only those VGs/LVs that are required for the
root-filesystem, especially when you consider multiple stacked
blockdevices (see also
http://wiki.debian.org/AdvancedStartupShutdownWithMultilayeredBlockDevices)


My suggestion for now would be a strongly simplified lvm2 script as
attached.

Would be nice if this could find it's way in unstable soon :)


Cheers,
Chris.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lvm2
Type: application/x-shellscript
Size: 243 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-lvm-maintainers/attachments/20100926/c7a54a1b/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5677 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-lvm-maintainers/attachments/20100926/c7a54a1b/attachment-0003.bin>


More information about the pkg-lvm-maintainers mailing list