Complete Computer Knowledge Portal

Sunday, March 31, 2013

RAID (Redundant Array of independent disks)

RAID (Redundant Array of independent disks) or Redundant Array of Inexpensive Disks is a storage technology that combines multiple disk drive components into a logical unit.The main purpose of RAID is fault tolerance and get better performance.This Technique is generally used in servers where huge and important data is saved.
RAID uses number of standard schemes which are referred as levels.These levels and their associated data formats are standardized by the Storage Networking Industry Association (SNIA) in the Common RAID Disk Drive Format (DDF) standard.


RAID0(Disk Stripping)


in RAID 0 data is split  into blocks that get written across all the drives in the array.e.g instead of writing a 500MB file to one disk ,it simultaneously  write 125MB to each of four different disks(if disks are five than 100MB each), offering superior I/O performance but no fault tolerance. This performance is enhanced by multiple disk controllers.Failure in any disk destroys the array.




RAID1 or Disk Mirroring
It is the technique of writing same data on more than one disks,thereby producing a “mirrored set”. Since each member contains a complete copy and can be addressed independently.The main advantage of this technique is that if any disk fails data can be retrieved from another disk. The array continues to operate as long as at least one drive is functioning.since data is written in more than one disks ,which also increase the write time.The another drawback of this technique is wastage of disk space,since same data is written on all disks.
RAID1 technique is effective against physical disk failure and does not provide protection against data corruption because of viruses, accidental file changes or deletions, or any other data-specific changes.e.g. A virus  that damages data on one drive in a RAID 1 array will damage the same data on all other drives in the array at the same time. For this reason, systems using RAID 1 to protect against physical drive failure should also have a traditional data backup process in place to allow data restoration to previous points in time.
RAID2
RAID2 Strips data at bit level rather than block level.Hamming code is used for the correction of errors.Hamming code uses 7 bit codes (four data bits and three parity bits)and permits use of 7 disks from which four are used to store data and rest three are used for error correction.The disks are synchronized by the controller to spin at the same angular orientation and reaches  Index at the same time. Extremely high data transfer rates are possible.
It is the only standard level that can automatically recover accurate data from single-bit corruption in data whereas Other RAID levels can detect single-bit corruption in data, or can sometimes reconstruct missing data, but cannot reliably resolve contradictions between parity bits and data bits without human intervention.

RAID3
This technique uses byte level stripping and dedicated parity disk.This technique is not in use now.This Technique cannot service multiple requests simultaneously because any single block of data will, by definition, be spread across all members of the set and will reside in the same location. So, any I/O operation requires activity on every disk and usually requires synchronized spindles.
e.g request for block “A” consisting of bytes A1–A6 would require all three data disks to seek to the beginning (A1) and reply with their contents. A simultaneous request for block B would have to wait.


RAID4
This technique make use of block level striping with a dedicated parity disk and allows each member of the set to act independently when only a single block is requested.Multiple disk read is allowed by disk controller.This technique is implemented with hardware support for parity calculations. minimum of three disks is required for a complete RAID 4 configuration.
e.g. a read request for block B1 would be serviced by disk 0. A simultaneous read request for block C1 would have to wait, but a read request for C2 could be serviced concurrently by disk 1.
This is a slow technique in which first data is written on disks and than parity is written on another disk.
RAID5
This Technique also uses block stripping but inspite of saving parity data to one disk ,it is saved on all member disks.On system failure while there are active writes, the parity of a stripe may become inconsistent with the data. If this is not detected and repaired before a disk or block fails, data loss may ensue as incorrect parity will be used to reconstruct the missing block in that stripe.
The parity blocks are not read on data read since and adds unnecessary overhead and diminish performance. The parity blocks are read, however, when a read of blocks in the stripe fails due to failure of any one of the disks, and the parity block in the stripe are used to reconstruct the errant sector.
A concurrent series of blocks – one on each of the disks in an array – is collectively called a stripe. If another block, or some portion thereof, is written on that same stripe, the parity block, or some portion thereof, is recalculated and rewritten. For small writes, this requires:
  • Reading of old data block
  • Reading of old parity block
  • Comparison of old data block with the write request. For each bit that has flipped (changed from 0 to 1, or from 1 to 0) in the data block, flip the corresponding bit in the parity block
  • Writing new data block
  • Writing new parity block
The disk used for the parity block is staggered from one stripe to the next, hence the term distributed parity blocks.

RAID6
This technique is the extension of RAID5 technique.In this technique two parity blocks are used.thus it uses block level stripping with two parity block.since parity is written into two disks which makes wastage of storage and extra writing operation.
RAID 6 provides protection against data loss during an array rebuild, when a second drive is lost, a bad block read is encountered, or when a human operator accidentally removes and replaces the wrong disk drive when attempting to replace a failed drive.
The usable capacity of a RAID 6 array is(N-2).Smin, where N is the total number of drives in the array and Smin is the capacity of the smallest drive in the array.


No comments:

Post a Comment