RAID FAQ - RAID0+1, RAID10 explained

sjonnie

Distinguished
Oct 26, 2001
1,068
0
19,280
RAID10 is not the same as RAID0+1.

In RAID0+1 a pair of discs are set up such that they make a RAID 0 array (Array1) and a second pair is set up as a RAID 0 array up which will mirror Array1 (Array2). If a disc in Array1 fails, then the whole of Array1 is now useless and you must restore from Array2 quickly. If a disc subsequently fails in Array2, your data is lost.

In RAID10 we first set up a pair of discs in a mirror array (Array1). Then we take a second pair of discs and set them up in a second mirror array (Array2). Then it arranged such that data is striped across the two arrays as in RAID 0. The difference is this. If a disc fails in Array 1, the second disc in Array 1 is an identical copy of the other, so the array continues to function. If a disc fails in Array 2, the same applies, and we can still funtion. Only if both discs in the same array fail simultaneously, do we loose data. Thus RAID10 is more secure than RAID0+1
 

HammerBot

Distinguished
Jun 27, 2002
1,342
0
19,290
Hmm. Scotty35 allready pointed out that there is a difference. But I still think its only a matter of naming convention. E.g Raid 0+1 vs. 1+0 (10) being about mirroring a striped array or striping a mirrored array.
I fail to see how a RAID 10 array is more secure than RAID 0+1. Taking your example with 4 drives. Whether its RAID 0+1 or RAID 10, two drives must fail before data is lost. How is RAID 10 more secure ?
Am I missing something obvious here ?

<i><b>Engineering is the fine art of making what you want from things you can get</b></i>
<A HREF="http://www.btvillarin.com/phpBB/viewtopic.php?t=655" target="_new">My systems</A>
 

sjonnie

Distinguished
Oct 26, 2001
1,068
0
19,280
Okay, imagine a simple, two disc RAID0 array. Now, if either disc fails in that array, your data is lost. To prevent that you could say, okay, I'll make a copy of my RAID0 array, hence a RAIDO+1 array. Of course, your copy is susceptible in the same way as the original, if either disc fails, the array is dead, but luckily this time you have your backup copy. If a disc should fail in that copy as well, your data's history.

Now imagine another simple two disc RAID0 array. This time, instead of copying the whole array, we make individual copies of the individual discs so that if one fails, we can use the other. If another drive fails, and it was not the copy of the first drive that failed, fine, we can carry on working. So depending on which drives fail, it can take 3 drive failures before you loose data on a RAID10 array.

Okay, I'm not a good mathemetician so I'm not sure about the exact probabilities, perhaps someone else can demonstrate the equation. But consider I am a system operator and just before I go home for the weekend I notice that a disc has failed in my RAID0+1 array. This means, all my data is now effectively on a single RAID0 array which 2x more likely to fail than having my data on a single disc. If however, I had built a RAID10 array, would my data be safer? The answer is yes. One disc has failed so the array is now dependent upon the continued operation of the remaining single disc in that half of the array and one of the two discs in the other half.
 

HammerBot

Distinguished
Jun 27, 2002
1,342
0
19,290
Ok. I'm just thinking out load here. Suppose you, as before, have 4 drives in RAID 0+1. Data is striped across drive A and B, and mirrored to drive C and D, so A is identical to C and B is identical to D. If any single drive fail, your array continues to function. If you loose 2 drives, you array <i>may</i> continue (e.g. if you loose A+B or C+D). But if you loose A+C or B+D, data is lost. So as you state for RAID10, depending on which drives fail, it takes 3 drive to fail before you loose any data.

In RAID10, data is mirrored and then striped. So B+D is now a mirror of A+C. As I see it, this is the exact same configuration as before but with different drives.

In either case if a single drive fails, the array is dependent on the continued operation of the stripe counterpart, and one of the two discs in the other half.

I'm sorry, but I really can't see that there is any difference between the two.

