Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 232383 - during boot, only the last md in /etc/mdadm.conf is activated sys-fs/mdadm
Summary: during boot, only the last md in /etc/mdadm.conf is activated sys-fs/mdadm
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: http://wirespeed.xs4all.nl/mediawiki/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-19 23:38 UTC by jippie
Modified: 2010-06-24 00:20 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 jippie 2008-07-19 23:38:49 UTC
When there are more than one metadevices defined in the /etc/mdadm.conf; only the last array in this file will be successfully started. 

http://wirespeed.xs4all.nl/mediawiki/index.php/Raid_5#metadevice_missing_after_reboot

Reproducible: Always

Steps to Reproduce:
1. Happens at every boot.
2.
3.

Actual Results:  
sudo reboot ;o)
Please refer to http://wirespeed.xs4all.nl/mediawiki/index.php/Raid_5#metadevice_missing_after_reboot
Please note that md1 is build on /dev/sd?1 and md2 is build on /dev/sd?2. These are partitioned USB drives. The drives had to be partitioned because lvm2 freaks out when a PV is larger than 2TB. This is described on the page aswell.

Expected Results:  
* Starting up RAID devices ...
mdadm: no devices found for /dev/md2
mdadm: /dev/md1 has been started with 4 drives
* Setting up the Logical Volume manager ...

* Starting up RAID devices ...
mdadm: /dev/md2 has been started with 4 drives
mdadm: /dev/md1 has been started with 4 drives
* Setting up the Logical Volume manager ...
Comment 1 jippie 2008-07-19 23:42:56 UTC
base-system@gentoo.org
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2008-07-20 00:19:53 UTC
No, LVM2 works PERFECTLY on devices larger than 2TB.

I've got a device thats 2.03TiB.

# pvdisplay  --units k                                            
  --- Physical volume ---
  PV Name               /dev/sda5
  VG Name               vg
  PV Size               2184982606.50 KB / not usable 4174.50 KB
  Allocatable           yes 
  PE Size (KByte)       4096
  Total PE              533442
  Free PE               446402
  Allocated PE          87040
  PV UUID               Nv2QuY-eWRs-iZ50-58Mf-XjMG-fURa-56Wixr

And I do have other machines with multiple devices in /etc/mdadm.conf, and they bring up all of the metadevices using mdadm fine on boot.
Comment 3 jippie 2008-07-20 00:26:23 UTC
The problem I meant to describe is that of two metadevices in /etc/mdadm.conf only the last is activated. I need to manually activate the first one by hand.
Comment 4 jippie 2008-07-20 00:37:07 UTC
Sorry didn't see your last sentences. 
Initially I created a single md of 4 750GB drives (RAID-5) that would successfully create a single device om some 2.050TB. When I created a PV from it, that PV was only 50GB in size. Shrinking the partitions on the drive solved that problem at 50GB cost (but who cares about 50GB with 2TB left) But in my opinion this is an entirely other problem that I didn't create a bug report for.
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2008-07-20 00:57:46 UTC
which version of metadata did you use to MD?

You cannot create MD devices larger than 2TiB with v0 metadata properly in some cases.

As a side-disadvantage, you cannot boot off v1 metadata in certain cases either, so you shouldn't have root on MD-raid if you need it.

As a workaround, split up your 750Gb drives into 3x250Gb partitions, make 3 sets of MD devices, then have all the PVs in a VG, with a linear allocation order (NOT mirror or stripe).
Comment 6 SpanKY gentoo-dev 2008-08-17 14:08:20 UTC
you also need to post `emerge --info` and what version of mdadm you're using
Comment 7 jippie 2008-08-17 14:52:39 UTC
Hope the below are all the answers to the questions above. Please advice if not.

Notice:
- this bug report is ***not*** about a 2TB size problem in combination with lvm2
- this bug report is about not all devices in /etc/mdadm.conf being activated during boot. But "mdadm --auto-detect" activates the other md with no problem at all. It always seems to skip the first line in /etc/mdadm.conf


