raidtab(5)

NAME
raidtab - configuration file for md (RAID) devices

DESCRIPTION
/etc/raidtab is the default configuration file for the raid tools (raidadd and company). It defines how RAID devices are configured on a system.

FORMAT
/etc/raidtab has multiple sections, one for each md device which is being configured. Each section begins with the raiddev keyword. The order of items in the file is important. Later raiddev entries can use earlier ones (which allows RAID-10, for example), and the parsing code isn't overly bright, so be sure to follow the ordering in this man page for best results. Here's a sample md configuration file:
# sample raiddev configuration file
raiddev /dev/md0
    raid-level		0
    nr-raid-disks	2
    nr-spare-disks	0
    device		/dev/hda1
    raid-disk		0
    device		/dev/hdb1
    raid-disk		1
raiddev /dev/md1
    raid-level		5
    nr-raid-disks	3
    nr-spare-disks	0
    device		/dev/sda1
    raid-disk		0
    device		/dev/sdb1
    raid-disk		1
    device		/dev/md0
    raid-disk		2
Here is more information on the directives which are in raid configuration files; the options are listen in this file in the same order they should appear in the actual configuration file.

raiddev device
    This introduces the configuration information for the stated device.

nr-raid-disks count
    Number of raid devices in the array; there should be count raid-disk entries later in the file.

nr-spare-disks count
    Number of spare devices in the array; there should be count spare-disk entries later in the file. Spare disks may only be used with RAID4 and RAID5, and allow the kernel to automatically build new RAID disks as needed. Note that this is currently disabled in the kernel.

parity-algorithm which
    The parity-algorithm to use with RAID5. It must be one of left-asymmetric, right-asymmetric, left-symmetric, or right-symmetric.

chunk-size size
    Sets the stripe size to size bytes.

device devpath
    Adds the device devpath to the list of devices which comprise the raid system. Note that this command must be followed by one of raid-disk, spare-disk, or parity-disk.

raid-disk index
    The most recently defined device is inserted at position index in the raid array.

spare-disk index
    The most recently defined device is inserted at position index in the spare disk array.

parity-disk index
    The most recently defined device is moved to the end of the raid array, which forces it to be used for parity.

NOTES
The raidtools are derived from the md-tools and raidtools packages, which were originally written by Marc Zyngier, Miguel de Icaza, Gadi Oxman, Bradley Ward Allen, and Ingo Molnar.

SEE ALSO
ckraid(8), mkraid(8), raidadd(8)