RAID 0, RAID 1, RAID 5, RAID 10 Explained With Diagrams: by Ramesh Natarajan On August 10, 2010
RAID 0, RAID 1, RAID 5, RAID 10 Explained With Diagrams: by Ramesh Natarajan On August 10, 2010
RAID 0, RAID 1, RAID 5, RAID 10 Explained With Diagrams: by Ramesh Natarajan On August 10, 2010
On most situations you will be using one of the following four levels of RAIDs.
• RAID 0
• RAID 1
• RAID 5
• RAID 10 (also known as RAID 1+0)
This article explains the main difference between these raid levels along with an easy to understand diagram.
• Minimum 2 disks.
• Excellent performance ( as blocks are striped ).
• No redundancy ( no mirror, no parity ).
• Don’t use this for any critical system.
RAID LEVEL 1
RAID Page 1
Following are the key points to remember for RAID level 1.
• Minimum 2 disks.
• Good performance ( no striping. no parity ).
• Excellent redundancy ( as blocks are mirrored ).
RAID LEVEL 5
• Minimum 3 disks.
• Good performance ( as blocks are striped ).
• Good redundancy ( distributed parity ).
• Best cost effective option providing both performance and redundancy. Use this for DB that is heavily read oriented. Write operations will be
slow.
RAID LEVEL 10
Following are the key points to remember for RAID level 10.
• Minimum 4 disks.
• This is also called as “stripe of mirrors”
RAID Page 2
• This is also called as “stripe of mirrors”
• Excellent redundancy ( as blocks are mirrored )
• Excellent performance ( as blocks are striped )
• If you can afford the dollar, this is the BEST option for any mission critical applications (especially databases).
From <https://www.thegeekstuff.com/2010/08/raid-levels-tutorial/>
However there are several non-standard raids, which are not used except in some rare situations. It is good to know what they are.
This article explains with a simple diagram how RAID 2, RAID 3, RAID 4, and RAID 6 works.
RAID 2
• This uses bit level striping. i.e Instead of striping the blocks across the disks, it stripes the bits across the disks.
• In the above diagram b1, b2, b3 are bits. E1, E2, E3 are error correction codes.
• You need two groups of disks. One group of disks are used to write the data, another group is used to write the error correction codes.
• This uses Hamming error correction code (ECC), and stores this information in the redundancy disks.
• When data is written to the disks, it calculates the ECC code for the data on the fly, and stripes the data bits to the data-disks, and writes the ECC
code to the redundancy disks.
• When data is read from the disks, it also reads the corresponding ECC code from the redundancy disks, and checks whether the data is
consistent. If required, it makes appropriate corrections on the fly.
• This uses lot of disks and can be configured in different disk configuration. Some valid configurations are 1) 10 disks for data and 4 disks for ECC
2) 4 disks for data and 3 disks for ECC
• This is not used anymore. This is expensive and implementing it in a RAID controller is complex, and ECC is redundant now-a-days, as the hard
disk themselves can do this.
RAID 3
• This uses byte level striping. i.e Instead of striping the blocks across the disks, it stripes the bytes across the disks.
• In the above diagram B1, B2, B3 are bytes. p1, p2, p3 are parities.
• Uses multiple data disks, and a dedicated disk to store parity.
• The disks have to spin in sync to get to the data.
• Sequential read and write will have good performance.
• Random read and write will have worst performance.
• This is not commonly used.
RAID 4
RAID Page 3
• This uses block level striping.
• In the above diagram B1, B2, B3 are blocks. p1, p2, p3 are parities.
• Uses multiple data disks, and a dedicated disk to store parity.
• Minimum of 3 disks (2 disks for data and 1 for parity)
• Good random reads, as the data blocks are striped.
• Bad random writes, as for every write, it has to write to the single parity disk.
• It is somewhat similar to RAID 3 and 5, but a little different.
• This is just like RAID 3 in having the dedicated parity disk, but this stripes blocks.
• This is just like RAID 5 in striping the blocks across the data disks, but this has only one parity disk.
• This is not commonly used.
RAID 6
•Just like RAID 5, this does block level striping. However, it uses dual parity.
•In the above diagram A, B, C are blocks. p1, p2, p3 are parities.
•This creates two parity blocks for each data block.
•Can handle two disk failure
•This RAID configuration is complex to implement in a RAID controller, as it has to calculate two parity data for each data block.
> Add your comment
From <https://www.thegeekstuff.com/2011/11/raid2-raid3-raid4-raid6/>
This article explains the difference between the two with a simple diagram.
I’m going to keep this explanation very simple for you to understand the basic concepts well. In the following diagrams A, B, C, D, E and F represents
blocks.
RAID 10
RAID Page 4
• RAID 10 is also called as RAID 1+0
• It is also called as “stripe of mirrors”
• It requires minimum of 4 disks
• To understand this better, group the disks in pair of two (for mirror). For example, if you have a total of 6 disks in RAID 10, there will be three
groups–Group 1, Group 2, Group 3 as shown in the above diagram.
• Within the group, the data is mirrored. In the above example, Disk 1 and Disk 2 belongs to Group 1. The data on Disk 1 will be exactly same as the
data on Disk 2. So, block A written on Disk 1 will be mirroed on Disk 2. Block B written on Disk 3 will be mirrored on Disk 4.
• Across the group, the data is striped. i.e Block A is written to Group 1, Block B is written to Group 2, Block C is written to Group 3.
• This is why it is called “stripe of mirrors”. i.e the disks within the group are mirrored. But, the groups themselves are striped.
If you are new to this, make sure you understand how RAID 0, RAID 1 and RAID 5 and RAID 2, RAID 3, RAID 4, RAID 6 works.
RAID 01
From <https://www.thegeekstuff.com/2011/10/raid10-vs-raid01/>
RAID Page 5