[an error occurred while processing this directive]

  Linux Letter 07

The Linux Letter for July 12, 1999

RAID...it's not just for bugs anymore! Instead of tracking down those pesky cockroaches with a can of Raid, this week we're going to look at computer RAID systems. RAID is a mechanism that can allow you to create faster, more reliable storage systems without spending a ton of money.

RAID is an acronym for Redundant Array of Inexpensive Disks. And with the price of today's hard drives plunging like my stock market picks, inexpensive is the word! RAID allows you to configure sets of disks to appear in several different ways.

RAID 0 is also called "striping". With this method, several disks are combined to appear as one, by dividing the single logical disk into "stripes" and interleaving them together.

RAID 1 is "mirroring". With this method, your system maintains two complete copies of the same data on two separate hard drives. If one drive fails, you still have an identical copy to fall back upon.

RAID 4 is similar to RAID 0, but adds an extra partition for parity information. If a drive fails in a RAID 4 array, the data can be reconstructed from the parity data and from the data contained on the other hard drives.

RAID 5 is similar to RAID 4, but uses striping to store the parity information.

There are other RAID levels that have been defined by industry groups, but they are either obsolete or are proprietary. Linux supports RAID 0, 1,4 and 5, as well as RAID Linear which simply adds one partition to the next, creating a large logical drive without striping.

Now that you know what it is, how do you use it? With Linux, you have two choices. You can purchase a hard drive controller that supports RAID naively, or you can use Linux's software RAID tools. Since my goal in managing computers is to do it as cheaply and reliably as possible, I opt to use the software tools.

Of course, the first thing to do before you attempt to configure your computer to use RAID is to determine if you need it. RAID is a tool that allows you to potentially increase the reliability and performance of your system. But it can also potentially cause disasters. Since RAID 0 and RAID Linear do not perform any kind of parity functions, if one disk dies, all of the data on the other drives could be rendered useless. This should serve as a warning that if you use RAID, you must have a frequent, reliable backup program in place.

Now that I've said that, if you're still ready to configure your drives as a RAID system, you're in luck because much of the support for RAID is part of the Linux kernel. And even more fortunately, there is an excellent document on the web to assist you: the Software RAID HOWTO.

Consider a couple of other issues. While it may seem obvious, you do need to have more than one physical hard drive. A single drive RAID array doesn't make much sense. Also, while RAID will work just fine with IDE hard drives, there are some drawbacks. IDE uses quite a bit of processor power to work, especially compared to SCSI. But help may be on the way. Abit has released a new motherboard that contains two complete IDE interfaces, allowing up to 8 devices to be installed. The controller has its own processor that is supposed to reduce the load on the CPU, allowing performance similar to that of SCSI drives. Although Linux drivers for this controller are not available just yet, they are under development, and you can be sure that within a few weeks you will be able to use this system under Linux.

Perhaps the most important part of creating a RAID array under Linux is to have a plan. The HOWTO provides a lot of guidance on configuring the tools that you'll need and issuing warnings about what terrible things will happen to you if you don't heed them, but perhaps the most important thing to pay attention to is the section on planning your array. You really must create the proper partitions in the proper sizes and mount them in the proper order or instead of having a well-performing, reliable array of disks, you'll have a big mess. Don't let that happen to you!

Finally, as a word of advice, if you are considering installing a RAID array on a Linux system that uses multiple processors (Symmetrical Multiprocessing, or SMP), you absolutely must be running the 2.2.xkernel. In fact, if you're running any SMP system, you should run that kernel because of the huge improvements made to the SMP subsystems.

So, if you're ready to learn more, try these first:

Software RAID HOWTO: http://metalab.unc.edu/LDP/HOWTO/mini-Software-RAID.html

Software RAID: http://tunelinux.com/bin/page?hardware/ide/software-raid.html


Hot Tip of the Week

In keeping with today's theme of multiple disks, you can improve the performance of your swap space ifyou have several hard disks by creating several swap partitions. When you mount them, simply set the priority for each to the same value and the kernel will balance its use of each disk. Your fstab entry will look something like this:

/dev/sdb1        swap         swap         pri=3
/dev/sdc1        swap         swap         pri=3
/dev/sdd1        swap         swap         pri=3
/dev/sde1        swap         swap         pri=3

Happy computing!

Drew Dunn


Get your free email account...  TODAY!!!


The Power


[an error occurred while processing this directive]