Re: wait for the boot device
- To: md@Linux.IT
- Cc: debian-boot@lists.debian.org
- Subject: Re: wait for the boot device
- From: Ferenc Wagner <wferi@niif.hu>
- Date: Thu, 04 Jun 2009 17:39:37 +0200
- Message-id: <[🔎] 87bpp4j9dy.fsf@tac.ki.iif.hu>
- In-reply-to: <8763i1cave.fsf@tac.ki.iif.hu> (Ferenc Wagner's message of "Mon, 23 Mar 2009 01:59:33 +0100")
- References: <20090322113908.GA21870@bongo.bofh.it> <87fxh5iajw.fsf@tac.ki.iif.hu> <20090322213233.GA7403@bongo.bofh.it> <87skl5ci3b.fsf@tac.ki.iif.hu> <20090322223225.GA12962@bongo.bofh.it> <87ljqxcgk2.fsf@tac.ki.iif.hu> <20090322230835.GA13609@bongo.bofh.it> <8763i1cave.fsf@tac.ki.iif.hu>
Ferenc Wagner <wferi@niif.hu> writes:
> md@Linux.IT (Marco d'Itri) writes:
>
>> On Mar 22, Ferenc Wagner <wferi@niif.hu> wrote:
>>
>>> I really hoped you'd provide some pointers how to attack this best, or
>>
>> I have never used this feature. If you are not totally sure about what
>> you are doing please refrain from dumping a probable grave bugs generator
>> on me... :-)
>
> I'm pretty sure it won't cause any harm, but will recheck with the
> kernel guys.
>
>>> if [ -d /sys/bus/scsi ]; then
>>
>> If you do this before udevadm settle, you have a race.
>
> Thanks. Then I guess I'll have to put this after, and do another
> udevadm settle afterwards, just like in the separate script.
So I'm back again, with the below patch running fine on a couple of
our production machines for a couple of months now. Please consider
incorporating it in some form.
Thanks,
Feri.
--- /usr/share/initramfs-tools/scripts/init-premount/udev 2009-04-15 23:05:42.000000000 +0200
+++ udev 2009-06-04 17:31:05.919424375 +0200
@@ -20,6 +20,14 @@
udevadm trigger
udevadm settle || true
+if [ -d /sys/bus/scsi ]; then
+ echo -n "Waiting for SCSI scan ..."
+ modprobe scsi_wait_scan
+ modprobe -r scsi_wait_scan
+ udevadm settle || true
+ echo " SCSI scan finished."
+fi
+
# If the rootdelay parameter has been set, we wait a bit for devices
# like usb/firewire disks to settle.
if [ "$ROOTDELAY" ]; then
Reply to: