Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian Kernel (http://www.linux-archive.org/debian-kernel/)
-   -   Bug#616689: Root-on-LVM setup fails often due to timing issues (http://www.linux-archive.org/debian-kernel/497904-bug-616689-root-lvm-setup-fails-often-due-timing-issues.html)

Jurij Smakov 03-06-2011 03:53 PM

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



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110306165327.GA3480@droopy.oc.cox.net">http://lists.debian.org/20110306165327.GA3480@droopy.oc.cox.net

Juliusz Chroboczek 07-21-2011 07:52 PM

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

I'm confirming this bug, and raising the severity to important.

Jcristau and I have just finished upgrading a very old server from
oldstable to stable. We were hoping to be able to perform the upgrade
over ssh. We ended up having to go on-site, and spent the best part of
an hour struggling with this issue. (This particular server takes some
5 minutes to reboot, so every change in the initramfs configuration is
a pain.)

scsi_mod.scan=sync turned out to solve our problem (thanks, Jurij).

-- Juliusz



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87sjpz5s3g.fsf@trurl.pps.jussieu.fr">http://lists.debian.org/87sjpz5s3g.fsf@trurl.pps.jussieu.fr

Francesc Guasch 10-06-2011 09:50 AM

Bug#616689: Root-on-LVM setup fails often due to timing issues
 
Hi. I too stumbled with this bug. In my experience I have to
manually type vgchange -a y every time it boots. Then CTRl-D.

I tried adding the suggestions to grub, but it didn't work.
Maybe I just missed something ?

I modified:

/etc/default/grub

and added this:

GRUB_CMDLINE_LINUX="scsi_mod.scan=sync"

I also tried this:

GRUB_CMDLINE_LINUX="scsi_mod.scan=sync rootdelay=20"


then I run update-grub. I checked the grub command line when
booting and the options were there.



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4E8D79DA.2010505@telecos.upc.edu">http://lists.debian.org/4E8D79DA.2010505@telecos.upc.edu

Jim Barber 10-21-2011 02:48 AM

Bug#616689: Root-on-LVM setup fails often due to timing issues
 
I too have issues with this problem.

For all of our Dell PowerEdge servers I've needed to use the rootdelay parameter.
Ages ago I used to have it set to rootdelay=10
Then a number of months ago after some upgrades the failure was happening again.
I had to bump it up to rootdelay=20

Today I upgraded a virtual machine running on VMware VSphere from kernel 2.6.32 to 3.0.0.
It is also exhibiting the boot problem of not finding the volume group fro the root mount point.
Adding rootdelay to it fixed it.

The rootdelay parameter seems to be a moving target, and increasing it too much adds an unnecessary delay to boots.

I was finally going to report this when I came across this bug report.
I'll try the scsi_mod.scan=sync option as maybe this won't cause unnecessary delays?

But it would be good to have this fixed as standard.

Francesc, maybe try 'dpkg-reconfigure grub-pc' and specify the parameters that way?
You might have more luck with that...

--
----------
Jim Barber
DDI Health



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4EA0DD93.2020605@ddihealth.com">http://lists.debian.org/4EA0DD93.2020605@ddihealth.com

Francesc Guasch 10-24-2011 11:50 AM

Bug#616689: Root-on-LVM setup fails often due to timing issues
 
Al 21/10/11 04:48, En/na Jim Barber ha escrit:

I too have issues with this problem.

>

I was finally going to report this when I came across this bug report.
I'll try the scsi_mod.scan=sync option as maybe this won't cause unnecessary delays?

>

Francesc, maybe try 'dpkg-reconfigure grub-pc' and specify the parameters that way?
You might have more luck with that...


Hi, thank you Jim. I tried but I still have to manually type

(initramfs) vgchange -a y

everytime it boots. That's how it looks now /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="scsi_mod.scan=sync rootdelay=35"

any workaround to make this host boot on its own would be appreciated.



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4EA55109.9090103@telecos.upc.edu">http://lists.debian.org/4EA55109.9090103@telecos.upc.edu


All times are GMT. The time now is 10:09 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.