Friday, August 3, 2007

HDD RAID LEVELS

What is RAID?
RAID (Redundant Array of Independent Disks) is a set of technology standards for teaming disk drives to improve fault tolerance and performance.
RAID Levels
Level Name
0 Striping
1 Mirroring
2 Parallel Access with Specialized Disks
3 Synchronous Access with Dedicated Parity Disk
4 Independent Access with Dedicated Parity Disk
5 Independent Access with Distributed Parity
6 Independent Access with Double Parity
Choosing a RAID Level
Each RAID level represents a set of trade-offs between performance, redundancy, and cost.
RAID 0 -- Optimized for Performance
RAID 0 uses striping to write data across multiple drives simultaneously. This means that when you write a 5GB file across 5 drives, 1GB of data is written to each drive. Parallel reading of data from multiple drives can have a significant positive impact on performance.
The trade-off with RAID 0 is that if one of those drives fail, all of your data is lost and you must retore from backup.
RAID 0 is an excellent choice for cache servers, where the actual data being stored is of little value, but performance is very important.
RAID 1 -- Optimized for Redundancy
RAID 1 uses mirroring to write data to multiple drives. This means that when you write a file, the file is actually written to two disks. If one of the disks fails, you simply replace it and rebuild the mirror.
The tradeoff with RAID 1 is cost. With RAID 1, you must purchase double the amount of storage space that your data requires.
RAID 5 -- A Good Compromise
RAID 5 stripes data across multiple disks. RAID 5, however, adds a parity check bit to the data. This slightly reduces available disk capacity, but it also means that the RAID array continues to function if a single disk fails. In the event of a disk failure, you simply replace the failed disk and keep going.
The tradeoffs with RAID 5 are a small performance penalty in write operations and a slight decrease in usabable storage space.
RAID 0+1 -- Optimize for Performance and Redundancy
RAID 0+1 combines the performance of RAID 0 with the redundancy of RAID 1.
To build a RAID 0+1 array, you first build a set of RAID 1 mirrored disks and you then combine these disk sets in a RAID 0 striped array.
A RAID 0+1 array can survive the loss of one disk from each mirrored pair. RAID 0+1 cannot survive the loss of two disks in the same mirrored pair.













What is striping?
Striping is the automated process of writing data across multiple drives simulteneously. Striping is used to increase the performance of disk reads.
When using striping, if you write a 5GB file across 5 drives, 1GB of data is written to each drive. Parallel reading of data from multiple disks can have a significant positive impact on performance, because the physical disk drive is most often the performance bottleneck.
Striping is used in RAID Level 0.
If one drive in a striped set fails, all of the data in the stripe set is lost. The data must be restored from backup. Because of this, striping is often combined with the use of parity (RAID 5) or mirroring (RAID 0+1).
Performance Problems Cause by Striping
Striping, when combined with parity, can have a negative performance impact on write operations. This is because some of the data used to calculate parity may be stored on the disk already. This means that the process to write to the array is:
1. Read the existing data
2. Calculate the parity
3. Write the new parity
4. Write the new data

What is mirroring?
Mirroring is the automated process of writing data to two drives simulteneously. Mirroring is used to provide redundancy.
If one drive fails, the redundant drive will continue to store the data and provide access to it. The failed drive can then be replaced and the drive set can be re-mirrored.
Mirroring is used in RAID Level 1.
Software Mirroring vs. Hardware Mirroring
Disk mirroring can be implemented entirely in Software. Software mirroring can be less expensive, but it is also slower. Software mirroring requires the host computer to write the mirrored data twice.
Disk mirroring can be implemented in hardware on the host I/O controller. The burden of writing each bit of data twice is placed upon the I/O controller, which is specifically designed for it.
Disk mirroring can also be implemented in hardware on an external storage device, such as a RAID array. In this case, mirroring is completely removed from the hosts responsibility.
Hot Swappable Hardware
If the hardware is hot swappable, it is possible to replace a failed disk without powering off the computer. You take out the old drive and put in the new drive with no service outage.
If the hardware does not support hot-swap, you must schedule a service outage, shut down and power-off the system, and then replace the drive.
Mirroring vs. Duplexing
Mirroring is the technique of using redundant disks. Duplexing is mirroring, with the addition of redundant host I/O controllers.
If you are using mirroring and your host I/O controller fails, you will not be able to access your data until you replace the host I/O controller. With duplexing, your data will still be available through the redundant controller.

No comments: