Friday, May 22, 2009

Raid 10 or 01?

Since I'm on about raid, I was thinking that I should make a short note about raid 1o versus raid 01. As you might know, raid 0, is also known as striping, and distributes the data equally over all the drives participating in the raid. It offers no redundancy, but it does make writing data to disc quicker and requires no parity calculation. The storage space available equals the size of the smallest hard drive times two.

Raid 1 is also known as mirroring, and writes all the data to all the drives participating in the raid. This offer great data redundancy, but the space available for data storage  is equal to the smallest hard drive in the array.

Raid 10 (1+0) and o1 (0+1) both means that you have raid 1 and raid 0 in the same system, your data is both striped and mirrored. What's the difference between 10 and 01 then?

If we first stripe the discs three and three and then mirror them (raid 01), we can illustrate the raid like this:
A B C
D E F

First we stripe the data over A, B and C, and then we mirror that data to D, E and F. If a disc fails in one of the striped sets, any disc failure in the other striped set would result in a complete loss of data. To make things worse, in order to restore a failed disc, all the other discs on the array needs to participate in the rebuilding of the data on the replacement drive.

If we instead mirror the discs two and two, and then stripe them (raid 10), we can illustrate the setup like this:
A B
C D
E F

We now have three sets of striped discs, and as a result, even if one disc breaks down, the only way to loose all our data is if the other disk in the same striped set also breaks down. If a second disc in any of the other striped sets break down the data is still accessible.

Note that if you are using four discs, there isn't any (noticeable) difference between raid 10 and 01.
A B
D E

No matter how you set up the four discs, you will still loose all the data if two of the discs break.

No comments: