What is RAID? Different types of RAID

The full form of RAID is a redundant array of independent disks. It employs techniques of striping, mirroring, or parity to create large reliable data stores.

Scope 

This article explains RAID in detail.

Definition

The performance growth of secondary storage devices is much less compared with the rate of processors and main memory. The two major challenges faced by the storage technologies today are :

  • Disk I/O throughput should be increased.
  • Data accessibility at the time of hard disk failures 

The basic idea behind RAID(A redundant array of independent disks)  is to combine multiple small, inexpensive disk drivers into an array to accomplish performance or redundancy goals that are not attainable with large and expensive drives.

The main functions of RAID are:

  1. Storing the saved data in different places on multiple hard disks and improving storage performance.
  2. Promise better throughput 
  3. Data fault tolerance 

RAID appears to the operating system as a single logical hard disk, instead of multiple hard disks. The RAID controller controls how data is sorted and accessed across the physical and logical arrays. Arrays mean collections of hard disks.

RAID levels:

RAID supports 7 levels, RAID 0 to RAID 7

RAID 0 :

(Stripping/spam)

  • RAID level 0 is often called “stripping”.
  • The idea behind this level is that the data to be stored is divided into a number of parts (called strips) and these strips are loaded across the member of the disk of the array.

Advantages

  • It is a very fast method
  • Performance-oriented disk mapping method.
  • Performance is better than a single drive.
  • Useful for a high-performance system.

RAID level 1 (Mirroring)

RAID level 1 uses at least two duplicate hard drives and stores the exact same blocks of information between them. So it is called mirroring. If one of the mirrored devices fails due to mechanical problems or does not respond, then the remaining drive will continue to serve and provide the correct data.

Advantage

  • High reliability 
  • Fault tolerance and recovery from failure are simple.
  • Good performance 

Disadvantage

  • Very costly to implement because of mirroring data.
  • A minimum of two devices are needed to implement RAID 1.

RAID level 2 (Error-correction coding)

Memory systems detect errors using parity bits. The parity bit may be either 1 or 0. If one of the bits gets damaged (1 changes to 0, 0 changes to 1), the parity of the byte changes and thus does not match with the stored parity. Similarly, if the stored parity bit is damaged, it does not match the computed parity. All single-bit errors are detected by the memory system.

RAID level 3 (bit interleaved parity organization)

The idea behind RAID level 3 is if one of the sections is damaged, we know exactly which section it is, and we can figure out whether any bit in the section is 1 or 0 by computing the parity of corresponding bits from sections in the other disk.

If the parity of the remaining bits is equal to the stored parity, the missing bit is 0 otherwise 1.

Advantage

  • Storage overhead is decreased or reduced because only one parity bit is needed for several storage devices, whereas one mirror disk is needed for every disk in level 1.
  • Since reading and writing bytes are spread out over multiple disks with N way stripping of data, it is N time faster than level 1.

Disadvantage

  •  RAID 3 supports fewer I/O per second.

RAID level 4 (block interleaved parity)

It uses block-level striping as RAID 0, and in addition, it keeps parity blocks on a separate disk for corresponding blocks from N other disks. 

If one disk fails, the parity block can be used with corresponding blocks from the other disks to restore the blocks of the failed disk.

RAID level 5 (block interleaved distributed parity)

As compared to RAID level 4, parity is spread among all N+1 disks, rather than storing data in N disks.

RAID level 6 (P+Q redundancy)

This is called the P+Q redundancy scheme, it is like RAID 5 but it stores extra redundant information to guard against multiple disk failures.

Instead of parity, error-correcting codes such as Reed Solomon codes is used.

Summary

RAID combines multiple small, inexpensive disk drives into an array to accomplish performance and redundancy goals that are not attainable with large and expensive drives. RAID supports 7 levels RAID 0 to RAID 6.

Special thanks to Avaneet Kaur Saluja for contributing to this article on takeUforward. If you also wish to share your knowledge with the takeUforward fam, please check out this article