Acronym for Redundant Array (of) Inexpensive Disks.
The idea behind RAID is having an array of disks (usually inexpensive, although that doesn't stop people buying expensive disks for their RAID array) which are all put together to form one logical disk. There are different types of RAID (as listed below) which all have various advantages (and disadvantages)
See RaidOnLinux and RaidNotes for some specific notes about RAID under linux.
RAID 0 technically isn't RAID: It provides no redundancy or fault tolerance.
However data is spread across the disks (they aren't just concatenated). This means that file I/O speed is better than having a single disk since each disk can be reading or writing data independant of the others.
http://www.raidarray.eu.com/raid0.html or http://www.acnc.com/raid.html
When writing data, write it to all disks in the array, when reading read from any of the disks of the array. If any disk in the array fails you can replace it easily and rebuild the array without loosing data. If your disks are hotswappable, you can do this with only minor performance losses.
This uses striping with some disks holding ECC information. Apparently noone has ever implemented this spec, because it's so complicated and really, the other RAID levels do it better. Be sure to prove me wrong by finding someone that does RAID level 2 :)
RAID 3 has a parity disk which stores an XOR of all the other disks. If any one disk fails, then this XOR can be used to recreate the data by XOR'ing all the other disks together and then XOR'ing the parity data. If the parity disk fails then it can be regenerated by XOR'ing all the disks together.
http://www.raidarray.eu.com/raid3.html
RAID 4 stripes based on blocks instead of bytes and stripes the data across the disks except for one which stores the Parity. Performance is good.
Ah, RAID 5! RAID 5 combines the advantages of 3 and 0 by spreading the parity infomation across all drives. This is the most common type of RAID.
http://www.raidarray.eu.com/raid5.html
Striped array with two parity disks. Any two disks can fail simultaniously with the array continuing on. Good for when the data can't EVER stop!
The only card I've found that implements RAID6 are SATA cards made by Areca (also rebadged as Tekram).
RAID 7 isn't a standard, some company trademarked it, and came up with their own proprietary system and called it RAID 7.
Data is mirrored and striped across multiple disks. (Combination of RAID 1 and RAID 0.
http://www.raidarray.eu.com/raid10.html
Two striped arrays mirrored.
http://www.raidarray.eu.com/raid0+1.html
Visual explaination of various RAID setups:
then round down the stripesize to the nearest multiple of your filesystem cluster size (usually 4k).
Suggestions for the improvement of the estimation of optimal stripe size is solicited.
See Also: