RAID stands for Redundant Array of Inexpensive Disks, and there are different types -- or levels -- of RAID which perform different functions and serve vastly different purposes. This article will cover the most common RAID levels: 0, 1, 5, and multiple arrays.
Also known as "striping," RAID 0 was designed to increase hard drive performance at the expense of fault tolerance. Hard drives of equal size and speed are combined in capacity and efficiency, decreasing hard drive read and write access times and improving overall performance. However, if one drive in the array should fail, all data would be lost.
In a RAID 0 array, data is written in 64k chunks to each drive, one after another. For example, if you have 3 hard disks in a RAID 0 array, the sequence for writing to them would go 1, 2, 3, 1, 2, 3, and so on. This reduces the overall strain on each single drive, which lengthens their lifespan and allows for high throughput speeds because multiple drives can be accessed simultaneously.
RAID 0 is usually used in desktop and workstation machines that require fast disk access time or large contiguous storage space.
Advantages: provides the best disk read/write access out of all the levels of RAID. Also reduces the strain on each individual hard drive.
Disadvantages: No error correction or fault-tolerance.
Also known as disk "mirroring" or "duplexing." Two hard disks of similar size and speed are required. Whatever is written to the first hard disk is simultaneously copied onto the second, so in essence you have two hard disks with the same data. The purpose of RAID 1 is twofold: it increases read times in multi-user systems because data can be read from either drive. It also is a failsafe against drive failure; if one drive should fail, the other will continue to operate normally.
RAID 1 is not as fast as RAID 0 in terms of write speeds because of all of the replication traffic generated -- it has to write the same data to two drives at once.
There is a small difference between mirroring and duplexing. Mirroring uses two disks on one controller using one cable. In this case, if the drive controller goes bad, the system goes down. Duplexing uses two disks on two controllers using two separate cables. If a controller fails, the system just switches over to the second hard disk and keeps on going. RAID 1 is often used to provide fault tolerance in entry level servers that aren't equipped for the more expensive and power-hungry RAID 5.
Advantages: provides fault tolerance and increased read times.
Disadvantages: slower write times than RAID0.
Also known as disk striping with parity. RAID 5 takes the concept of RAID 0 and adds fault tolerance. RAID 5 requires at least 3 hard disks to function. Data is written to each disk in the same fashion as RAID 0, but parity data for each drive is stored separately on other drives. In the event of a hard disk failure, a replacement drive can be added and the contents rebuilt from the parity data stored on the other drives. RAID 5 is often used in high-end servers that store mission-critical data. It's essentially one step below a dedicated storage cluster.
Advantages: more reliable fault tolerance than RAID 0 and RAID 1.
Disadvantages: more expensive, requires more disks and a more advanced RAID controller. Not quite as fast as RAID 0.
Multi Level RAID
You can also set up a RAID array that has multiple levels. This form of RAID is very expensive and is mostly found in large enterprise networks storing mass amounts of crucial data. A specialized RAID controller or external RAID device is normally required.
The most common implementations of this concept are RAID 10, 0+1, and 50. They are what they sound like: RAID 10 is a mirror of two striped arrays; 0+1 is a stripe of two mirrored arrays; and 50 is a stripe of multiple RAID 5 arrays. Several hard disks and a high-end RAID controller are required to form most of these arrays.
Advantages: fast read and write access with redundancy.
Disadvantages: expensive, requires at least four disks and a specialized controller card.
Different forms of RAID
RAID comes in two different forms: hardware level and software level. Hardware RAID is more expensive because it requires an advanced RAID controller such as those made by Promise, Highpoint, LSI Logic, and Adaptec. Hardware RAID controllers can also be built into the motherboard or housed in a separate, self-contained unit connected externally via a SCSI or network cable.
To administer your RAID array, you will invoke a specific keystroke during the system boot sequence -- usually a message appears briefly, telling you what key to press. This will lead to the RAID BIOS setup utility. Some companies also bundle a Windows-based application that allows you to administer your array through the operating system, where you can add, delete and modify an array.
The following are required for hardware RAID:
- A RAID controller corresponding with your hard disk type (ATA, SATA, or SCSI) or a network storage device. The controller can be a PCI or PCIe card, or an integrated solution built into the motherboard. Be careful! Many of the RAID controllers built into motherboards are not hardware RAID controllers; they are merely fancy drive controllers that facilitate software RAID arrays.
- Minimum amount of hard disks for the type of RAID array you want to build.
- A supported operating system. These include Windows NT/2000/XP Professional/2003, GNU/Linux, Free/Open/NetBSD, and Solaris, although there are many other OSes that could work. Make sure the OS you choose has a driver for the RAID controller.
RAID with software
Software level RAID is less expensive but not as fast as hardware level and is generally used as a less expensive alternative to its hardware-controlled counterpart. To administer a software array in Windows 2000 Server, go to the Control Panel, then open up Administrative Tools, then Computer Management, then Disk Management. In the lower right pane, right-click on the hard drives you wish to use in the RAID array and then click on Convert To Dynamic Disk in the popup menu. From there you can set up your array with relative ease.
For GNU/Linux and other Unix-like OSes, the answers on how to set up software RAID vary depending on what version and distribution you're using. More than likely you'll end up using the Device Mapper; a brief readme document on
dmraid can be found here.
What you will need for software level RAID:
- An operating system that supports software RAID (GNU/Linux; Free/Open/NetBSD; Windows 2000/2003 Server, Advanced Server, or Datacenter Server; and Solaris) and software to set up and manage the arrays.
- Minimum amount of hard disks for the type of array you want to set up.
JBOD and Disk Spanning
A lot of people talk about JBOD and disk spanning as being considered forms of RAID. This is not really true; JBOD stands for Just a Bunch Of Disks and its purpose is to combine multiple hard disks into one. It does not provide redundancy, and therefore is not technically a level of RAID. However, JBOD is useful if you have an application that requires mass amounts of contiguous hard disk space and you don't have a large drive to use. This should only be used as a band-aid fix though, as several drives combined leads to increased chances of failure.
Disk spanning differs slightly from JBOD. With disk spanning you can actually administer the disk array, whereas with JBOD you just set it up and go. With disk spanning you can extend existing partitions onto other empty partitions or hard disks to gain extra contiguous disk space. This should also only be used as a band-aid fix because, like JBOD, disk spanning provides no redundancy whatsoever. If one drive in a JBOD or disk span array goes down, its data is lost.
A JBOD or spanned array requires a RAID or hard drive controller that supports these modes, and the hard drives to form the array. Setup is done through the controller's BIOS.
Is it right for you?
RAID is useful for providing expanded hard drive capabilities in desktop, workstation, and server machines. Most home users will only be considering RAID 0 or 1 because that is the usual limit of the integrated RAID chip on their motherboards, not to mention the fact that other RAID modes cost a lot of money in disks.
RAID 0 can be useful to people playing online games, doing video editing, or any other operation that can benefit from faster read/write times. Most budget-minded business users in search of fault tolerance can rely on the redundancy of RAID 1. The other modes and options aren't generally practical for desktop use and it's unlikely that you'll see any advantage to using them.