Erik de Castro Lopo <[email protected]> writes:
> I have an Ubunt Hardy system which has a two disk raid1 (mdadm) root
> partition. With both disks, it boots quite quickly.
>
> When testing booting with a single disk, I found that booting stalls
> for about 5 minutes and then completes properly. The stall happens
> around the time of the message "Reading files needed to boot".
>
> Is there any way of reducing the duration of this stall?
"Reading files needed for boot" is one of the very earliest things that
happens after the boot process transfers to the actual root directory.
Just before that the initramfs discovers the devices and mounts the root
directory and, my guess is, at this point the delay occurs.
Specifically, Ubuntu builds the RAID array component by component as the
devices are discovered. If the array is degraded I understand that it waits
some time to see if the final component turns up later.[1]
Anyway, last time I used Ubuntu it would drop to a shell when the RAID array
was degraded, and they were talking about some sort of nicer behaviour to
ensure that you /did/ boot without interaction.
My guess would be that this is what you are seeing: after a long timeout, if
there are enough devices for the array to run in degraded mode, Ubuntu gives
up waiting for the last component and carries on the boot.
To diagnose that I would take a look at the hooks and scripts that build the
initramfs, or possibly boot without 'quiet', or with 'verbose' and/or 'debug'
enabled, to verify that this was *before* the root mounted, not after.
Oh, or you could look into dmesg and see what the timestamp between the array
starting to assemble and the root filesystem mounting looks like. If that has
the five minute wait then you can be reasonably happy that the delay is in the
early boot process.
Finally, to remedy the problem (if I am correct), mark the missing device as
failed, or remove it from the array. That will update the superblock so the
system *knows* not to wait, because it knows that only one device exists.
Regards,
Daniel
Footnotes:
[1] This is more relevant for things like iSCSI, AoE or FC connected devices,
found on real servers, that on your machine ... but even there USB or
SCSI devices can mean five or ten seconds of delay in device discovery.
--
✣ Daniel Pittman ✉ [email protected] ☎ +61 401 155 707
♽ made with 100 percent post-consumer electrons
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html