===[ cat /etc/mdadm.conf ]===================
ARRAY /dev/md2 level=raid5 num-devices=4 UUID=639aae9c:d4580d26:bca3d506:48cc8f09
ARRAY /dev/md1 level=raid5 num-devices=4 UUID=78681ff1:c4e3598f:c1be1dfb:6e03c0f1

===[ mdadm --detail /dev/md1 ]===============
/dev/md1:
        Version : 00.90.03
  Creation Time : Sun Jul  6 10:34:29 2008
     Raid Level : raid5
     Array Size : 2142291456 (2043.05 GiB 2193.71 GB)
  Used Dev Size : 714097152 (681.02 GiB 731.24 GB)
   Raid Devices : 4
  Total Devices : 4
Preferred Minor : 1
    Persistence : Superblock is persistent

    Update Time : Sun Aug 17 16:28:34 2008
          State : clean
 Active Devices : 4
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 0

         Layout : left-symmetric
     Chunk Size : 64K

           UUID : 78681ff1:c4e3598f:c1be1dfb:6e03c0f1
         Events : 0.6934

    Number   Major   Minor   RaidDevice State
       0       8        1        0      active sync   /dev/sda1
       1       8       17        1      active sync   /dev/sdb1
       2       8       33        2      active sync   /dev/sdc1
       3       8       49        3      active sync   /dev/sdd1

===[ mdadm --detail /dev/md2 ]===============
mdadm: md device /dev/md2 does not appear to be active.

===[ mdadm --version ]=======================
mdadm - v2.6.4 - 19th October 2007

===[ emerge --info ]=========================
Portage 2.1.4.4 (default/linux/x86/2008.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25-gentoo-r6-sulfur-r1 i686)
=================================================================
System uname: 2.6.25-gentoo-r6-sulfur-r1 i686 Intel(R) Celeron(R) D CPU 3.20GHz
Timestamp of tree: Sat, 16 Aug 2008 23:00:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r13, 2.5.2-r6
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS=" -fforce-addr -fomit-frame-pointer -march=pentium4 -mno-tls-direct-seg-refs -O2"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS=" -fforce-addr -fomit-frame-pointer -march=pentium4 -mno-tls-direct-seg-refs -O2"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg distcc distlocks fixpackages metadata-transfer parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp.gentoo.mesh-solutions.com/gentoo/ http://pandemonium.tiscali.de/pub/gentoo/ ftp://pandemonium.tiscali.de/pub/gentoo/ ftp://ftp.rz.tu-bs.de/pub/mirror/ftp.gentoo.org/gentoo-distfiles/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://mirror.scarlet-internet.nl/pub/gentoo ftp://mirror.nutsmaas.nl/gentoo/"
LANG="en_US"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en en_US nl"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amr apache2 arts berkdb bitmap-fonts bluetooth bzip2 cairo cli cracklib crypt css cups dbus directfb divx dmi dri dvd dvdnav dvdr dvdread esd exif fam fbcon ffmpeg firefox flac flash foomaticdb force-cgi-redirect fortran gd gdbm gif gimp gimpprint gmedia gpm graphviz gtk gtk2 hal iconv imagemagick isdnlog java jpeg jpeg2k kde kdeenablefinal kqemu lcms logrotate loop-aes lzo midi mjpeg mmx mozcalendar mozsvg mp3 mpeg mudflap mysql ncurses network nls nptl nptlonly ogg opengl openmp pam pcre perl png ppds pppd python qt3 qt3support qt4 quicktime readline realmedia reflection screen session softmmu spl sse sse2 ssl svg sysfs tcl tcpd theora tiff tk tokenizer truetype truetype-fonts type1-fonts unicode usb utf8 v4l v4l2 vcd win32codecs wmf wmp x86 xcomposite xen xorg xulrunner xv yv12 zlib" ALSA_CARDS="via82xx" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US nl" USERLAND="GNU" VIDEO_CARDS="fbdev fglrx sis radeon vesa vga via"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 8 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2008-08-17 18:16:57 UTC
Please start md2 and include the --detail output for it.
Comment 9 jippie 2008-08-17 18:25:18 UTC
===[ mdadm --auto-detect ]===================
<no output> 

