Classnotes | UNIX02 | RecentChanges | Preferences No diff available--this is the first major revision.
(no other diffs)The book mentions a package called 'raidtools', but the version in the book is no longer used. Do not confuse the raidtools discussed in the book with the raidtools2 mentioned here!
/etc/raidtab is the core configuration file for your RAID system. It is very similar to /etc/fstab (see classnotes for day two) in that it defines the devices to be used for your filesystem, however its format is dramatically different. It is divided into sections defining specific RAID devices. Each section contains the specifications of that device. You can mix-and-match various RAID setups on one system using this file if you so desire.
Each RAID device section must contain an option specifying the RAID level, the number of devices in the array, and must specify the physical devices to be used. For example, a simple linear array with two devices might look something like this:
Other options include specifying the number of spare disks (if any), data "chunk" size, and whether or not to use a persistent superblock (which 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 controllers.)
A more complicated raidtab file which includes a couple of devices using RAID-1 and a specific chunk-size looks like this:
Once you have configured your /etc/raidtab file, you must make your RAID devices and start them. The commands for manupulating your RAID devices are as follows:
mkraid sets up a group of block devices into a RAID array. It can also be used to reinitialize a previously used RAID device or one which has been a part of a failing system. It does not create the file system on the device, for that you will still have to use the mkfs tools (see day two of the classnotes).
raidstart & raidstop
raidstart and raidstop are the tools for starting and stopping your RAID devices. The options for both are as follows:
Apply the command to all of the configurations specified in the config file.
-c, --configfile filename
Use filename as the configuration file (/etc/raidtab is used by default).