There are essentially three different ways that RAID may be done by a PC.
- Operating System RAID (standard OS software)
- Fake Hardware RAID (BIOS and special OS software)
- True Hardware RAID (done completely in hardware)
Operating System (software) RAID is done by a single OS and is usually compatible only with that particular OS. Examples of software RAID are Linux RAID using LVM or Windows operating system RAID. The primary drawback of software RAID is that only the operating system that created the RAID arrays can access them. For example Linux can't access Windows RAID arrays and Windows can't access Linux RAID arrays. Since the OS essentially treats all disks the same, it is possible to have the disks of a RAID array on different controllers and even different size disks (the partitions may have to be the same size). Since the BIOS does not know how to access these RAID arrays, there are usually some limitations on booting from software RAID. For example you might have to place the boot loader or Linux kernel in a non-RAID partition.
Fake Hardware RAID uses software in the BIOS to provide RAID booting support, and a special manufacturer provided driver for each operating system. The operating system driver essentially does software RAID. Assuming that there are drivers available for all the operating systems, this kind of RAID can allow all the operating systems to access the same RAID array. The BIOS software allows booting directly from a RAID array. The performance of Fake Hardware RAID is similar to software RAID. Some fake RAID controllers have parity calculation hardware that can improve the performance a little bit over operating system software RAID. Usually Fake Hardware RAID requires all the RAID disks to be attached to the same controller, and that the disks are all the same size. It may be difficult to find drivers or software for Linux. However, in some cases a program such as "dmraid" or "mdadm" can configure Linux to access Fake Hardware RAID arrays (EX: Intel Matrix Storage Manager). There are many problems with this kind of RAID because drivers may not be kept up to date by manufacturers, and the RAID metadata format may not be supported by Linux. However, in cases where booting from RAID or multiple operating system access is required this kind of RAID can be advantageous.
True Hardware RAID is expensive because all of the RAID is done by hardware (usually a micro-controller). This usually requires an add-on board plugged into an I/O slot. Because of the cost, this kind of RAID is rare on consumer PCs. The RAID controller includes BIOS software to enable booting from RAID. The hardware RAID controller mostly looks like a normal disk controller to the operating system. The hardware takes care of all the data copying, stripes and parity calculation. There is often a standard operating system driver for a hardware RAID controller, or one is provided by the manufacturer. It is common for hardware RAID controllers to support Linux.
It all boils down to what understands the metadata. Metadata describes the layout of the RAID array, what disks are involved, and what portions of those disks. With operating system RAID, only one operating system understands the metadata. With Fake Hardware RAID, the BIOS and manufacturer-provided drivers understand that metadata. Utilities such as "dmraid" may allow Linux to understand the Fake Hardware RAID metadata. True hardware RAID avoids the need for any software to understand the metadata, since the hardware takes care of all the translation.
To choose the type of RAID to use, consider your requirements.
- Do you need to boot directly from the RAID array?
- Will multiple operating systems have to access the same array?
- Are you willing to spend extra time configuring special drivers or software such as "dmraid"?
- Do you need 64-bit support?
- Are you looking for a simple, easy to configure RAID setup?
- What kinds of RAID do you need (RAID 0, RAID 1, RAID 0+1, RAID 5, etc.)?
- What cost is acceptable?
- Do you need to decrease disk access time?
- Do you need data redundancy?
To address Slackware specifically, the operating system RAID or true hardware RAID are the best supported solutions. It is possible to use fake hardware RAID in some cases (Intel Matrix Storage Manager or some type supported by "dmraid"). Except for Intel Matrix Storage Manager RAID, you will probably need to use a 32-bit kernel for fake hardware RAID. I use Slackware 64-bit with Intel Matrix Storage Manager RAID, and I use Slackware 32-bit with a Promise fake hardware RAID controller.
If you are considering fake hardware RAID, I recommend sticking with Intel Matrix Storage Manager used on Intel ICH and other Intel chip-sets. If you can't do that, look carefully at what is supported by "dmraid". Avoid proprietary drivers because they tend to become out of date as Linux moves forward and companies abandon legacy hardware.
Here are a few of the types of RAID arrays that you can create.
- RAID 0 - 100% of total storage (performance by striping across disks)
- RAID 1 - 50% of total storage (fast redundancy using a direct mirror copy)
- RAID 0 + 1 - 50% of total storage (fast redundancy and striping for performance)
- RAID 5 - 66% of total storage (slower redundancy using parity data)
I do not recommend using RAID 5 if you are using a slow CPU or concerned about system performance. The parity calculations can slow down the CPU, and if a disk fails, accessing the missing data slows down reading. The main advantage of RAID 5 is the increase in storage capacity versus disk cost. RAID 1 may actually prove more economical, since you only need to buy two disks. Also, software RAID performs less I/O for RAID 1 than RAID 5. RAID 0+1 is theoretically faster than RAID 1, but in practice the extra I/O for two more disks can make it slower. Unless you are using a true hardware RAID controller I recommend staying with two disks (no more than three) on one computer.
Keep in mind that any kind of redundant RAID (1, 0+1 or 5) will require periodic synchronization of the data. You will want to look at the performance impact of synchronizing the data and the time required. Don't make redundant arrays larger than you need. For static data, it may be better to just do a periodic backup or copy to a standby disk rather than using redundant arrays. You also need to avoid unexpected shut-downs when using redundancy. Keep the computer on a battery backup unit. What happens if the power is interrupted? Typically the RAID software will detect that situation on the next boot and force resynchronization of the entire array. That can be annoying and time consuming. Operating system crashes have the same effect as power interruptions. True hardware RAID controllers usually have battery powered RAM to avoid losing data on sudden power interruptions.
Operating systems such as Windows and Linux use delayed writing, so for small files, write performance is less critical than read performance. Depending on how you use the computer RAID 1 may provide about the same performance as RAID 0 or RAID 0+1. If you frequently copy large files, then RAID 0 or 0+1 is likely to improve performance over RAID 1. RAID 5 might normally give you better performance than RAID 1 or even RAID 0, but it will probably perform worse when one of the disks is inoperative.
I hope some of this information is helpful. Some of it is based on my own opinions, and everyone is welcome to comment if they agree or disagree. I found the whole subject of RAID quite confusing when I started learning about it.