Raid Explained | |||||||||
RAID stands for Redundant Arrayof Inexpensive (or sometimes "Independent") Disks. RAID isa method of combining multiple hard disks in a single logical unit tooffer high availability, performance or a combination of both. Thisprovides better resilience and performance than a single disk drive.
The benefits of RAID explained
Software RAID
Many operating systems provide functionality for implementing software based RAID systems. Thesoftware RAID systems generate the RAID algorithms using the server CPU,this can severely limit the RAID performance. Should a server failthe whole RAID system is lost. Cheap to implement and only need asingle SCSI controller.
Hardware RAID
All RAID algorithms are generated on the RAID controller board, thus freeing the server CPU. Allows fullbenefits and data protection of RAID. More robust and fault tolerantthan software RAID. Requires dedicated RAID controller to work.
RAID levels
Various RAID levels exist these are 0, 1, 2, 3, 4, 5, 6, 7, 10, & 0+1. The levels of RAID protectionvaries with the RAID level selected RAID levels 0 & 1 are nottechnically RAID as they have no redundancy in the event of drivefailure. The most common RAID levels are shown below. RAIDlevels 2, 4, 6, 7 & 0+1 are a combination of the other RAID levelsshown.
|
RAID 1 |
Provides redundancy by writing all data to two or more drives.The performance of a level 1 array tends to be faster on reads andslower on writes compared to a single drive, but if either drive fails,no data is lost. This is a good entry-level redundant system, since onlytwo drives are required; however, since one drive is used to store aduplicate of the data, the cost per megabyte is high. This level iscommonly referred to as mirroring.
|
Advantages
| Disadvantages
|
Applications
|
RAID 3 |
Provides redundancy by writing all data to three or moredrives. This RAID 3 disk array provides excellent storage for videoimaging, streaming, publishing applications or any system that requireslarge file block transfers.
|
Advantages
| Disadvantages
|
Applications
|
RAID 5 |
Provides redundancy by writing data and parity informationacross three or more drives, thus increasing performance. The RAID Level 5provides the best combination of disk array technology. The mostpopular RAID level supplied.
|
Advantages
| Disadvantages
|
Applications
|
RAID 10 |
Provides very high performance and redundancy. Datais simultaneously mirrored and striped. Can under circumstancessupport multiple drive failures.
|
Advantages
| Disadvantages
|
Applications
|
RAID 0+1 |
Provides redundancy by writing all data to four or more drives.RAID 0+1 combines the benefits of RAID level 0 and RAID level 1.This offers both striping and mirroring with no parity generation.The RAID 0+1 also provides high performance and resilience to RAID 5.
|
Advantages
| Disadvantages
|
Applications
|
RAID stands for Redundant Array of Inexpensive (Independent) Disks.
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.
In all the diagrams mentioned below:
In all the diagrams mentioned below:
- A, B, C, D, E and F – represents blocks
- p1, p2, and p3 – represents parity
RAID LEVEL 0
Following are the key points to remember for RAID level 0.
- 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
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
Following are the key points to remember for 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”
- 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).
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 bits 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
- 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 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.
No comments:
Post a Comment