===[ mdadm --detail /dev/md2 ]===============
/dev/md2:
        Version : 00.90.03
  Creation Time : Sun Jul  6 10:34:42 2008
     Raid Level : raid5
     Array Size : 55423872 (52.86 GiB 56.75 GB)
  Used Dev Size : 18474624 (17.62 GiB 18.92 GB)
   Raid Devices : 4
  Total Devices : 4
Preferred Minor : 2
    Persistence : Superblock is persistent

    Update Time : Mon Aug 11 20:09:31 2008
          State : clean
 Active Devices : 4
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 0

         Layout : left-symmetric
     Chunk Size : 64K

           UUID : 639aae9c:d4580d26:bca3d506:48cc8f09
         Events : 0.20

    Number   Major   Minor   RaidDevice State
       0       8        2        0      active sync   /dev/sda2
       1       8       18        1      active sync   /dev/sdb2
       2       8       34        2      active sync   /dev/sdc2
       3       8       50        3      active sync   /dev/sdd2

===[ tail /var/log/syslog ]==================
Aug 17 20:20:16 sulfur kernel: md: Autodetecting RAID arrays.
Aug 17 20:20:16 sulfur kernel: md: could not bd_claim sdb1.
Aug 17 20:20:16 sulfur kernel: md: could not bd_claim sdc1.
Aug 17 20:20:16 sulfur kernel: md: could not bd_claim sda1.
Aug 17 20:20:16 sulfur kernel: md: could not bd_claim sdd1.
Aug 17 20:20:16 sulfur kernel: md: Scanned 8 and added 4 devices.
Aug 17 20:20:16 sulfur kernel: md: autorun ...
Aug 17 20:20:16 sulfur kernel: md: considering sdd2 ...
Aug 17 20:20:16 sulfur kernel: md:  adding sdd2 ...
Aug 17 20:20:16 sulfur kernel: md:  adding sda2 ...
Aug 17 20:20:16 sulfur kernel: md:  adding sdc2 ...
Aug 17 20:20:16 sulfur kernel: md:  adding sdb2 ...
Aug 17 20:20:16 sulfur kernel: md: created md2
Aug 17 20:20:16 sulfur kernel: md: bind<sdb2>
Aug 17 20:20:16 sulfur kernel: md: bind<sdc2>
Aug 17 20:20:16 sulfur kernel: md: bind<sda2>
Aug 17 20:20:16 sulfur kernel: md: bind<sdd2>
Aug 17 20:20:16 sulfur kernel: md: running: <sdd2><sda2><sdc2><sdb2>
Aug 17 20:20:16 sulfur kernel: raid5: device sdd2 operational as raid disk 3
Aug 17 20:20:16 sulfur kernel: raid5: device sda2 operational as raid disk 0
Aug 17 20:20:16 sulfur kernel: raid5: device sdc2 operational as raid disk 2
Aug 17 20:20:16 sulfur kernel: raid5: device sdb2 operational as raid disk 1
Aug 17 20:20:16 sulfur kernel: raid5: allocated 4203kB for md2
Aug 17 20:20:16 sulfur kernel: raid5: raid level 5 set md2 active with 4 out of 4 devices, algorithm 2
Aug 17 20:20:16 sulfur kernel: RAID5 conf printout:
Aug 17 20:20:16 sulfur kernel:  --- rd:4 wd:4
Aug 17 20:20:16 sulfur kernel:  disk 0, o:1, dev:sda2
Aug 17 20:20:16 sulfur kernel:  disk 1, o:1, dev:sdb2
Aug 17 20:20:16 sulfur kernel:  disk 2, o:1, dev:sdc2
Aug 17 20:20:16 sulfur kernel:  disk 3, o:1, dev:sdd2
Aug 17 20:20:16 sulfur kernel: md: ... autorun DONE.
Comment 10 jippie 2008-09-18 21:44:06 UTC
I found some interesting behaviour after adding an extra USB PCI card to my system. Curious if the performance of the RAID array would significantly change, I moved two drives that were attached to the motherboard USB host interface to the Conceptronics PCI interface board.

The motherboard USB host:
00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)
00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)
00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)
00:10.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)
00:10.4 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 86)

