raidtab - configuration file for md (RAID) devices
/etc/raidtab is the default configuration file for the raid tools (raidstart and company).
It defines how RAID devices are configured on a system.
/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
Here's a sample md configuration file:
# sample raiddev configuration file
# 'old' RAID0 array created with mdtools.
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 config-
This introduces the configuration section for the stated device.
Number of raid devices in the array; there should be count raid-disk entries later
in the file. (current maximum limit for RAID devices -including spares- is 12
disks. This limit is already extended to 256 disks in experimental patches.)
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. It is also possible to
add/remove spares runtime via raidhotadd/raidhotremove, care has to be taken that
the /etc/raidtab configuration exactly follows the actual configuration of the
array. (raidhotadd/raidhotremove does not change the configuration file)
newly created RAID arrays should use a persistent superblock. A persistent
superblock is a small disk area allocated at the end of each RAID device, this
helps the kernel to safely detect RAID devices even if disks have been moved
between SCSI controllers. It can be used for RAID0/LINEAR arrays too, to protect
against accidental disk mixups. (the kernel will either correctly reorder disks, or
will refuse to start up an array if something has happened to any member disk. Of
course for the 'fail-safe' RAID variants (RAID1/RAID5) spares are activated if any
Every member disk/partition/device has a superblock, which carries all information
necessary to start up the whole array. (for autodetection to work all the 'member'
RAID partitions should be marked type 0xfd via fdisk) The superblock is not visible
in the final RAID array and cannot be destroyed accidentally through usage of the
md device files, all RAID data content is available for filesystem use.
The parity-algorithm to use with RAID5. It must be one of left-asymmetric, right-
asymmetric, left-symmetric, or right-symmetric. left-symmetric is the one that
offers maximum performance on typical disks with rotating platters.
Sets the stripe size to size kilobytes. Has to be a power of 2 and has a compila-
tion-time maximum of 4M. (MAX_CHUNK_SIZE in the kernel driver) typical values are
anything from 4k to 128k, the best value should be determined by experimenting on a
given array, alot depends on the SCSI and disk configuration.
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.
Also note that it's possible to recursively define RAID arrays, ie. to set up a
RAID5 array of RAID5 arrays. (thus achieving two-disk failure protection, at the
price of more disk space spent on RAID5 checksum blocks)
The most recently defined device is inserted at position index in the raid array.
The most recently defined device is inserted at position index in the spare disk
The most recently defined device is moved to the end of the raid array, which
forces it to be used for parity.
The most recently defined device is inserted at position index in the raid array as
a failed device. This allows you to create raid 1/4/5 devices in degraded mode -
useful for installation. Don't use the smallest device in an array for this, put
this after the raid-disk definitions!
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.
raidstart(8), raid0run(8), mkraid(8), raidstop(8)