# RAID array not autodetecting at boot??

## redgsturbo

Can't get the box to auto assemble the array.. always says no raid disks found and drops to a shell, where i "mdadm --assemble", activate lvm, and select my root.  Here's what I've checked so far:

the superblocks are persistent.

the partition types are all raid-autodetect

the arrays assemble fine by hand

mdadm is in the initrd (used genkernel)

mdadm.conf is in the initrd

sofware raid and the raid levels are compiled into the kernel

```
localhost# dmesg | grep md  

md: raid1 personality registered for level 1

md: raid6 personality registered for level 6

md: raid5 personality registered for level 5

md: raid4 personality registered for level 4

md: raid0 personality registered for level 0

md: raid10 personality registered for level 10

md: md0 stopped.

md: bind<sdb1>

md: bind<sdc1>

md: bind<sda1>

raid1: raid set md0 active with 3 out of 3 mirrors

md: md1 stopped.

 md0: unknown partition table

md: bind<sdb2>

md: bind<sdc2>

md: bind<sda2>

raid5: allocated 3218kB for md1

raid5: raid level 5 set md1 active with 3 out of 3 devices, algorithm 2

 md1: unknown partition table
```

Thoughts?  rebooting is annoying

----------

## pigeon768

I assume CONFIG_MD_AUTODETECT is turned on in the kernel config? Are you using metadata style 0.90? Are the component devices primary (not logical) partitions.

----------

## redgsturbo

 *pigeon768 wrote:*   

> I assume CONFIG_MD_AUTODETECT is turned on in the kernel config? Are you using metadata style 0.90? Are the component devices primary (not logical) partitions.

 

CONFIG_MD_AUTODETECT = y

```
localhost kernels # fdisk -l /dev/sda

Disk /dev/sda: 500.1 GB, 500107862016 bytes

255 heads, 63 sectors/track, 60801 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk identifier: 0x41ab2316

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1          31      248976   fd  Linux raid autodetect

/dev/sda2              32       60801   488135025   fd  Linux raid autodetect

localhost kernels # mdadm --examine /dev/sda1

/dev/sda1:

          Magic : a92b4efc

        Version : 0.90.00

           UUID : 5f79018e:2cbed91a:45b6bc08:f8bd307c

  Creation Time : Tue Sep 16 12:12:54 2008

     Raid Level : raid1

  Used Dev Size : 248896 (243.10 MiB 254.87 MB)

     Array Size : 248896 (243.10 MiB 254.87 MB)

   Raid Devices : 3

  Total Devices : 3

Preferred Minor : 0

    Update Time : Thu May 28 10:41:46 2009

          State : clean

 Active Devices : 3

Working Devices : 3

 Failed Devices : 0

  Spare Devices : 0

       Checksum : 6c96199 - correct

         Events : 82

      Number   Major   Minor   RaidDevice State

this     0       8        1        0      active sync   /dev/sda1

   0     0       8        1        0      active sync   /dev/sda1

   1     1       8       17        1      active sync   /dev/sdb1

   2     2       8       33        2      active sync   /dev/sdc1

localhost kernels # mdadm --examine /dev/sda2

/dev/sda2:

          Magic : a92b4efc

        Version : 0.90.00

           UUID : 2351bca3:dd08464b:eab1d1b4:2acd44ab

  Creation Time : Tue Sep 16 12:13:11 2008

     Raid Level : raid5

  Used Dev Size : 488134912 (465.52 GiB 499.85 GB)

     Array Size : 976269824 (931.04 GiB 999.70 GB)

   Raid Devices : 3

  Total Devices : 3

Preferred Minor : 1

    Update Time : Thu May 28 12:00:55 2009

          State : clean

 Active Devices : 3

Working Devices : 3

 Failed Devices : 0

  Spare Devices : 0

       Checksum : 6f0d0297 - correct

         Events : 22540

         Layout : left-symmetric

     Chunk Size : 64K

      Number   Major   Minor   RaidDevice State

this     0       8        2        0      active sync   /dev/sda2

   0     0       8        2        0      active sync   /dev/sda2

   1     1       8       18        1      active sync   /dev/sdb2

   2     2       8       34        2      active sync   /dev/sdc2

localhost kernels # 

```

----------

## redgsturbo

Interestingly enough, switching to use an ubuntu generic kernel and initrd resolves that issue.... so it is something wrong with my kernel or initrd

----------

## redgsturbo

Condition persists on a second machine built for server duty

----------

## Sysa

 *redgsturbo wrote:*   

> Interestingly enough, switching to use an ubuntu generic kernel and initrd resolves that issue.... so it is something wrong with my kernel or initrd

 

Of course, something is wrong with your kernel. First of all I would like to suggest you to compile RAID support into kernel. If it helps - check your initrd, if not - compare your kernel config with the Ubuntu generic one.

----------

## redgsturbo

 *Sysa wrote:*   

>  *redgsturbo wrote:*   Interestingly enough, switching to use an ubuntu generic kernel and initrd resolves that issue.... so it is something wrong with my kernel or initrd 
> 
> Of course, something is wrong with your kernel. First of all I would like to suggest you to compile RAID support into kernel. If it helps - check your initrd, if not - compare your kernel config with the Ubuntu generic one.

 

running with raid levels and dm compiled in already... didn't fix the issue  :Sad: 

----------

## Sysa

 *redgsturbo wrote:*   

>  *Sysa wrote:*    *redgsturbo wrote:*   Interestingly enough, switching to use an ubuntu generic kernel and initrd resolves that issue.... so it is something wrong with my kernel or initrd 
> 
> Of course, something is wrong with your kernel. First of all I would like to suggest you to compile RAID support into kernel. If it helps - check your initrd, if not - compare your kernel config with the Ubuntu generic one. 
> 
> running with raid levels and dm compiled in already... didn't fix the issue 

 

Please take mine here: http://rapidshare.com/files/240569957/config-2.6.29-gentoo-r5amd64ws878.html

It is from my desktop, made by hand, without initrd, all necessary drivers compiled in.

It works for me for years (with relevant upgrades, of course  :Wink: ).

----------