The Conceptronics PCI USB host:
00:08.0 USB Controller: ALi Corporation USB 1.1 Controller (rev 03)
00:08.1 USB Controller: ALi Corporation USB 1.1 Controller (rev 03)
00:08.2 USB Controller: ALi Corporation USB 1.1 Controller (rev 03)
00:08.3 USB Controller: ALi Corporation USB 2.0 Controller (rev 01)

Before the new USB interface:
Bus#  2
`-Dev#   1 Vendor 0x1d6b Product 0x0002      (USB2.0 host)
  `-Dev#   3 Vendor 0x0409 Product 0x005a    (hub)
    |-Dev#   5 Vendor 0x0930 Product 0x0b09  (sda)
    |-Dev#   6 Vendor 0x0930 Product 0x0b09  (sdb)
    |-Dev#   7 Vendor 0x0930 Product 0x0b09  (sdc)
    `-Dev#   8 Vendor 0x0930 Product 0x0b09  (sdd)

In this case /dev/md2 device was not started at all as described before.





With the new USB interface (reconstructed from memory):
Bus#  2
`-Dev#   1 Vendor 0x1d6b Product 0x0002      (USB2.0 host)
  `-Dev#   3 Vendor 0x0409 Product 0x005a    (hub)
    |-Dev#   5 Vendor 0x0930 Product 0x0b09  (sda)
    |-Dev#   6 Vendor 0x0930 Product 0x0b09  (sdb)
Bus#  1
`-Dev#   1 Vendor 0x1d6b Product 0x0002      (USB2.0 host)
  `-Dev#  23 Vendor 0x05e3 Product 0x0606    (hub)
    |-Dev#  24 Vendor 0x05e3 Product 0x070e  (card reader)
    |-Dev#   7 Vendor 0x0930 Product 0x0b09  (sdc)
    `-Dev#   8 Vendor 0x0930 Product 0x0b09  (sdd)

During boot I received the following errors:
mdadm: /dev/md2 assembled from 2 drives - not enough to start the array.
mdadm: /dev/md1 has been started with 4 drives


Remember that md2 is assembled from /dev/sd?2 
and md1 is assembled from /dev/sd?1
where ? equals a, b, c or d.

in this last case I wasn't able to start /dev/md1 with the mdadm --auto-detect command. I checked /proc/mdstat and it stated two drives for md2 and an (S) status.

Because I have real data on my array build it back to the original state.


Hope this helps
Comment 11 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2008-09-18 21:55:53 UTC
Move the drives off USB and into your system, and see if the problem persists.
Comment 12 jippie 2008-09-19 06:21:42 UTC
I would but there is not enough room, power and IDE interfaces.

(In reply to comment #11)
> Move the drives off USB and into your system, and see if the problem persists.
> 

Comment 13 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2008-09-19 06:43:09 UTC
Update your /etc/mdadm.conf as follow, and then rebuild your initramfs, then reboot.
====
DEVICE /dev/sd[abcd][12]
ARRAY /dev/md1 level=raid5 num-devices=4 UUID=78681ff1:c4e3598f:c1be1dfb:6e03c0f1
ARRAY /dev/md2 level=raid5 num-devices=4 UUID=639aae9c:d4580d26:bca3d506:48cc8f09
====
Comment 14 jippie 2008-09-22 19:19:26 UTC
(In reply to comment #13)
> Update your /etc/mdadm.conf as follow, and then rebuild your initramfs, then
> reboot.

1) I do not use initramfs. Haven't tried the changed file yet. Does this proposal require the use of initramfs?

2) I connected the whole array to the new PCI card and after a reboot it was able to activate the both md's. One difference I noticed was that the PC does not see the drives during boot/POST (that is before GRUB kicks in), the drives do not show up in the BOIS' boot menu, but I couldn't care less about that myself though.

I don't like the mechanical stability of the Conceptronix card, and therefore I don't want to use it for my storage array. 
Comment 15 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2008-09-22 20:11:05 UTC
"md: Autodetecting RAID arrays" is in the kernel before mdadm has started (before init() even).

From the output there "md: could not bd_claim sdb1.", something else has a lock on the partitions early on, and I suspect it's linked to your USB usage.

