For a description of the older RAID layer, the one which is standard in 2.0 and 2.2 kernels, see the excellent HOWTO from Linas Vepstas ( email@example.com) available from the Linux Documentation Project at linuxdoc.org.
The home site for this HOWTO is http://ostenfeld.dk/~jakob/Software-RAID.HOWTO/, where updated versions appear first. The howto is written by Jakob Østergaard based on a large number of emails between the author and Ingo Molnar (firstname.lastname@example.org) -- one of the RAID developers --, the linux-raid mailing list (email@example.com) and various other people.
The reason this HOWTO was written even though a Software-RAID HOWTO already exists is, that the old HOWTO describes the old-style Software RAID found in the standard 2.0 and 2.2 kernels. This HOWTO describes the use of the new-style RAID that has been developed more recently. The new-style RAID has a lot of features not present in old-style RAID.
If you want to use the new-style RAID with 2.0 or 2.2 kernels, you should get a patch for your kernel, either from ftp://ftp.[your-country-code].kernel.org/pub/linux/daemons/raid/alpha, or more recently from http://people.redhat.com/mingo/ The standard 2.2 kernels does not have direct support for the new-style RAID described in this HOWTO. Therefore these patches are needed. The old-style RAID support in standard 2.0 and 2.2 kernels is buggy and lacks several important features present in the new-style RAID software.
As of this writing, the new-style RAID support is being merged into the 2.3 development kernels, and will therefore (most likely) be present in the 2.4 Linux kernel when that one comes out. But until then, the stable kernels must be patched manually.
You might want to use the
-ac kernel releases done by Alan
Cox, for RAID support in 2.2. Some of those contain the
new-style RAID, and that will save you from patching the kernel
Some of the information in this HOWTO may seem trivial, if you know RAID all ready. Just skip those parts.
The mandatory disclaimer:
Although RAID seems stable for me, and stable for many other people, it may not work for you. If you lose all your data, your job, get hit by a truck, whatever, it's not my fault, nor the developers'. Be aware, that you use the RAID software and this information at your own risk! There is no guarantee whatsoever, that any of the software, or this information, is in anyway correct, nor suited for any use whatsoever. Back up all your data before experimenting with this. Better safe than sorry.
That said, I must also say that I haven't had a single stability problem with Software RAID, I use it on quite a few machines with no problems what so ever, and I haven't seen other people having problems with random crashes or instability caused by RAID.
This HOWTO assumes you are using a late 2.2.x or 2.0.x kernel with a matching raid0145 patch and the 0.90 version of the raidtools, or that you are using a late 2.3 kernel (version > 2.3.46) or eventually 2.4. Both the patches and the tools can be found at ftp://ftp.fi.kernel.org/pub/linux/daemons/raid/alpha, and in some cases at http://people.redhat.com/mingo/. The RAID patch, the raidtools package, and the kernel should all match as close as possible. At times it can be necessary to use older kernels if raid patches are not available for the latest kernel.