Picture This: A Visual Guide to Redundant Arrays

A basic understanding of the technology behind RAID (Redundant Array of Independent Disks) is a necessity for many entry-level certifications, yet the concept can be difficult to make sense of. Currently, certification candidates need to know the topic — again, at a basic level — for all three of the core CompTIA certifications (A+, Network+, and Security+), as well as Cloud+ and exams from other vendors.

This guide uses the analogy of data being written to a cube to illustrate the differences between the primary RAID levels. It is important to note that while the concepts are illustrated using the same images throughout, there are differences between levels in that some work with bytes and others with blocks. In all cases, the visuals are intended to be consistent and the emphasis with them is on comprehension versus precision.

What is RAID?

RAID is simply a technology that uses multiple disks to provide fault tolerance. The acronym most commonly is associated with Redundant Array of Independent Disks, but you will see Inexpensive used as well, particularly in older documentation. Keep in mind that the usual purpose of RAID is to allow your servers to continue functioning if a hard drive fails.

RAID levels are implemented either in software on the host computer, or in the disk controller hardware. A hardware-configured RAID implementation will generally run faster than a software-configured RAID implementation because the software implementation uses the system CPU and system resources. Hardware RAID devices generally have their own processors, and they appear to the operating system as a single device. So long as a failed hard drive can be replaced with a new hard drive without needing to bring the system down, the arrangement is said to be hot swappable. There are several different levels/implementations of RAID and they are discussed in the following sections.

RAID 0

Even though the first letter of the RAID acronym stands for “redundant,” a RAID 0 implementation is not actually redundant. Known as disk striping, it uses multiple drives and maps them together as a single physical drive. This is done primarily for performance since there is no fault tolerance. The data is written to equally sized stripes (blocks) across all disks. Using multiple disks, reads and writes are performed simultaneously and that means that disk access is faster, making the performance of RAID 0 better than that of other RAID solutions and significantly better than that of a single hard disk.

Figure One shows a representation of RAID 0: Notice that the data on the two drives is different and there is no relationship between them. A minimum of two drives is needed to implement and there is no loss of capacity by using this level of RAID.

Redundant Array Fig01 SMALL

Figure One: With RAID 0, data is striped across multiple disks and there is no redundancy (fault tolerance).

 

The biggest downside of RAID 0 is that if any disk in the array fails, the entire logical drive becomes unusable and must be restored from backup.

RAID 1

The best way to understand RAID 1 is to consider the term commonly used to describe how it functions: disk mirroring. Disk mirroring provides 100 percent redundancy because everything is stored on two disks: If one disk fails, its mirror continues to operate. The failed disk can be replaced, and the RAID 1 array can be regenerated. Some implementations are called disk duplexing (duplexing is a less commonly used term) and the only difference between mirroring and duplexing is one more controller card.

With mirroring, one controller card writes sequentially to each disk. With duplexing, the same data is written to both disks simultaneously. Disk duplexing has much faster write performance than disk mirroring. Many hardware implementations of RAID 1 are actually duplexing but they are still generically referred to as mirrors.

RAID 1 offers load balancing over multiple disks, which increases read performance over that of a single disk. Write performance, however, is not improved. An important consideration is that other RAID levels using striping are often incapable of including a boot or system partition in fault tolerance solutions, but RAID 1 is perfectly suited for this. Figure Two shows a representation of RAID 1: notice that the data on the two drives is identical. A minimum of two drives is needed to implement RAID 1, and there is a 50 percent loss of capacity by using this level of RAID (effectively doubling the storage requirements).

Redundant Array Fig02 SMALL

Figure Two: With disk mirroring, each disk is an exact replica of the other.

Among the other shortcomings of RAID 1: It has a single point of failure, the hard disk controller. If the controller were to fail, the data would be inaccessible on either drive. Duplexing helps, but you still are at the mercy of only being able to survive the loss of one drive.

RAID 3 and 4

These two RAID levels are rarely used today and the biggest difference between them is whether they work with bytes (RAID 3) or blocks (RAID 4). Both can be considered disk striping with a parity disk and the disk in question is a dedicated disk. They implement fault tolerance by using striping (just like RAID 0) in conjunction with a separate disk that stores the parity information. Parity information is a value based on the value of the data stored in each disk location. This system ensures that the data can be recovered in the event of a failure.

The process of generating parity information uses the arithmetic value of the data binary. Using this math, there are only four things to remember: 0+0=0, 0+1=1, 1+0=1, and 1+1=0. When you use this math to add together 11000011 + 10110000, the resulting parity value is 01110011 and Figure Three illustrates this with the dedicated parity disk appearing in gold.

Redundant Array Fig03 SMALL

Figure Three: With RAID 3 and 4, parity is computed and written to a dedicated disk.

