The /etc/raidtab File

The current raidtools package requires a configuration file, which, by default, is named /etc/raidtab. The /etc/raidtab file contains a stanza about each software array connected to the system. (A stanza is a collection of keywords and variables that describe a single array.) The configuration is parsed from top to bottom so that previously defined arrays may be used in subsequent stanzas. This is useful when creating hybrid arrays like RAID-10, but it also means that the order of the stanzas in /etc/raidtab is extremely important. Each stanza begins with a raiddev directive and continues with other directives from the following list.

raiddev mddevice

The raiddev parameter begins the configuration of an array. All subsequent directives are assumed to refer to the most recent raiddev directive. raiddev takes the full path to the device block special file as its argument (for example, raiddev /dev/md2). A unique raiddev directive is required for each array.

raid-level level

raid-level specifies the mode of the current array. This parameter takes an alphanumeric value (see Table 4-1) that corresponds to kernel RAID levels.

Table 4-1. raid-level parameters

raidtab entry

Description

linear

Linear concatenation

0

Striping

1

Mirroring

4

Single parity drive

5

Distributed parity

multipath

Multipath I/O

Each raid-level directive defined in /etc/raidtab corresponds to the previously defined raiddev entry. In addition, support for the RAID level you have selected using raid-level must be ...

Get Managing RAID on Linux now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.