Since you aren't using initramfs, try to build all of the MD raid as modular, and only modprobe it later (eg don't let the kernel MD autodetect take place) when before you bring up mdadm. (I gather these are just data drives, not your boot drives, since you don't care that you can't boot from them).
Comment 16 jippie 2008-09-22 20:59:17 UTC
(In reply to comment #15)
> "md: Autodetecting RAID arrays" is in the kernel before mdadm has started
> (before init() even).
> 
> From the output there "md: could not bd_claim sdb1.", something else has a lock
> on the partitions early on, and I suspect it's linked to your USB usage.

I have the impression that you refer to comment #9. In this situation, just before writing #9, I have a running /dev/md1 array and a not running /dev/md2 array. At that moment Robin Johnson asked me to start the 2nd array (mdadmin --auto-detect) and after starting it I wrote that #9 comment.
The problem is that during boot only one array is succesfully started, the last one in the /etc/mdadm.conf
Because /dev/md1 is started, lvm2 is started and several LV's are mounted at that moment, therefore, in my opinion, it is not strange that there is a lock on /dev/md1 (and sd?1).

Indeed they are my data drives. I have to look into building a new kernel with MD as modules. Will these automatically load at the right moment when I add them to the modprobe.conf? I'll have to look into it because I also do not use any modules ... yet
Comment 17 jippie 2008-09-22 21:21:48 UTC
Please take a look at my dmesg right after reboot. Sorry for the long post.
Notice where the difference in the whole sequence where " sdd:<6>md: md2 stopped." and where " sdd:<6>md: md2 stopped." are located.
Isn't md2 tried to start before the BSD partition table (sd?2) of the drives is activated? That is before the kernel is aware of the partitions? And sd?1 right after the partitions table being interpreted?

===[ dmesg ]=================================
scsi2 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 4
usb-storage: waiting for device to settle before scanning
scsi3 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 5
usb-storage: waiting for device to settle before scanning
scsi4 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 6
usb-storage: waiting for device to settle before scanning
scsi5 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 7
usb-storage: waiting for device to settle before scanning
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver libusual
usbcore: registered new interface driver usbserial
drivers/usb/serial/usb-serial.c: USB Serial Driver core
drivers/usb/serial/usb-serial.c: USB Serial support registered for pl2303
usbcore: registered new interface driver pl2303
drivers/usb/serial/pl2303.c: Prolific PL2303 USB to serial adaptor driver
PNP: PS/2 Controller [PNP0303:PS2K,PNP0f13:PS2M] at 0x60,0x64 irq 1,12
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX port at 0x60,0x64 irq 12
mice: PS/2 mouse device common for all mice
input: AT Translated Set 2 keyboard as /class/input/input3
usbcore: registered new interface driver wacom
drivers/input/tablet/wacom_sys.c: v1.48:USB Wacom Graphire and Wacom Intuos tablet driver
input: PC Speaker as /class/input/input4
input: PS2++ Logitech Wheel Mouse as /class/input/input5
md: raid1 personality registered for level 1
raid6: int32x1    929 MB/s
raid6: int32x2    894 MB/s
raid6: int32x4    750 MB/s
raid6: int32x8    585 MB/s
raid6: mmxx1     1945 MB/s
raid6: mmxx2     2257 MB/s
raid6: sse1x1    1164 MB/s
raid6: sse1x2    2128 MB/s
raid6: sse2x1    2343 MB/s
raid6: sse2x2    3363 MB/s
raid6: using algorithm sse2x2 (3363 MB/s)
md: raid6 personality registered for level 6
md: raid5 personality registered for level 5
md: raid4 personality registered for level 4
device-mapper: ioctl: 4.13.0-ioctl (2007-10-18) initialised: dm-devel@redhat.com
Bluetooth: HCI USB driver ver 2.9
usbcore: registered new interface driver hci_usb
usbcore: registered new interface driver hci_usb
Bluetooth: Virtual HCI driver ver 1.2
Bluetooth: HCI UART driver ver 2.2
Bluetooth: HCI H4 protocol initialized
Bluetooth: Broadcom Blutonium firmware driver ver 1.1
usbcore: registered new interface driver bcm203x
Bluetooth: BlueFRITZ! USB driver ver 1.1
usbcore: registered new interface driver bfusb
wbsd: Winbond W83L51xD SD/MMC card interface driver
wbsd: Copyright(c) Pierre Ossman
input: Wireless Mouse Wireless Mouse as /class/input/input6
input: USB HID v1.10 Mouse [Wireless Mouse Wireless Mouse] on usb-0000:00:10.1-2
usbcore: registered new interface driver usbhid
drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.16rc2 (Thu Jan 31 16:40:16 2008 UTC).
ACPI: PCI Interrupt Link [ALKC] enabled at IRQ 22
ACPI: PCI Interrupt 0000:00:11.5[C] -> Link [ALKC] -> GSI 22 (level, low) -> IRQ 22
PCI: Setting latency timer of device 0000:00:11.5 to 64
usbcore: registered new interface driver snd-usb-audio
ALSA device list:
  #0: VIA 8237 with ALC655 at 0xcc00, irq 22
  #1: USB Device 0xeb1a:0x2821 at usb-0000:00:08.3-5, high speed
TCP cubic registered
Initializing XFRM netlink socket
NET: Registered protocol family 1
NET: Registered protocol family 17
NET: Registered protocol family 15
Bluetooth: L2CAP ver 2.9
Bluetooth: L2CAP socket layer initialized
Bluetooth: SCO (Voice Link) ver 0.5
Bluetooth: SCO socket layer initialized
Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM TTY layer initialized
Bluetooth: RFCOMM ver 1.8
Bluetooth: BNEP (Ethernet Emulation) ver 1.2
Bluetooth: HIDP (Human Interface Emulation) ver 1.2
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
Using IPI Shortcut mode
md: Autodetecting RAID arrays.
md: Scanned 0 and added 0 devices.
md: autorun ...
md: ... autorun DONE.
ReiserFS: hda3: found reiserfs format "3.6" with standard journal
ReiserFS: hda3: using ordered data mode
ReiserFS: hda3: journal params: device hda3, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: hda3: checking transaction log (hda3)
ReiserFS: hda3: Using r5 hash to sort names
VFS: Mounted root (reiserfs filesystem) readonly.
Freeing unused kernel memory: 248k freed
scsi 2:0:0:0: Direct-Access     WDC WD75 00AAVS-00D7B0         PQ: 0 ANSI: 2
scsi 3:0:0:0: Direct-Access     WDC WD75 00AAVS-00D7B0         PQ: 0 ANSI: 2
sd 2:0:0:0: [sda] 1465149168 512-byte hardware sectors (750156 MB)
sd 3:0:0:0: [sdb] 1465149168 512-byte hardware sectors (750156 MB)
sd 2:0:0:0: [sda] Write Protect is off
sd 2:0:0:0: [sda] Mode Sense: 38 00 00 00
sd 2:0:0:0: [sda] Assuming drive cache: write through
scsi 4:0:0:0: Direct-Access     WDC WD75 00AAVS-00D7B0         PQ: 0 ANSI: 2
sd 4:0:0:0: [sdc] 1465149168 512-byte hardware sectors (750156 MB)
sd 2:0:0:0: [sda] 1465149168 512-byte hardware sectors (750156 MB)
scsi 5:0:0:0: Direct-Access     WDC WD75 00AAVS-00D7B0         PQ: 0 ANSI: 2
sd 3:0:0:0: [sdb] Write Protect is off
sd 3:0:0:0: [sdb] Mode Sense: 38 00 00 00
sd 3:0:0:0: [sdb] Assuming drive cache: write through
sd 4:0:0:0: [sdc] Write Protect is off
sd 4:0:0:0: [sdc] Mode Sense: 38 00 00 00
sd 4:0:0:0: [sdc] Assuming drive cache: write through
sd 2:0:0:0: [sda] Write Protect is off
sd 2:0:0:0: [sda] Mode Sense: 38 00 00 00
sd 2:0:0:0: [sda] Assuming drive cache: write through
 sda:<5>sd 5:0:0:0: [sdd] 1465149168 512-byte hardware sectors (750156 MB)
sd 3:0:0:0: [sdb] 1465149168 512-byte hardware sectors (750156 MB)
sd 4:0:0:0: [sdc] 1465149168 512-byte hardware sectors (750156 MB)
sd 3:0:0:0: [sdb] Write Protect is off
sd 3:0:0:0: [sdb] Mode Sense: 38 00 00 00
sd 3:0:0:0: [sdb] Assuming drive cache: write through
 sdb:<5>sd 5:0:0:0: [sdd] Write Protect is off
sd 5:0:0:0: [sdd] Mode Sense: 38 00 00 00
sd 5:0:0:0: [sdd] Assuming drive cache: write through
sd 4:0:0:0: [sdc] Write Protect is off
sd 4:0:0:0: [sdc] Mode Sense: 38 00 00 00
sd 4:0:0:0: [sdc] Assuming drive cache: write through
 sdc:<5>sd 5:0:0:0: [sdd] 1465149168 512-byte hardware sectors (750156 MB)
sd 5:0:0:0: [sdd] Write Protect is off
sd 5:0:0:0: [sdd] Mode Sense: 38 00 00 00
sd 5:0:0:0: [sdd] Assuming drive cache: write through
 sdd:<6>md: md2 stopped.
 sdb1 sdb2
sd 3:0:0:0: [sdb] Attached SCSI disk
usb-storage: device scan complete
 sdc1 sdc2
sd 4:0:0:0: [sdc] Attached SCSI disk
usb-storage: device scan complete
 sda1 sda2
sd 2:0:0:0: [sda] Attached SCSI disk
usb-storage: device scan complete
 sdd1 sdd2
sd 5:0:0:0: [sdd] Attached SCSI disk
usb-storage: device scan complete
md: md1 stopped.
md: bind<sdb1>
md: bind<sdc1>
md: bind<sdd1>
md: bind<sda1>
raid5: device sda1 operational as raid disk 0
raid5: device sdd1 operational as raid disk 3
raid5: device sdc1 operational as raid disk 2
raid5: device sdb1 operational as raid disk 1
raid5: allocated 4203kB for md1
raid5: raid level 5 set md1 active with 4 out of 4 devices, algorithm 2
RAID5 conf printout:
 --- rd:4 wd:4
 disk 0, o:1, dev:sda1
 disk 1, o:1, dev:sdb1
 disk 2, o:1, dev:sdc1
 disk 3, o:1, dev:sdd1
ReiserFS: hda1: found reiserfs format "3.6" with standard journal
ReiserFS: hda1: using ordered data mode
ReiserFS: hda1: journal params: device hda1, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: hda1: checking transaction log (hda1)
ReiserFS: hda1: Using r5 hash to sort names
ReiserFS: dm-32: found reiserfs format "3.6" with standard journal
ReiserFS: dm-32: using ordered data mode
...
Comment 18 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2008-09-22 21:38:14 UTC
Yeah, I see it there. The partition scan is still running at the same time as the RAID detection. You need to convert to modules, and look up the scsi_wait_scan module specifically. So the problem isn't with mdadm specifically, but that your kernel isn't ready for the disk access to check the arrays.
Comment 19 jippie 2008-10-02 07:13:49 UTC
BTW: You can find my current kernel config here:

http://wirespeed.xs4all.nl/mediawiki/index.php/2.6.25-gentoo-r6-sulfur-r1
Comment 20 Marek Bartosiewicz 2008-12-25 15:02:56 UTC
Maybe this workaround will work for you: use usb-storage.delay_use=1 kernel parameter.
Comment 21 jippie 2009-03-14 17:17:15 UTC
Should I add this in the grub.conf file at the end of the kernel line?

(In reply to comment #20)
> Maybe this workaround will work for you: use usb-storage.delay_use=1 kernel
> parameter.
> 

Comment 22 jippie 2009-03-21 13:50:01 UTC
Definately seems to work for me, I added the parameter in my grub.lst on the kernel command line and all md's are brought online.
I am curious for the explanation why this parameter works.

(In reply to comment #21)
> Should I add this in the grub.conf file at the end of the kernel line?
> 
> (In reply to comment #20)
> > Maybe this workaround will work for you: use usb-storage.delay_use=1 kernel
> > parameter.
> > 
>