Managing RAID on Linux - Derek Vadala [40]
Figure 3-4. Under 2.0 kernels, RAID functions are configured under the Floppy, IDE, and other block devices submenu.
Summary of Kernel Upgrades
In summary, the latest version of the software RAID (multiple devices) driver for Linux is 0.90. However, kernels 2.0 and 2.2 were distributed with an older version (0.36) of the driver. If you are using kernel 2.4 or later, then you already have the latest driver, but you might wish to check the web pages of both Ingo Molnar (http://people.redhat.com/mingo/raid-patches/) and Neil Brown (http://www.cse.unsw.edu.au/~neilb/patches/linux-stable/) for performance and reliability patches that are waiting to make it into the next kernel revision.
When working with 2.0 and 2.2 kernels, it's essential to upgrade to the 0.90 driver whenever possible. Follow the steps described in this section to download the appropriate patch and apply it to your kernel. If you encounter problems during this process, you might need to try patching different kernel sublevel releases until you find one that patches without errors. Use kernels that do not patch properly at your own risk.
If, for one reason or another, you are working with a 2.0 or 2.2 kernel and cannot upgrade to the 0.90 RAID, than you are in the unfortunate circumstance of having to use the very outdated 0.36 driver. The 0.36 driver is not compatible with the newer 0.90 driver, and you will need to use an older version of the raidtools package to manage arrays created for the 0.36 driver. Only four software arrays are supported under version 0.36.
Working with Software RAID
The raidtools package, also maintained by Ingo Molnar, provides a set of utilities for creating and managing software arrays. raidtools has been the standard software RAID management package for Linux since the inception of the software RAID driver. Over the years, raidtools has proven cumbersome to use, mostly because it relies on a configuration file (/etc/raidtab) that is difficult to maintain, and partly because its features are limited. In August 2001, Neil Brown released an alternative. His mdadm package provides a simple, yet robust way to manage software arrays. mdadm is now at version 1.0.1 and has proven quite stable after its first year of development. It has received a positive response on the Linux-raid mailing list and will likely become widespread in the future. The rest of this chapter will provide you with examples of building and managing arrays, using the raidtools package, as well as mdadm.
raidtools
raidtools provides a small, simple command set that allows administrators to create, activate, and stop software arrays. Each array managed by the system is defined in a global configuration file (/etc/raidtab) that describes which physical disks are members of each array. /etc/raidtab also contains metadata about every array, such as its RAID level and failover capabilities. The commands included with the raidtools package use the information in /etc/raidtab to interface with arrays.
There are two notable versions of raidtools. Version 0.90 is the most recent implementation, and the only one being maintained. It should be used only in conjunction with the 0.90 driver. An older version (0.42) of raidtools is also still available. This version should only be used when working with older systems that still use the 0.36 software RAID driver. Never use raidtools with the wrong driver!
Also included with raidtools are sample configuration files and documentation (manual pages and cookbooks). Unfortunately, much of the documentation is seriously outdated, sometimes by a factor of years.