<i><b>Engineering is the fine art of making what you want from things you can get</b></i>
<A HREF="http://www.btvillarin.com/phpBB/viewtopic.php?t=655" target="_new">My systems</A>
 

sjonnie

Distinguished
Oct 26, 2001
1,068
0
19,280
The key difference between RAID10 and RAID0+1 is data security.

<pre> RAID10 RAID0+1
____|____ ____|____
_|_ _|_ _|_ _|_
| | | | | | | |
A = A B = B A ->B A ->B
C = C -> D = D C ->D = C ->D
E = E F = F E ->F E ->F
G = G H = H G ->H G ->H
mirror mirror striping striping
striping mirror
</pre><p>Okay, nice RAID arrays, lets look at what happens when one drive fails, drive C is history....

<pre> RAID10 RAID0+1
____|____ ____|____
_|_ _|_ _|_ _|_
| | | | | | | |
A = A B = B A ->B A ->B
<b>X</b> = C -> D = D <b>X</b> ->D = C ->D
E = E F = F E ->F E ->F
G = G H = H G ->H G ->H
mirror mirror striping striping
striping mirror
</pre><p>In the RAID10 situation, one of the C mirrors has failed. No problem though, the whole array can keep going because it can read from its mirror.

The RAID0+1 array is in trouble though, due to the failure of drive C that whole half of the array is no longer able to do anything. Consequently all data is being read from the 2nd half of the array in a simple RAID0 mode.

Huoh! Another drive failure, drive H is going down....

<pre> RAID10 RAID0+1
____|____ ____|____
_|_ _|_ _|_ _|_
| | | | | | | |
A = A B = B A ->B A ->B
<b>X</b> = C -> D = D <b>X</b> ->D = C ->D
E = E F = F E ->F E ->F
G = G H = <b>X</b> G ->H G -><b>X</b>
mirror mirror striping striping
striping mirror
</pre><p>Huoh, you really wish you had set up a RAID10 array now. The RAID0+1 server is down, gonna have to come in at 3am on Saturday morning and restore from your tape backups, but the RAID 10 server just keeps on humming...

Now I don't know for sure, perhaps if you physically swap the broken H drive with it's mirror, maybe you are going to be able to restore a working RAID0 setup but I don't think this is possible.

Notice the RAID10 server can survive quite a few more HD failures before it encounters a problem.

The difference is this, in the RAID10 setup, your pair of mirrored drives must fail for the array to go down - an unlikely scenario, especially if your drives are from different manufacturing batches. In the RAID0+1 setup, any two drives not in the same RAID0 array will cause the array to crash. I hope you can imagine, as a RAID0+1 array gets bigger, the chance of this happening increases. With a RAID10 setup, the chance of array failure is always the same.
 

HammerBot

Distinguished
Jun 27, 2002
1,342
0
19,290
Ok, I get it now. The problem was, I was looking too much on the math and too little on the (apperent) limitations of the controller. I was assuming that the controller could use the other drives in the stripe even if one drive was down.

Now I don't know for sure, perhaps if you physically swap the broken H drive with it's mirror, maybe you are going to be able to restore a working RAID0 setup but I don't think this is possible.
If this is possible (and I can't see why not), RAID0+1 and RAID10 would have same effective data security. But the advantage of RAID10 would still be that the array keeps going if controller can't do the 'swap' automatically.

Thanks for explaining it to me. I will update the FAQ and add a note about RAID 1+0 (10)

<i><b>Engineering is the fine art of making what you want from things you can get</b></i>
<A HREF="http://www.btvillarin.com/phpBB/viewtopic.php?t=655" target="_new">My systems</A>
 

lhgpoobaa

Illustrious
Dec 31, 2007
14,462
1
40,780
Excuse me... but are you guys trying to make my head explode? :lol:

Maaaaaaan im glad i was able to remove the RAID bit from my fAQ LOL

<b>LHGPooBaa + Evil Hamster Sidekick: Serving Toms Hardware community for 2 years as of the 11th of November</b>