POSTED BY on 4:54 pm under

http://www.atomicmpc.com.au/article.asp?CIID=68835&r=rss

By Craig Simms | November, 2006

Introduction to RAID

Okay, this is how you raid a castle. First, recruit an army of 14th century soldiers. Then find yourself a battering ram (we hear Dan’s Emporium of New and Used Smashy Things has excellent deals). Then, get some boiling oil, arrows and… oh. Not that sort of raid. What? Hard drives. Aww...

The Redundant Array of Inexpensive/Independent Disks (RAID, for short), is a collection of hard drives that for all intents and purposes act as one big hard drive. It also means ‘RAID Array’ is a tautology, just like ‘ATM Machine’, ‘BAS Statement’ and ‘PBS Scheme’, so smack anyone who says it. Yes, even your boss.
There are different levels of RAID that can be employed, so before we even start with the testing, let us delve through the craziness that is the more common RAID levels – there are very uncommon ones, like 2, 3, 4 and 7, and considering in consumer land we’ll very rarely see these, we’ll leave it up to you to research further if you feel the need. Also, take in mind that putting disks in RAID can lower the overall Mean Time Between Failure (MTBF) of the set, as more disks are running more frequently.
JBOD
Strings a whole set of disks together in one volume, hence the name ‘Just a Bunch Of Disks’. If you lose a drive, you only lose the content on that drive. Not RAID, but often included in the function list of RAID cards.
RAID 0
Despite the name, RAID 0 is not true RAID as it also lacks redundancy. Sometimes called ‘striping’, it simply joins two or more identically sized drives into one volume, spreading bits equally across the lot. If you have one larger and one smaller disk, it simply partitions the larger to use the capacity of the smaller disk. If you lose one disk, you lose all data across the array. So while it increases read and write bandwidth by employing multiple disks, it increases the risk of catastrophic data loss.
RAID 1
Ah, real RAID at last. Also called ‘mirroring’. RAID 1 simply copies the contents of one drive to another, meaning if one fails you have your contents already auto-backed up. Unfortunately, it also means you need double the capacity of your drives for that redundancy. RAID 1 usually incurs a minor write speed penalty hit, and may provide a read speed increase if the controller allows accessing both drives at once.
RAID 0+1
A little better than RAID 0, and requires a minimum of four drives to operate (and generally an even number of drives). First a set of drives are striped which gives a speed increase, and then that stripe is mirrored, providing redundancy. You can afford to lose one drive in this setup, however it still requires you to double your capacity to gain the redundancy. Should you lose a drive though, the whole thing acts a single striped array bringing back the perils of RAID 0, so still not fantastic redundancy. Generally 1+0 is a better idea.
RAID 1+0/10
Yep, they’re both the same thing, but conceptually a little harder to wrap your head around than 0+1. Still needing a minimum of four drives to work, the array is first mirrored then striped. How does this work? Take for example two mirrored sets, making up a total of four drives. These mirrored sets are then striped to form a single volume, allowing increased transfer rates – and letting one drive fail in each mirrored set before the stripe fails.
RAID 1E
RAID 1+0, but for an odd number of drives. Minimum of three drives required. Partitions each drive in half, and uses the second half of each adjacent drive as a mirror for the first half on the earlier drive. The mirror for the third drive is then wrapped around back to the first’s second partition. After that, all drives are striped together. RAID 1E can only lose one disk.
RAID 5
Now we’re starting to get serious. RAID 5 is a striped array with parity stored equally across all data. Parity data takes up space equivalent to one disk in the array. If a drive fails, you can add a new one, and the lost data is ‘rebuilt’ using the existing data + parity. You need a minimum of three drives.
The advantage of this compared to a mirrored array is the amount of space recovered – for example, in a 1TB 1+0 array you can only use 500GB – in a 1TB RAID 5 array you can use 750GB. Write speeds are penalised highly due to having to create parity data, but read speeds are impressive. The more drives you add, the faster it goes. The perfect solution for a file server. It’s usually best to have a hardware solution for RAID 5 rather than software, but if you’re only running at network speeds it’s bearable. It can still only suffer one drive loss.
RAID 6
RAID 5, but with an extra disk dedicated entirely to parity. As such, it can survive two disk failures, but write speeds are penalised even further. You’ll need a dedicated controller to even achieve this, short of some Linux trickery.