# kernel autodetection for raid 0 over raid 1 (RAID10)

## as.gentoo

Here's what I basically did

```
mdadm -C /dev/md1 -l1 -n2 /dev/sde1 /dev/sda1

mdadm -C /dev/md2 -l1 -n2 /dev/sdg1 /dev/sdc1

mdadm -C /dev/md3 -l0 -n2 /dev/md1 /dev/md2   # virtually RAID10
```

The RAID-1 sets are detected by the kernel but I'd like to use the RAID-10 /dev/md3 in the fstab (even better the UUID of the corresponding partition). What can I do?

thanks in advance

----------

## cyrillic

You could use the kernel's RAID10 support instead of building your own by nesting RAID0 and RAID1 ...

"man mdadm" explains how to set this up in more detail.

----------

## as.gentoo

 *cyrillic wrote:*   

> You could use the kernel's RAID10 support instead of building your own by nesting RAID0 and RAID1 ...

 

I know, but when I trust my tests the nested RAID ist faster than "mdadm-10 RAID"...

edit:

bonnie++ shows a difference between 25 and 38% when reading which is a lot IMO! For example read test w/ 2 GB file (bonnie++ -s 2g) is 87MB/s with nested and just 63MB/s with non-nested sw-RAID-10...Last edited by as.gentoo on Fri Mar 12, 2010 11:12 am; edited 3 times in total

----------

## as.gentoo

anyways...

When I boot the gparted lifeCD the nested RAID10 arrays are found! So I guess the kernel is able to find the nested RAID10... Can anyone please tell me what I need to set up in order to achieve that when I boot my system?

Autodetecting RAID10, RAID1 and RAID0 is compiled in.

----------

## cyrillic

You will probably need to setup an initrd/initramfs to detect the arrays and do the nesting.

----------

## as.gentoo

 *cyrillic wrote:*   

> You will probably need to setup an initrd/initramfs to detect the arrays and do the nesting.

 Ok, I haven't done this yet but I guess there are some tuts that show how to do that. 

What can be used to autodetect the nested mdadm-RAID-sets there? 

I think I shouldn't be in need to do that on myself since I don't tell the gparted lifeCD neither what my nested RAID sets consist of...

I'ts not that I'm lazy but IMO as much that can be done automatically should be done that way and ... as easy too.  :Wink: 

 *

http://lkml.indiana.edu/hypermail/linux/kernel/0201.2/1562.html wrote:*   

> > >
> 
> > > Does the kernel support autostarting nested RAID partitions?
> 
> > >
> ...

 I do...

----------

