Monday, November 4, 2013

RAID Levels Explained

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
  • Provides real-time data recovery with uninterrupted access when a hard drive fails
  • Increases system uptime and network availability
  • Protects against data loss
  • Multiple drives working in parallel increases system performance
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 0

Offers no redundancy or fault tolerance, hence does not truly fit the"RAID" acronym. In level 0, data is striped across drives,resulting in higher data throughput. Since no redundant information isstored, performance is very good, but the failure of any disk in thearray results in data loss. This level is commonly referred to asstriping.

Advantages

  • No parity generation
  • Easy to implement
  • Cost effective
  • Utilises full disk capacity

Disadvantages

  • Not a true RAID
  • No redundancy / fault tolerance
  • Drive failure will result in data loss
  • Not suitable in mission critical environments

Applications

  • Pre-Press
  • Video editing and production
  • Image manipulation/editing
 
Dual controller Raid 0 offers better performance than a single controlle

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

  • No parity generation
  • Easy to implement
  • Extremely fault tolerant
  • Utilises full disk capacity
  • 2 drives minimum

Disadvantages

  • Inefficient use of disk space
  • High disk overhead
  • Doubles number of writes

Applications

  • Pre-Press
  • Video editing and production
  • Image manipulation/editing


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

  • Single dedicated parity disk
  • High read data rate
  • High write data rate
  • 4 drives minimum
  • No performance degradation if drive fails
  • Best and worst case performance similar

Disadvantages

  • Inefficient with small file transfer

Applications

  • Video Streaming
  • Video Publishing
  • Video Editing
  • Pre Press
  • Image editing
  • Any application that needs heavy updating and large file usage

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

  • Most flexible of all disk arrays
  • Best balance cost / performance / protection of any RAID system
  • Allows multiple simultaneous writes
  • High read data rate
  • Medium write data rate
  • 3 drives minimum
  • Ideal for small write applications
  • Highly efficient

Disadvantages

  • Inefficient with large file transfer
  • Disk failure has an impact on performance

Applications

  • Transaction processing
  • Relational Databases
  • File & Print Servers
  • WWW, E-mail, and News servers
  • Intranet Servers


RAID 10

Provides very high performance and redundancy. Datais simultaneously mirrored and striped. Can under circumstancessupport multiple drive failures.

Advantages

  • Highly fault tolerant
  • High data availability
  • Very good read / write performance

Disadvantages

  • Very expensive
  • Drive spindles must be synchronised
  • Not very scaleable

Applications

  • Where high performance and redundancy are critical

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

  • No parity generation
  • Easy to implement
  • Utilises full disk capacity
  • 4 drives minimum
  • Higher performance than RAID 5

Disadvantages

  • Inefficient use of disk space
  • High disk overhead / Expensive
  • Costly to deploy

Applications

  • General File servers
  • Imaging applications
  • Medium size database 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:
  • 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