This process allows any single disk in the array to fail while the system continues to operate. If, for example, the second disk failed, you would be left knowing that 11000011 + (unknown) = 01110011 and be able to reverse it recreate all the missing values (11000011 – 01110011 = 10110000). Once a new disk was installed to replace the failed one, the parity information would be used to regenerate values needed.

A minimum of three disks are needed and a problem with this solution is that the parity disk is dedicated. That means that it must always be written to with every operation and that can slow the system down.

RAID 5

RAID 5 takes the concept of RAID 3 and 4 and turns it into disk striping with parity by doing away with the parity disk. The parity information (block-level striping) is spread (rotates) across all the disks in the array instead of being limited to a single disk. It requires a minimum of three disks and many implementations support a maximum of 32. Regardless of the number of drives in the array, it can survive the failure of any one drive and still be able to function, but it cannot survive the failure of multiple drives: If a second hard disk fails before the failed one is replaced, data loss could occur.

Figure Four shows a visual representation of RAID 5; notice that there is a loss of capacity by using this level of RAID equal to the size of one disk (thus it can range from 1/3 to 1/32).

Redundant Array Fig04 SMALL

Figure Four: With RAID 5, parity is distributed across all disks.

RAID 5 is commonly used today — making it the most popular of the fault tolerant solutions — even though it does slow write performance since parity has to be computed and then written across several disks. The biggest disadvantage is that when regeneration is needed, after replacing a bad disk with a new one, recalculating the values for the replacement and writing them can take considerable resources from the server.

RAID 6

Since the biggest weakness with RAID 5 is that it can only provide fault tolerance for a single drive, even though there can 32 in the array, RAID 6 addresses this by providing fault tolerance for up to two failed drives. It implements block-level striping with double distributed parity and is illustrated in Figure Five.

Redundant Array Fig05 SMALL

Figure Five: With RAID 6, parity is calculated and written to two disks.

A minimum of four drives are needed and the maximum is determined by the controller used. The loss of capacity by using this level of RAID equal to the size of two disks, thus it can range from 1/2 if you have four disks to 2/32if you have thirty-two disks, and so on.

RAID 1+0 and 0+1

Sometimes RAID levels are combined to take advantage of the best of each. One such strategy is RAID 10, which combines RAID levels 1 and 0 and is also known as RAID 1+0. In this configuration, four disks are required. As you might expect, the configuration consists of a mirrored stripe set — creating a striped set from a series of mirrored drives. To some extent, RAID 10 takes advantage of the performance capability of a stripe set while offering the fault tolerance of a mirrored solution. As well as having the benefits of each, though, RAID 10 inherits the shortcomings of each strategy. In this case, the high overhead and decreased write performance are the disadvantages.

RAID 0+1 is the opposite or RAID 1+0. Here, the stripes are mirrored (think of it as a “mirror of the stripes”). Figure Six shows an example of striped disks being mirrored.

Redundant Array Fig06 SMALL

Figure Six: With RAID 0+1, the striped set is mirrored.

Both RAID 10 and RAID 0+1 require a minimum of four drives. With RAID 10, two mirrored drives are used to each hold half of the striped data. With RAID 0+1, two mirrored drives are used to replicate the data on the RAID 0 array. While they sound confusingly similar, remember that the difference between them is the order of the operations: 10 is a stripe of the mirrors and 0+1 is a mirror of the stripes.

Summing It Up

The following table offers a summary of the most important attributes of each RAID level.

RAID LevelKnown AsDisks RequiredDisadvantagesAdvantages
0Disk Striping

2

No fault toleranceIncreased Read/write performance
1Mirroring

2

50 percent overhead and slow write performanceProvides fault tolerance and can incorporate a second disk controller (duplexing)
3 or 4Disk Striping with a Parity Disk

3

Since parity must always be written to one disk, it can slow the systemProvides fault tolerance with a cost of only one disk in what could be a large array
5Disk Striping with Distributed Parity

3

Regeneration can take timeBetter read performance over other parity solutions
6Disk Striping with Double Distributed Parity

4

Computing dual parity slows the system down more than RAID 5, slowing performanceAble to recover in the event of the loss of up to two drives
10Mirrored then Striped

4

Expensive to implement and half the storage space is used by the mirrorsRedundancy of RAID 1 coupled with the speed of RAID 0
0+1Striped then Mirrored

4

Just as expensive to implement as RAID 10 and half the storage space is used by the mirrorsSince no parity is computed, it is fault tolerant and fast

 

Like what you see? Share it.Share on Google+Share on LinkedInShare on FacebookShare on RedditTweet about this on TwitterEmail this to someone
Emmett Dulaney

ABOUT THE AUTHOR

Emmett Dulaney is an associate professor and the author of numerous certification study guides, including the forthcoming CompTIA Security+ Study Guide: SY0-401 (ISBN: 978-1118875070).

Posted in Certification|

Comment: