×

Search anything:

Redundant arrays of independent disks (RAID)

Internship at OpenGenus

Get this book -> Problems on Array: For Interviews and Competitive Programming

In this article, we have covered what are Redundant arrays of independent disks and the commonly used RAID levels. This is an important topic in Memory management / storage in System Design.

Table of contents:

  1. Introduction to Redundant arrays of independent disks (RAID)
  2. Levels of RAID
    • RAID 0 - Striping
    • RAID 1 - Mirroring
    • RAID 5 - Striping with parity
    • RAID 6 - Striping with double parity
    • RAID 10 -Mirroring + Striping

Introduction to Redundant arrays of independent disks (RAID)

RAID is an acronym for Redundant arrays of independent disks.RAID is a data storage technology that logically combines multiple disks and treats them as a single disk to improve performance and/or reliability.
RAID consists of two or more disks working in parallel.

Levels of RAID

RAID 0 - Striping

In RAID 0 the data is split evenly across two or more disks. Since RAID 0 uses multiple disks at the same time, the read and write operations are very fast.

Raid2

Advantages

  • RAID 0 offers the best read and write performance among all RAID levels.
  • In RAID 0 all the capacity of the disks is available for data storage.

Disadvantages

  • Does not provide fault-tolerance since if one disk fails, all the data in the rest of the disks are lost as well.

RAID 1 - Mirroring

RAID 1 requires at least two disks. The data is copied on the available disks so that all disks have identical data. This ensures that if one of the disks fails, no data is lost.

Raid1-1

Advantages

  • RAID 1 is reliable as the failure of a single disk does not result in loss of data.
  • No performance overhead as you get the full performance of the drives.

Disadvantages

  • In RAID 1 only half the capacity of the disks is available as the other half stores the copy of the data.

RAID 5 - Striping with parity

In RAID 5, the data blocks are striped across the drives, and on each level, one drive contains a parity checksum of the information stored on that level. The parity data is used to retrieve the data in case one disk fails.

RAID 5 requires at least 3 disks and can withstand the failure of a single disk without losing data. The parity information is striped across the disks as shown below.

Raid5

Advantages

  • RAID 5 offers fast read speeds as data is striped across drives.
  • It also ensures the data is protected by using a quarter of the drive for fault tolerance leaving the other three quarters for data storage.

Disadvantages

  • Without a dedicated hardware controller write speeds are a bit slower since the parity has to be calculated.
  • The rebuild time of the array, once a disk fails, is time-consuming depending on the size of the drive.

RAID 6 - Striping with double parity

RAID 6 is similar to RAID 5 but the parity data is written to two disks.
RAID 6 requires at least 4 disks and can withstand the simultaneous failure of two disks without losing data.

Raid6

Advantages

  • RAID 6 offers fast read speeds as data is striped across drives.
  • It also ensures that the data is safe even in the event of two disks failing simultaneously.

Disadvantages

  • The write speeds are lower than those of RAID 5 due to the additional parity data that has to be calculated.
  • The rebuild time of the array, once a disk fails, is time-consuming depending on the size of the disk.

RAID 10 -Mirroring + Striping

RAID 10 combines both RAID 1(mirroring) and RAID 0(striping). This increases the speed and redundancy. RAID 10 requires at least 4 disks. In the disk configuration, the two mirrored disks have half of the striped data and the other two disks contain the other half of the data.

Raid10-1

Advantages

  • Offers fast rebuild like RAID 1 if one disk fails as we only need to copy all the data from the surviving mirror disk to a new disk.
  • Has fast read and write performance.

Disadvantages

  • It only offers half the capacity as the other half goes to mirroring.
  • If two mirrored disks fail at the same time, all the data will be lost.

RAID does not replace the need for backing up data as backup comes in handy in cases where all the disks fail simultaneously.

With this article at OpenGenus, you must have a strong idea of what Redundant arrays of independent disks are and the commonly used RAID levels.

Redundant arrays of independent disks (RAID)
Share this