CompTIA Network+ Certification Exam Tutorial:
Introduction To RAID
By Chris Bryant, CCIE #12933
Hard drives fail. Repeat after me -- hard drives fail. So do disk controllers.
We all know that, but still some network admins don't take the proper precautions when it comes to disaster preparedness. There really is no excuse for not having the proper backups and disk failure plans in place, and you don't want to be in the position of making excuses when a hard drive goes bad and there's no redundant drive already in place.
The plans we're going to look at here involve different levels of RAID. RAID originally stood for Redundant Array Of Inexpensive Disks, but is also known as Redundant Array Of Independent Disks. I personally prefer the latter, since it's a little more descriptive of what RAID is all about. With RAID, we're taking multiple physical hard drives and combining them into one logical hard drive.
The group of hard drives is said to be put into a disk array when RAID is implemented. RAID is used largely on servers, but with hard drives getting cheaper and cheaper, it's more common than ever before to implement RAID on a home computer.
We've got two different ways to implement RAID, and several different levels of RAID as well. There are two good reasons to learn all of the following:
Different networks use different levels of RAID, so we better know about all the available levels.
Certification exams really like asking about them.
The two implementation methods are hardware RAID and software RAID. The name is the recipe - hardware RAID uses a separate disk controller, and software RAID uses software to configure RAID. Hardware RAID used to be considered superior to software RAID (it was faster), but that's not really the case anymore.
Software RAID can actually be faster thanks to today's rapid processors, but processor speed isn't infinite - if software RAID is using too much of the CPU's capacity, other operations may suffer.
Depending on what operating system you're using, you may be able to implement RAID without buying a software program. The latest versions of Windows Server and NetWare both have built-in RAID programs.
Once you decide on a RAID implementation method, now you've got to decide what level of RAID you're going to use. The RAID levels you have to choose from depend on the number of drives involved, so pay particular attention to that.
RAID 0 - Disk Striping Without Parity
RAID 0 (zero) is generally called disk striping. Disk striping offers no fault tolerance, but it does increase performance by writing data across multiple drives rather than writing all the data to one physical drive. We'll be looking at three different RAID levels that use disk striping, and any RAID implementation that uses striping requires a minimum of three physical drives.
The disks do not have to be identical in size to be placed into a RAID 0 array, but the smallest disk does limit how much space on the larger drives can be placed into the array. Let's consider an example where there are three disks to be placed into a RAID 0 array:
Disk 1 is a 100 MB drive
Disk 2 is a 500 MB drive
Disk 3 is a 750 MB drive
At first glance, it would look like we could make a large array, but since Disk 1 is only a 100 MB drive, only 100 MB on each of the other drives could be placed into the array, resulting in an array of 300 MB.
This also shows why we call it "disk striping" - you're basically painting a stripe down the hard drives, and the stripe will be only as large as the capacity of the smallest drive in the array.
RAID 0 Benefits:
Allows use of available physical drives and controllers
RAID 0 Drawback:
No fault tolerance - if one drive goes bad, the entire array is down
That's a pretty big drawback. Let's take a look at RAID 1, also called disk mirroring, which does offer fault tolerance.
RAID 1 - Disk Mirroring
The term "disk mirroring" comes from RAID 1's behavior of copying data from one disk to another as the information is written to the original disk, mirroring it. Disk mirroring requires a minimum of two drives.
If one of the hard drives goes down, the mirroring disk will automatically be put into use, and this happens so quickly that the end users don't even realize it! When the bad drive is replaced, the new disk can quickly be synchronized with the contents of the mirroring disk, and you're right back in business.
Where RAID 0 offers an improvement in performance but no fault tolerance, RAID 1 offers fault tolerance with no improvement in performance. That's why we have RAID 3 and 5, but before we get to those, let's clear up a common misconception.
Disk Duplexing vs. Disk Mirroring
These two terms are sometimes used interchangeably, but they are not the same thing. While they both duplicate data to a second hard drive, disk mirroring uses only one disk controller. If that one controller goes down, you can't access either disk!
Using a separate controller for each drive is disk duplexing, and this allows access to data even if one controller goes down.
RAID 3 - Disk Striping With Parity
Like RAID 0, RAID 3 uses disk striping, but that's where the similarities end. RAID 3 uses the Error Correction Code (ECC) to find and correct errors. This error detection takes place through the use of parity bits, either even parity bits or odd parity bits.
With even parity bits, the parity bit is set to "1' if the number of 1s in the data bits is odd, and "0" if the number of 1s in the data bits is even.
With odd parity bits, the parity bit is set to "1" if the number of 1s in the data bits is even, and "0" if the number of 1s in the data bits is odd.
The parity bit is set when the data is written to a drive. When the data is accessed, or read from the drive, the number of 1s in the data bits is counted again and compared to the parity bit setting. If the parity bit still matches the number of 1s in the string, the data is fine. If not, there's an error.
For example, let's say we're using even parity. A data byte reads 00110011. There are four 1s, an even number, so the parity bit is set to 0. When the data is read, the number of 1s is checked and seen to still be 4, and the parity bit is still 0, so all is well.
You may have detected a small flaw in this error checking scheme. What if two of the data bits values had changed from 1 to 0 or vice versa? If the first two bits of the data string were set to 1, we'd have 11110011, which is also an even number, so a parity bit setting of 0 would indicate that nothing is wrong.
Having said that, an error of that magnitude is rare, and RAID 3 does a pretty good job with error checking.
A more serious drawback to using RAID 3 is the requirement to dedicate a drive as the parity drive. This drive will not participate in disk striping, so we must have a minimum of three hard drives to use RAID 3. (Actually, we need three drives for all disk striping RAID methods - that includes 0, 3, and 5.)
RAID 5 - Disk Striping And Distributed Parity
The RAID level delivering the highest level of fault tolerance - and not coincidentally, the RAID level you'll see most often in today's network - is RAID 5. RAID 5 is similar to RAID 3, but requires no separate parity disk. The work of RAID 3's parity drive is spread out among the drives in a RAID 5 array, creating a distributed parity scheme.
By distributing the parity information as well as data, the fault tolerance of RAID 5 is the highest of any level we've discussed.
Coming in Summer 2012:
My exclusive Network+ 2012 Video Boot Camp and Ebook Study Guides!
-- Free tutorials beginning January 2012
-- Video Previews in March 2012
-- Fully Downloadable Video Boot Camp: $25
(That's right. $25. Make your plans now!)
-- Full Network+ Study Guide: $9.99
Study guide available on TBA website,
Amazon.com, and other leading ebook sites!
To your success,