Package: lvm2 Version: 2.02.98-3 Severity: important Tags: patch Dear Maintainer,
Since kernel was updated to 3.9 on Jessie, my system completely failed to boot. It was still able to boot with previous 3.2 kernel. My configuration used several disks : /dev/sda1 : /boot /dev/sda2 : lvm partition, containing volume group vg00 /dev/sd{b,c,d}1 : raid 5 array, containing another lvm partition, containing volume group vg01 All system filesystems (/, /usr, swap, /var ...) are in the vg00 group, on the same disk /boot is. The logical volumes corresponding to these filesystems are vg00-root, vg00-swap ... The vg01 group in the raid array contains only data partitions (/home, /archive) and is not involved in the problem. When attempting to boot on 3.9, I always ended up in the busybox prompt in initramfs. The messages just before the prompt showed that the root partition in logical volume vg00-root was not found. However, if on the busyboc prompt I ran myself a command: vgchange -a y Then, all logical volumes were found and if I exited busibox, the rest of the boot preceeded normaly. After days of search, I found that what happened was that when the "lvm lvchange" command that attempted to activate the root logical volume was run from local-top/lvm2 script,, the disks were not ready yet. In fact, even /dev/disk was not present in /dev. So the command failed and the local-top/lvm2 script exited. After all scripts from local-top ended, the boot process resumed execution of scripts/local and this script does include a waiting loop, using either rootdelay or 30s as its maximum wait. During the wait (in fact after less than one second), the disks become ready, but since we have already left the local-top/lvm2 script, we do not attempt anymore to run lvchange and so the root file system does not appear. As a consequence, the boot process gave up and an interactive session with busybox was launched. At that time, I could run vgchange myself, and it did complete normaly since at that time the disks were available (/dev/disk exists, with all subdirectories like /dev/disk/by-id and /dev/disk/by-path). So basically, the problem is that we need another waiting loop *before* the lvchange command in the local-top/lvm2 script. -- System Information: Debian Release: jessie/sid APT prefers testing APT policy: (500, 'testing'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.9-1-amd64 (SMP w/4 CPU cores) Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages lvm2 depends on: ii dmsetup 2:1.02.77-3 ii initscripts 2.88dsf-41 ii libc6 2.17-6 ii libdevmapper-event1.02.1 2:1.02.74-7 ii libdevmapper1.02.1 2:1.02.77-3 ii libreadline5 5.2+dfsg-2 ii libudev0 175-7.2 ii lsb-base 4.1+Debian12 lvm2 recommends no packages. lvm2 suggests no packages. -- no debconf information
--- /usr/share/initramfs-tools/scripts/local-top/lvm2.orig 2013-07-06 19:33:23.276349585 +0200 +++ /usr/share/initramfs-tools/scripts/local-top/lvm2 2013-07-06 18:30:34.078732386 +0200 @@ -46,6 +46,14 @@ eval $(dmsetup splitname --nameprefixes --noheadings --rows "$dev") if [ "$DM_VG_NAME" ] && [ "$DM_LV_NAME" ]; then + + # Added by Luc Maisonobe to fix start problems + icount=0 + while [ ! -e /dev/disk/by-path ] && [ $icount -lt 300 ] ; do + /bin/sleep 0.1 + icount=$(( $icount + 1)) + done + lvm lvchange -aly --ignorelockingfailure "$DM_VG_NAME/$DM_LV_NAME" rc=$? if [ $rc = 5 ]; then