Monday, January 17, 2011

RAID Array Basics


Computer hard drives that are combined together to setup a RAID configuration is something we learned about in the videos on computer hardware (Weeks 2 and 3).  The acronym RAID stands for "Redundant Array of Inexpensive Disks".
An example of a hard drive that could be used to create a RAID array.  You would need at least two of these drives.  Photo credit: Public domain from (http://publicphoto.org/)


The ability to use multiple hard drives that act like one drive to a computer operating system is a topic I wanted to explore further.  Setting up a RAID array on your computer can offer performance or redundancy, or in some configurations can offer both advantages.
The videos in week 2 and 3 taught us about RAID 0 (Striping) and RAID 1 (Mirroring).  Sometimes I get the types of RAID configurations mixed up, and one easy way that I use to remember the difference between RAID 0 and RAID 1 is to think of the zero in RAID 0 to mean you get zero redundancy protection when using that configuration.  Although you have the most performance with RAID 0 because the data being written has the combined horsepower of two hard drives, if one of the hard drives in the array were to stop working, you would lose all the data on both drives since the data is striped across the set of drives.  Striping means some of the data is written to one drive and some of the data written to the other, which is why you get the speed increase.   In other words, make sure you have good backups of your data.  You could equate the performance increase of RAID 0 to a car that has two engines.  The car is going to be able to drive much faster with two engines; however, the engines in this car rely on each other to work so if one fails you have complete engine failure.
Alternatively, RAID 1 mirrors the data across both drives so if one drive were to fail, you would still be able to access your data that is an exact copy on the other working drive.  When a drive failure occurs, you would want to replace the failed drive as soon as possible to let the data replicate from the working drive to the replaced drive so you are once again in a “mirrored” configuration.  This method of RAID doesn’t offer any performance increase because the same data is being written to both hard drives at one time for redundancy purposes.
In the below video, I show a business class server (a computer that would go into a datacenter) that is setup in a RAID 1 configuration.

My HP DL360 Server with a RAID 1 configuration



There are other types of RAID configurations than just RAID 0 and RAID 1.  Since the server in the video only has two drive bays, it would be limited in the types of RAID configurations you can setup with it.   Other RAID configurations, such as RAID 5 require a minimum of 3 hard drives.  RAID 5 is one of the types of RAID configurations that offer both performance and redundancy as mentioned above.
A good overview of the most common types of RAID configurations can be found here.  I liked this site because it limits its scope to only the most common RAID configurations and also describes the advantages and disadvantages of each one.  You can read more about RAID 5 here.
I hope my blog about RAID explained why you would want to use this technology and the different options to boost performance and reliability of your computer system.