What is RAID?

RAID is short for Redundant Array of Inexpensive (Independent) Disks. The primary idea of it is to use multiple disks to achieve resilient storage, e.g. safety and consistency of data.

This article mainly talks about the difference between RAID 10 and RAID 01. If you are not familiar with any RAID, please get to know them first. Here are some good articles.

I learned a lot from RAID 10 Vs RAID 01, after which I obtained a basic understanding of our topic today.


RAID 10 VS RAID 01

The main difference between RAID 10 and RAID 01 is their fault tolerance level. Their performance and capacity are the same when all disk are healthy, but when disk fails, the difference shows.

Keep in mind that, a RAID group is controlled by a RAID controller, and difference groups are independent, which means that difference controllers cannot cooperate with each other, except basic I/O operation.

RAID 10

First let’s look at RAID 10, a.k.a. RAID 1 + 0. In RAID 10, disks are first grouped to make RAID 1, and then RAID 1 are grouped to make RAID 0. So it is also called “stripe of mirrors”. A healthy RAID 10 array is shown below.

For an abstract view of the structure of RAID 10, it can be better understood.

When performing write operation, RAID 0 first “stripify” the data, and send each stripe to RAID 1. RAID 1 then take their part of data and mirrors it. When performing read operation, RAID 0 asks RAID 1 for each part of the stripped data, and RAID 1 simply provides it.

Well, you may pause for a while and think about it before you move on.

When disks in RAID 10 fails, what will happen?

As stated above, we use an abstract view to analyze it. RAID 0 dispatch all I/O tasks to RAID 1, so only RAID 1 is directly affected. When one disk in RAID 1 fails, it can still work fine as it has redundant copy. Thus as long as every RAID 1 has at least one disk healthy, the entire RAID 10 array can tolerate the failure. As shown in the figure below, red ones are failed disks, yet it can still works normally. Only if both disks in one RAID 1 group fails can result in the entire failure.

RAID-10-BAD

RAID 01

Well, as opposed to RAID 01, a.k.a. RAID 0 + 1, disks are first grouped to make RAID 0, then mirrored with RAID 1. A healthy RAID 01 array is shown below. This time, only two groups of RAID 0, and it is easy to understand based on the trait of RAID 1 and RAID 0.

RAID-01-GOOD

Still, think in abstract view. In this case, RAID 1 will dispatch I/O job to RAID 0, while RAID 0 performs the final I/O. One thing to notice is that, these two RAID 0 cannot communicate with each other! This is what bothers me first, as if RAID 0 can cooperate with each other, the situation will change. But, such cooperation will violate the initial thought of RAID, which means to have independent disks and arrays.

So, since two RAID 0 cannot communicate with each other, the RAID 0 works just like it is used alone. Wait a minute, RAID 0, alone…? That means, a single disk failure in RAID 0 group will result in the failure of the whole RAID 0 sub-array! Which then makes the RAID 01 essentially a RAID 0, as the RAID 1 on top loses one of its mirror, and only rely on the remaining RAID 0. And all that that implies, if two disks (one in each RAID 0 group) fails, the entire RAID 01 will fail.

So as the figure below shows, the red disk fails, thus the RAID 0 is belongs to fails. The grey ones are healthy, but due to the failure disk, they cannot work either. Hence, this RAID 01 becomes a RAID 0.

RAID-01-BAD

Fault Tolerance

If we only consider failure of two disks, we can calculate the possibility of entire failure of RAID 10 and RAID 01.

For RAID 10, the possibility is 1/6 * 1/5 = 1/30, 1/5 means the second failure should be in the same RAID 0 group of the first one.

For RAID 01, the possibility is 1/6 * 3/5 = 3/30 = 1/10, that is, if these two are in different groups, the entire array will fail.


Conclusion

In a word, both RAID 10 and RAID 01 has the same performance and capacity, but RAID 10 has more fault tolerance. If you’re going to make a choice, RAID 10 should always be the answer.