In the last article we reviewed the most basic RAID levels. In this article, we take things to the next level and discuss what is called "Nested RAID Levels". These concepts can provide both performance and redundancy for a data-rich world. We then look at RAID-01 and RAID-10; two of the most common Nested RAID configurations.
In our last article, I introduced the standard RAID levels: RAID-0, RAID-1, RAID-2, RAID-3, RAID-4, RAID-5, and RAID-6. While it may have been a review for many, I think it’s always good to go back and brush up on fundamental concepts from time to time. These were “single” RAID levels that have a single number associated with them such as RAID-0, RAID-1, RAID-5, RAID-6, etc. Remember that the intent of RAID is to provide extra performance and/or extra data redundancy so these single RAID levels are defined based these principles.
We found that some of the RAID levels emphasize performance, and some emphasize data redundancy. There are also some that try to provide a balance of the two goals but perhaps emphasized data redundancy more than performance. After a while people recognized that these single RAID level configurations might be limiting what we could achieve with RAID. Perhaps we could use multiple RAID configurations to achieve a better balance of performance and data redundancy.
In this article I want to talk about a further development of RAID that combines various RAID levels to create a “Nested RAID”. Nested RAID is sometimes also called Hybrid RAID with the concept of combining the standard RAID levels to perhaps create new and better RAID configurations.
Fundamentals of Nested RAID
The goals in using Nested RAID are the same as for standard RAID levels – better performance and/or better data redundancy. But typically, Nested RAID configurations look for a balance of performance and data redundancy. They are achieved by combining two or more standard RAID levels to create a “hybrid” RAID configuration. Originally, Nested RAID levels are created to either improve the performance of a standard RAID level that emphasizes redundancy, such as RAID-1, or to improve the redundancy of a standard RAID level that emphasizes performance such as RAID-0.
If you want to get a little geeky about it, you can think of Nested RAID levels like cooking. You sprinkle a little RAID-1 here, a little RAID-5 there, and then add RAID-0 at the end for performance and you have your solution. Now that I’ve finally used a cooking metaphor in a Linux storage column let’s move on to more technical details.
Nested RAID levels are usually labeled with a series of numbers rather than a single number as in the standard RAID levels. The most common have two levels or two numbers. Generically they can be written as RAID X+Y or RAID XY (assuming only two levels). For example, we can write RAID-10 where X=RAID-1 and Y=RAID-0. In the numbering scheme, the first number on the left, which is “X” in the generic scheme, is the lowest level in the nest. So in the case of RAID-10, the Nested RAID starts with RAID-1 at the lowest level.
Then the numbering scheme moves to the right. Using the generic RAID-XY sequence, the next RAID level is “Y”, to add the higher RAID levels. In the example of RAID-10, the lowest level is RAID-1, and then RAID-0 is the highest level. So RAID-0 is layered on top of RAID-1 (performance on top of redundancy).
The order of the RAID levels in the naming sequence is significant. RAID X+Y is not the same as RAID Y+X (sorry – no symmetry). RAID Y+X starts with RAID Y at the lowest level and ends with RAID X on top of it. In the case of RAID 10 (RAID X+Y), X is RAID-1 and is the lowest level, and Y is RAID-0 and is the highest level. For RAID Y+X, the opposite is true. RAID-0 is “Y” and is the lowest level and RAID-1 is “X” and is the highest level.
One might think that RAID-10 (RAID 1+0) and RAID-01 (RAID 0+1) are really the same thing and to some degree they are. They actually have fairly similar performance, capacity, and storage efficiency, but the big difference is in how many disks have to be read from, and written to, during regeneration when a Nested RAID fails. This article will talk more about this in subsequent sections.
One last comment as well. You don’t have to stay with just two levels such as RAID-XY. You can create as many levels as the hardware, or software, will allow. So you can easily create RAID-XYZ if you like (and if the hardware or software will allow it).
With that said, let’s move on to some common Nested RAID Combinations, starting with RAID-01 or RAID 0+1.
In this Nested RAID configuration, you start my creating two identical groups of disks and applying RAID-0 across each group. Then you use RAID-1 to combine the two groups. Figure 1 below shows how this is laid out.
Figure 1: RAID-01 layout with Four Drives
In this example, four disks are used. Two groups of two disks each are created and each group is built with RAID-0 (for performance). Then the two groups are combined using RAID-1 (mirroring) for data redundancy.
The data flow in Figure 1 is fairly easy to follow. The data chunk “A” is sent to the RAID group at the highest level (RAID-1). The blocks making up the chunk “A” are mirrored by sending them to the two groups (RAID-1). Then the data is striped across the two disks in each group per the RAID-0. So in Figure 1 you can see where blocks A1, A2, A3, and so on reside on the disks. Be sure to notice how the block mirroring (RAID-1) works so that there are two copies of each block in the RAID configuration (i.e. disks 1 and 3 contain the same blocks).
Since it’s difficult to go into more depth with just four drives, let’s try an example with six drives as shown in Figure 2 below.
Figure 2: RAID-01 layout with Six Drives