There are 2 ways to RAID10 with mdadm. With 1 layer of mdadm or with 2 layers of mdadm. I would prefer the 1 layer of mdadm (meaning using mdadm level 10 algorithm) rather than the 2 layer of mdadm (mds of raid1 raided to an md of raid0), because less layers is faster:

1 LAYER USING MDADM –level 10:

If you constructed your mdadm raid out of 1 layer of MD like this:

You know that the RAID10 will look either like this

sda3 raid1 with sdb3
sdc3 raid1 with sdd3
and those are raid0ed

or is it

sda3 raid1 with sdd3
sdc3 raid1 with sdb3
and those are raid0ed

One way to find out:

So the pairs are like this

pair 1 is sda3 and sdb3
pair 2 is sdc3 and sdd3

So we know that sda3 and sdb3 are raid1 pairs, and we know that sdc3 and sdd3 are raid1 pairs.

How does this benefit me?

Ex: Lets pretend we had 3 disk fail.. sdb, sdc and sdd… Well knowing what we know we know that we can clone/recover disk sdc or sdd (probably which ever disk is better off, we will clone that one). Then we can get our data, we wont need to clone all 3 drives. Because the system would be able to run with 2 missing drives.

2 LAYER USING MDADM

So lets say you made a raid10 like this:

 
Then you raid0ed it like this:

 
Then of course you would use md20 to mount

start off with what you mount in this case it would be md20. And get its info with mdadm -D

 

It will show us its members as md10 and md11. We then would use

 

Now we know that the drives in md10 are raid1ed together and the drives in md11 are in a different raid1.

Leave a Reply

Your email address will not be published. Required fields are marked *