Redundant Array of Inexpensive Disks
In the late 1980s those smart folks at UC Berkley gave the world RAID. Known initially as Redundant Array of Inexpensive Disks, corporations soon changed this to Redundant Array of Independent Disks (likely to remove any assumption that RAID products should be inexpensive). Regardless of what you call it, RAID has become an industry standard and prepared computer storage reliability for the age of the Internet.
Prior to RAID computer storage reliability was ad-hoc, messy, and not very reliable. Since the advent of RAID the various architectures of RAID are denoted by numbers, such as RAID-0 and RAID-1 through to RAID-6. There has been some manufacturers which have used numbers greater than 6, but these are proprietary architectures which are really hybrids of the original seven architectures. Below is a short description of each of the six original RAID architectures. But first I'll introduce some of the common terminology associated with RAID, and with computer storage reliability in general.
Data striping is a technique where a block of data can be segmented into numerous blocks so that sequential blocks can be written to different physical mediums. For example, if we have a large document needing to be saved and we have two hard drives set up in the proper configuration (more on that later) we can segment the document into numerous parts. The first part of the document can be written to drive 1 while drive 2 prepares for a write operation. After drive 1 finishes the write operation part 2 of the document is then written to drive 2 while drive 1 prepares for the next write operation. This can save a significant amount of time because the write operations don't have to wait for the disk's drive head to move into place. Documents, or any block of data, can be segmented into any number of parts, usually this is chosen by software to maximize the advantages of not having to wait for the movement of the drive head.
Parity is a technique used for error correction. It is used in data storage in much the same was as it is used in communication protocols like TCP/IP. For a given amount of data there will be a parity bit associated with that data. The parity bit will either be a '1' or a '0' representing whether there is an even or odd number of '1' bits in the actual data. When reading the data if the parity bit is not correct then it is obvious that there was an error somewhere in the process of writing and reading. Of course, like with communication protocols, multiple errors could make the parity bit correct even though there were errors. The parity bit should never be used as the sole method of error detection.
Mirroring is exactly what it sounds like. If one hard drive is the mirror of another hard drive then it is an exactly logical representation of that hard drive. The process of mirroring can happen numerous ways; synchronously, asynchronously, or semi-synchronously.
Now that we understand some of the terminology, here is a brief description of each of the seven main RAID configurations/architectures.
RAID-0 is based solely on data striping and provides no additional fault tolerance or resistance. RAID-0 configurations will merely strip the data to be written and utilize all drives in the RAID array to provide an increase in read/write bandwidth. This can lead to significant gains in performance.
RAID-1 is somewhat opposite to RAID-0 in that it is based solely on data mirroring. If the RAID-1 array contains two hard drives then one hard drive is the exact logical copy of the other. This provides complete fault tolerance for the failure of either one of the drives. This type of configuration can give increased read performance if the operating system is multi-threaded and can support split seeks. Split seeks is exactly what it sounds like; the ability to seek information from multiple sources.
Figure 1: A representation of RAID-1 courtesy of bytepile.com
RAID-2 employs a bit level striping scheme where each sequential bit is stored on a different drive in the RAID array. The RAID-2 architecture also employs an advanced parity scheme called Hamming parity. In contrast to the basic parity I've described above, Hamming parity is able to detect an even amount of errors under certain circumstances. Because of the Hamming parity's ability to detect two errors, it is also able to automatically correct an error when there is just one. You can read more about the Hamming code parity here [link here to http://www.ee.unb.ca/tervo/ee4253/hamming.shtml].
A RAID-3 architecture will employ a stripping scheme similar to that of RAID-2 except that in the case of RAID-3 the stripping is done at a byte level so that each sequential byte is written on a different disk in the RAID array. RAID-3 also uses parity though in this case simple parity is used for each byte, the parity bits themselves being stored on a dedicated disk in the RAID array.
RAID-4 employs block level striping and calculates parity per block while storing the parity bits on a dedicated drive. In this architecture the drives perform independently and can therefore be accessed in parallel by the operating system. When the disks are being accessed in parallel, the drive dedicated to the parity bits can become a bottleneck for read performance. For that reason the RAID-4 configuration is not a common choice; it is rare to see this architecture used in any system.
Figure 2: A representation of RAID-4, courtesy of bytepile.com
RAID-5 is identical to the RAID-4 architecture except that the parity is distributed across all drives, thereby eliminating the bottleneck. The RAID-5 architecture requires all but one drive in the RAID array to be functional. That means that the RAID-5 architecture is failure-tolerant for exactly 1 complete disk failure. The user will only experience data loss with the complete failure of two or more drives. However, with the loss of one drive the array is now as vulnerable to failure as that of an array in the RAID-0 configuration. With large data centres employing large RAID-5 arrays it is quite dangerous during the time a disk failure is detected until it can be replaced; it is during this time that data loss can happen and is an example of the need for RAID-6.
Figure 3: A Representation of RAID-5, courtesy of bytepile.com
RAID-6 is identical to RAID-5 except that it doubles the distributed parity. This allows the array to recover from exactly two complete drive failures. The significance of this architecture is mostly realized in large data centres where one drive failure is detected. During the time between when the drive failure is detected and the drive can be replaced arrays in the RAID-6 configuration are still disaster-tolerant, giving the data centre an even higher degree of data integrity.
As I mentioned previously, there are other non-standard architectures out there for RAID arrays. Some of the more common uncommon (is that possible?) architectures are combinations of the above architectures. For instance some systems employ a RAID-0+1 architecture, or even a RAID-1+0 architectures. These architectures attempt to combine the benefits of the individual architectures while minimizing the draw-backs. They mostly succeed in this goal but at the expense of added complexity.
So that is a general explanation of RAID architectures. As always if you have any questions, send me an email and I'll do my best to send you an answer promptly.