Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 153630 - mdadm fails to start raid array on usb as device nodes arent created soon enough
Summary: mdadm fails to start raid array on usb as device nodes arent created soon enough
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-31 16:37 UTC by Miguel Marte
Modified: 2008-12-25 14:59 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miguel Marte 2006-10-31 16:37:57 UTC
mdadm fails to start the raid array which i created on 2 usb drives.  The reason is that the /dev entries for them are not created before mdadm tries start the array.  The array is raid1 using 2 external 320 gig hds.  Their dev entries are /dev/sdb* and /dev/sdc*.  In the mean time i just start and mount the array manually in local.start.
Comment 1 SpanKY gentoo-dev 2006-10-31 17:52:14 UTC
what /dev entries ?  you mean /dev/sdb* and /dev/sdc* ?
Comment 2 Miguel Marte 2006-10-31 18:06:49 UTC
(In reply to comment #1)
> what /dev entries ?  you mean /dev/sdb* and /dev/sdc* ?
> 

yea the entries for the usb drives.
Comment 3 SpanKY gentoo-dev 2006-10-31 19:21:31 UTC
not a mdadm bug
Comment 4 Miguel Marte 2006-10-31 19:43:33 UTC
This should be a baselayout bug where raid is being started too early.  When do the dev entries get created? after usbfs starts?
Comment 5 Matthias Schwarzott gentoo-dev 2007-03-01 23:58:00 UTC
The dev entries should be created as soon as the related sysfs dirs exist.
Then udev cares about them and creates the devices.
But if for example your ehci_hcd is a module, then usb is started up as soon as udevd is started.
The code scanning for the devices attached to the usb-ata/scsi chips can take a while.

Perhaps this just takes longer than udevd needs to be started up, and thus mdadm is started too early.
A. Either try to compile all modules into the kernel to give it more time for startup,
or
B. write a dummy rcscript addon that just waits (with a timeout) for your devices to appear.
Comment 6 Marek Bartosiewicz 2008-12-25 14:59:22 UTC
Workaround: use usb-storage.delay_use=1 kernel parameter.