From: Arkadiusz Miskiewicz <a.miskiewicz@gmail.com>
To: James Bottomley <James.Bottomley@suse.de>
Cc: linux-scsi@vger.kernel.org, Arjan van de Ven <arjan@infradead.org>
Subject: Re: scsi_wait_scan not working (2.6.30.5)
Date: Tue, 25 Aug 2009 22:01:20 +0200 [thread overview]
Message-ID: <200908252201.20797.a.miskiewicz@gmail.com> (raw)
In-Reply-To: <1251229652.7539.10.camel@mulgrave.site>
On Tuesday 25 of August 2009, you wrote:
> On Tue, 2009-08-25 at 21:44 +0200, Arkadiusz Miskiewicz wrote:
> > On Tuesday 25 of August 2009, James Bottomley wrote:
> > > On Tue, 2009-08-25 at 21:24 +0200, Arkadiusz Miskiewicz wrote:
> > > > What could be the reason for scsi_wait_scan not waiting untill all
> > > > disks are found?
> > > >
> > > > I'm testing 2.6.30.5 on hardware with LSI Logic / Symbios Logic
> > > > MegaRAID 530 SCSI 320-0X RAID controller and modprobe scsi_wait_scan
> > > > finishes earlier than disks are found.
> > > >
> > > > My initrd (romfs) does:
> > > > insmod /lib/modules/2.6.30.5-0.3/kernel/drivers/scsi/scsi_mod.ko
> > > > insmod
> > > > /lib/modules/2.6.30.5-0.3/kernel/drivers/scsi/megaraid/megaraid_mm.ko
> > > > insmod
> > > > /lib/modules/2.6.30.5-0.3/kernel/drivers/scsi/megaraid/megaraid_mbox.
> > > >ko insmod /lib/modules/2.6.30.5-0.3/kernel/lib/crc-t10dif.ko
> > > > insmod /lib/modules/2.6.30.5-0.3/kernel/drivers/scsi/sd_mod.ko
> > > > insmod
> > > > /lib/modules/2.6.30.5-0.3/kernel/drivers/scsi/scsi_wait_scan.ko
> > > > insmod /lib/modules/2.6.30.5-0.3/kernel/fs/exportfs/exportfs.ko
> > > > insmod /lib/modules/2.6.30.5-0.3/kernel/fs/xfs/xfs.ko
> > > > if [ "${ROOT##/dev/}" != "${ROOT}" ]; then
> > > > rootnr="$(busybox awk -v rootnode="${ROOT##/dev/}" '$4 == rootnode {
> > > > print 256 * $1 + $2 }' /proc/partitions)"
> > > > if [ -n "$rootnr" ]; then
> > > > echo "$rootnr" > /proc/sys/kernel/real-root-dev
> > > > fi
> > > >
> > > >
> > > > Now if I add sleep few seconds or /bin/sh at the end of this initrd,
> > > > then boot and then disks are detected properly and rootfs is mounted
> > > > properly (after I exit from sh in case when /bin/sh is used).
> > > >
> > > > The question remains - why scsi_wait_scan doesn't wait?
> > >
> > > It's caused by the sd async patches. What's happening is wait_scan is
> > > waiting until all the scans are complete, but now sd attachment may not
> > > be completed by the time that happens. So, although you have a scanned
> > > disk, you can't mount it without and attached sd driver.
> > >
> > > Hopefully when
> > > all initrds are configured to wait until root appears, this problem
> > > will go away.
> >
> > Uh, ugly. I'll disable SCSI_SCAN_ASYNC here then.
>
> That won't actually help: the sd async scan is a separate mechanism not
> tied to that variable
I assume there is no configurable way to disable this?
>
> > Anyway what's the point of scsi_wait_scan module if initrd is still
> > required to wait until root appears? (unless current behaviour is broken
> > behaviour meant to be fixed?)
>
> It was supposed to be an interim measure until the ditributions got
> their act together for initrd booting by waiting for the root disk to
> appear. It's just been "interim" for a bit longer than expected.
Isn't kernel better place for this?
Handling that in userspace is very complicated for such setups like fs on top
of software raid where raid is assembled by UUID of devices etc, etc.
Userspace will need to handle all weird cases to figure out what devices are
needed (eg. parse mdadm config) to be able to wait for thsese and then go into
next step.
Are major distros actually handling this well?
> James
--
Arkadiusz Miśkiewicz PLD/Linux Team
arekm / maven.pl http://ftp.pld-linux.org/
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-08-25 20:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-25 19:24 scsi_wait_scan not working (2.6.30.5) Arkadiusz Miskiewicz
2009-08-25 19:28 ` James Bottomley
2009-08-25 19:44 ` Arkadiusz Miskiewicz
2009-08-25 19:47 ` James Bottomley
2009-08-25 20:01 ` Arkadiusz Miskiewicz [this message]
2009-08-25 21:22 ` Arkadiusz Miskiewicz
2009-08-25 23:15 ` Alan Stern
2009-08-29 23:27 ` Arkadiusz Miskiewicz
2009-08-30 3:07 ` Alan Stern
2009-08-30 8:12 ` Arkadiusz Miskiewicz
2009-08-30 17:21 ` Alan Stern
2009-08-26 14:34 ` Chris Webb
2009-08-26 15:40 ` James Bottomley
2009-08-26 16:23 ` Chris Webb
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200908252201.20797.a.miskiewicz@gmail.com \
--to=a.miskiewicz@gmail.com \
--cc=James.Bottomley@suse.de \
--cc=arjan@infradead.org \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.