Bug#769702: lvm2: Initscripts cause non bootable system with btrfs root spanned onto lvm
rgammans at gammascience.co.uk
Sat Nov 15 16:37:16 UTC 2014
Justification: breaks the whole system
When using a btfrs for the root if without the first device being on
lvm, but with other devices used in the file system whichi are on lvm
then the initscript decicded not to make the vg availble .
Since in thise case all the devices which make up the root filesystem
are not availabel it cannot be mounted rendering the system unbootable.
I have looked at the existing bugs filed against ths package such
as #566965 , an it looks like failure to make VG available is
common in a number of disparate circumstances.
Can I suggest a cmdline argument is added (tested for) to force
this to occurs so it can be easily fixed / forced by the user.
Having to manually edit you initrd scripts for a specicifc filesystem
layout is mor complicated than (IMHO) it should be. Adding a
simpl way of forcing this allow the complicated setups to work
with minimal impact on the simpler ones.
This patch is an example of what I suggest.
--- /usr/share/initramfs-tools/scripts/local-top/lvm2 2009-08-17 18:28:09.000000000 +0100
+++ lvm2 2014-11-15 16:21:22.646647766 +0000
@@ -60,7 +60,11 @@
modprobe -q dm-mod
+if grep force_lvm /proc/cmdline > /dev/null; then
+ lvm vgchange -aly --ignorelockingfailure ;
+ activate_vg "$ROOT"
+ activate_vg "$resume"
Under btrfs, this is a particularly insidious problem as growing the root
filesystem can trigger it , on and otherwise working system, and even if you
remember to update you initramfs, you are still left with a unbootbale system.
I don't believe this script has changed between wheezy and jessie so I suspect it
affects Jessie as well.
I can confirm that my system boots file with this patch and the force_lvm parameter
on the kernel cmdline.
-- System Information:
Debian Release: 7.4
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-4-amd64 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=C (charmap=UTF-8) (ignored: LC_ALL set to en_GB.UTF8)
Shell: /bin/sh linked to /bin/dash
Versions of packages lvm2 depends on:
ii dmsetup 2:1.02.77-1
ii initscripts 2.88dsf-41+deb7u1
ii libc6 2.17-3
ii libdevmapper-event1.02.1 2:1.02.77-1
ii libdevmapper1.02.1 2:1.02.77-1
ii libreadline5 5.2+dfsg-2
ii libudev0 175-7.2
ii lsb-base 4.1+Debian8+deb7u1
lvm2 recommends no packages.
lvm2 suggests no packages.
-- no debconf information
More information about the pkg-lvm-maintainers