Debian Bug report logs - #715184
lvm2: fails to boot with root on lvm, as wait loop for slow disk is too late

version graph

Package: lvm2; Maintainer for lvm2 is Debian LVM Team <[email protected]>; Source for lvm2 is src:lvm2 (PTS, buildd, popcon).

Reported by: Luc Maisonobe <[email protected]>

Date: Sat, 6 Jul 2013 17:45:02 UTC

Severity: important

Tags: confirmed, d-i, patch, squeeze

Merged with 568838, 584558, 719335

Found in versions lvm2/2.02.62-1, lvm2/2.02.104-2, lvm2/2.02.66-3, lvm2/2.02.54-1, lvm2/2.02.66-5, lvm2/2.02.95-7, lvm2/2.02.98-3

Fixed in version lvm2/2.02.64-1

Done: Bastian Blank <[email protected]>

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], Debian LVM Team <[email protected]>:
Bug#715184; Package lvm2. (Sat, 06 Jul 2013 17:45:06 GMT) (full text, mbox, link).


Acknowledgement sent to Luc Maisonobe <[email protected]>:
New Bug report received and forwarded. Copy sent to Debian LVM Team <[email protected]>. (Sat, 06 Jul 2013 17:45:06 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Luc Maisonobe <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: lvm2: fails to boot with root on lvm, as wait loop for slow disk is too late
Date: Sat, 06 Jul 2013 19:34:44 +0200
[Message part 1 (text/plain, inline)]
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
[lvm2.patch (text/x-diff, attachment)]

Information forwarded to [email protected], Debian LVM Team <[email protected]>:
Bug#715184; Package lvm2. (Tue, 20 Aug 2013 09:51:04 GMT) (full text, mbox, link).


Acknowledgement sent to Luc Maisonobe <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian LVM Team <[email protected]>. (Tue, 20 Aug 2013 09:51:04 GMT) (full text, mbox, link).


Message #10 received at [email protected] (full text, mbox, reply):

From: Luc Maisonobe <[email protected]>
To: [email protected]
Subject: more general patch to solve this boot issue
Date: Tue, 20 Aug 2013 11:41:19 +0200
[Message part 1 (text/plain, inline)]
Hello,

Since I first report the problem, I have improved my initial patch.

As it seems to be more general than lvm2 related, I moved the loop out
of the lvm script and put it in a separate wait-for-disks script that I
put in the init-top directory, with an explicit loop copied from
cryptroot to ensure this script is the last run from init-top.

With this setup, all scripts run in the phases after init-top can rely
on the disks being available.

The complete wait-for-disks script is attached.

best regards,
Luc
[wait-for-disks (text/plain, attachment)]

Information forwarded to [email protected], [email protected], Debian LVM Team <[email protected]>:
Bug#715184; Package lvm2. (Thu, 13 Mar 2014 19:51:11 GMT) (full text, mbox, link).


Acknowledgement sent to Ritesh Raj Sarraf <[email protected]>:
Extra info received and forwarded to list. Copy sent to [email protected], Debian LVM Team <[email protected]>. (Thu, 13 Mar 2014 19:51:11 GMT) (full text, mbox, link).


Message #15 received at [email protected] (full text, mbox, reply):

From: Ritesh Raj Sarraf <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: Re: lvm2: fails to boot with root on lvm, as wait loop for slow disk is too late
Date: Thu, 13 Mar 2014 15:48:58 -0400
Package: lvm2
Version: 2.02.104-2
Followup-For: Bug #715184

Dear Maintainer,

I hit the same problem today, on March 2014, exactly as described in this bug report.
And the same workaround got me out of the busybox prompt.

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.13-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages lvm2 depends on:
ii  dmsetup                   2:1.02.83-2
ii  init-system-helpers       1.18
ii  initscripts               2.88dsf-51
ii  libc6                     2.18-4
ii  libdevmapper-event1.02.1  2:1.02.83-2
ii  libdevmapper1.02.1        2:1.02.83-2
ii  libreadline5              5.2+dfsg-2
ii  libudev1                  204-7
ii  lsb-base                  4.1+Debian12

lvm2 recommends no packages.

Versions of packages lvm2 suggests:
pn  thin-provisioning-tools  <none>

-- no debconf information



Information forwarded to [email protected], Debian LVM Team <[email protected]>:
Bug#715184; Package lvm2. (Tue, 01 Apr 2014 11:24:08 GMT) (full text, mbox, link).


Acknowledgement sent to Bjoern Buerger <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian LVM Team <[email protected]>. (Tue, 01 Apr 2014 11:24:08 GMT) (full text, mbox, link).


Message #20 received at [email protected] (full text, mbox, reply):

From: Bjoern Buerger <[email protected]>
To: [email protected]
Cc: [email protected], [email protected]
Subject: lvm2 still doesn't active volume group at boot time
Date: Tue, 1 Apr 2014 13:03:24 +0200
Dear Maintainers of lvm2 and initramfs-tools. 

For the second time since mid-2013, I got hit by the "lvm2 still doesn't 
active volume group at boot time" bug:

lvm2 version is 2.02.104-2 in both cases.

Please at least try to merge some of the outstanding bug-reports:
742962, 711147, 715184 are all describing the same problem.

Quick and dirty Workaround:

--- lvm2.orig   2014-04-01 12:31:11.000000000 +0200
+++ /usr/share/initramfs-tools/scripts/local-top/lvm2   2014-04-01 11:05:57.000000000 +0200
@@ -63,4 +63,7 @@
 activate_vg "$ROOT"
 activate_vg "$resume"
 
+vgchange -a y 
+sleep 5
+
 exit 0


... and then rebuild the initramfs.

I am sure there's a better solution, but I am no lvm2/initramfs expert :o)

Hth, 
Bjørn



Information forwarded to [email protected], Debian LVM Team <[email protected]>:
Bug#715184; Package lvm2. (Fri, 27 Jun 2014 14:33:04 GMT) (full text, mbox, link).


Acknowledgement sent to Klaus Pieper <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian LVM Team <[email protected]>. (Fri, 27 Jun 2014 14:33:05 GMT) (full text, mbox, link).


Message #25 received at [email protected] (full text, mbox, reply):

From: Klaus Pieper <[email protected]>
To: [email protected]
Subject: Similar problem booting from iscsi
Date: Fri, 27 Jun 2014 16:29:17 +0200
Dear Maintainers,

I have a similar problem booting from an iscsi target, system is jessie 
with latest updates.

Every other time the initramfs shell comes up with a message (lvm root 
device not found). After "vgchange -ay", ctrl-d the system boots normally.

A simple "sleep 1" seems to work as workaround.

--- lvm2.orig	2014-06-27 16:08:30.310727581 +0200
+++ lvm2	2014-06-27 16:07:53.789773177 +0200
@@ -60,6 +60,7 @@

 modprobe -q dm-mod

+sleep 1
 activate_vg "$ROOT"
 activate_vg "$resume"


Also, noticed that iscsi is not listed as prereq and added iscsi to the 
PREREQ variable. However, with this change (without the sleep 1), still 
had the boot error.


Klaus



Marked as fixed in versions lvm2/2.02.64-1. Request was from Bastian Blank <[email protected]> to [email protected]. (Sat, 06 Sep 2014 17:54:16 GMT) (full text, mbox, link).


Marked as found in versions lvm2/2.02.66-3, lvm2/2.02.54-1, and lvm2/2.02.66-5. Request was from Bastian Blank <[email protected]> to [email protected]. (Sat, 06 Sep 2014 17:54:17 GMT) (full text, mbox, link).


Added tag(s) squeeze and confirmed. Request was from Bastian Blank <[email protected]> to [email protected]. (Sat, 06 Sep 2014 17:54:17 GMT) (full text, mbox, link).


Merged 568838 715184 Request was from Bastian Blank <[email protected]> to [email protected]. (Sat, 06 Sep 2014 17:54:19 GMT) (full text, mbox, link).


Marked as found in versions lvm2/2.02.62-1. Request was from Bastian Blank <[email protected]> to [email protected]. (Sat, 06 Sep 2014 17:54:25 GMT) (full text, mbox, link).


Added tag(s) d-i. Request was from Bastian Blank <[email protected]> to [email protected]. (Sat, 06 Sep 2014 17:54:27 GMT) (full text, mbox, link).


Merged 568838 584558 715184 Request was from Bastian Blank <[email protected]> to [email protected]. (Sat, 06 Sep 2014 17:54:28 GMT) (full text, mbox, link).


Merged 568838 584558 715184 Request was from Bastian Blank <[email protected]> to [email protected]. (Sat, 06 Sep 2014 17:54:33 GMT) (full text, mbox, link).


Marked as found in versions lvm2/2.02.95-7. Request was from Bastian Blank <[email protected]> to [email protected]. (Sat, 06 Sep 2014 18:00:13 GMT) (full text, mbox, link).


Merged 568838 584558 715184 719335 Request was from Bastian Blank <[email protected]> to [email protected]. (Sat, 06 Sep 2014 18:00:18 GMT) (full text, mbox, link).


Marked Bug as done Request was from Bastian Blank <[email protected]> to [email protected]. (Thu, 13 Aug 2015 15:33:13 GMT) (full text, mbox, link).


Notification sent to Luc Maisonobe <[email protected]>:
Bug acknowledged by developer. (Thu, 13 Aug 2015 15:33:14 GMT) (full text, mbox, link).


Bug archived. Request was from Debbugs Internal Request <[email protected]> to [email protected]. (Mon, 05 Dec 2016 08:55:12 GMT) (full text, mbox, link).


Bug unarchived. Request was from Don Armstrong <[email protected]> to [email protected]. (Wed, 07 Dec 2016 01:34:08 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 12:50:04 2025; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.