[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#616689: Root-on-LVM setup fails often due to timing issues



Package: initramfs-tools
Version: 0.98.8
Severity: normal

Hello,

On my box (Sunblade 1000) the LVM initialization does not happen fast 
enough, so mounting root filesystem fails in roughly 95% of the cases:

[   90.520448] qla2xxx 0001:00:04.0: Allocated (252 KB) for firmware 
dump...
[   90.764373] qla2xxx 0001:00:04.0: LIP reset occurred (f8e8).
[   90.867334] scsi0 : qla2xxx
[   90.935081] qla2xxx 0001:00:04.0: LIP occurred (f7f7).
[   91.031152] qla2xxx 0001:00:04.0: LOOP UP detected (1 Gbps).
[   91.135284] qla2xxx 0001:00:04.0: 
[   91.135288]  QLogic Fibre Channel HBA Driver: 8.03.05-k0
[   91.135293]   QLogic QLA22xx - 
[   91.135297]   ISP2200: PCI (66 MHz) @ 0001:00:04.0 hdma-, host#=0, fw=2.02.08 TP
Begin: Loading essential drivers ... done.
Begin: Run[   91.621764] device-mapper: uevent: version 1.0.3
ning /scripts/init-premount ... don[   91.713376] device-mapper: ioctl: 4.18.0-ioctl (2010-06-29) initialised: dm-devel@redhat.com
e.
Begin: Mounting root file system ... Begin: Running /scrip[   91.879330] scsi 0:0:0:0: Direct-Access     HITACHI  DKR1C-J072FC     D7V5 PQ: 0 ANSI: 3
ts/local-top ... [   92.031443] sd 0:0:0:0: Attached scsi generic sg2 type 0
[   92.035463] sd 0:0:0:0: [sdb] 142410400 512-byte logical blocks: (72.9 GB/67.9 GiB)
[   92.054186] sd 0:0:0:0: [sdb] Write Protect is off
[   92.061913] sd 0:0:0:0: [sdb] Write cache: enabled, read cache: enabled, supports DPO and FUA
[   92.101015]  sdb: sdb1 sdb2 sdb3
[   92.607567] sd 0:0:0:0: [sdb] Attached SCSI disk
  Volume group "debian" not found
  Skipping volume group debian
Unable to find LVM volume debian/root
done.
Begin: Waiting for root file system ... done.
Gave up waiting for root device.  Common problems:
 - Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
   - Check root= (did the system wait for the right device?)
 - Missing modules (cat /proc/modules; ls /dev)
ALERT!  /dev/mapper/debian-root does not exist.  Dropping to a shell!


BusyBox v1.17.1 (Debian 1:1.17.1-10) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/bin/sh: can't access tty; job control turned off
(initramfs) 

Running 'vgchange -a y' at this point activates all volume groups and 
exiting the initramfs shell causes the boot to proceed normally.

The problem can be solved by passing either 'scsi_mod.scan=sync' or 
'rootdelay=20' on the command line. The rootdelay option handling is 
slightly counterintuitive: in /scripts/init-top/udev we will sleep for 
$ROOTDELAY seconds if it is set, however if rootdelay= is not 
specified on the command line we will not sleep here, and boot will 
fail. in /scripts/local ROOTDELAY is set to a default of 30 seconds if 
rootdelay= is not set, but sleeping here does not help, as the LVM 
devices will not magically appear without vgchange being called, and 
that's not going to happen, because /scripts/local/top have been run 
at this point already.

There are a few options of fixing it in the generic case:

1. Make scsi_mod.scan=sync the default. The implication of this are 
unclear to me.
2. Try to activate the volume groups at the end of the 
waiting-for-root time in /scripts/local.
3. Come up with some way of asynchronous notification of volume groups 
being available for activation, and invoke vgchange on this 
notification. I clearly don't know about how LVM works internally to 
accomplish something like this, an udev hook, perhaps?

While the bug is fairly harmless and plenty of workarounds exist, I 
consider fixing it desirable, as it would case a boot failure on some 
systems immediately after installation, and figuring out what's going 
on may be a bit of a challenge for the user.

Best regards,
-- 
Jurij Smakov                                           jurij@wooyd.org
Key: http://www.wooyd.org/pgpkey/                      KeyID: C99E03CC



Reply to: