This section describes how to create software RAID 6 and 10 devices, using the Multiple Devices Administration (mdadm(8)) tool. You can also use mdadm to create RAIDs 0, 1, 4, and 5. The mdadm tool provides the functionality of legacy programs mdtools and raidtools.
RAID 6 is essentially an extension of RAID 5 that allows for additional fault tolerance by using a second independent distributed parity scheme (dual parity). Even if one of the hard disk drives fails during the data recovery process, the system continues to be operational, with no data loss.
RAID6 provides for extremely high data fault tolerance by sustaining multiple simultaneous drive failures. It handles the loss of any two devices without data loss. Accordingly, it requires N+2 drives to store N drives worth of data. It requires a minimum of 4 devices.
The performance for RAID 6 is slightly lower but comparable to RAID 5 in normal mode and single disk failure mode. It is very slow in dual disk failure mode.
The procedure in this section creates a RAID 6 device /dev/md0 with four devices: /dev/sda1, /dev/sdb1, /dev/sdc1, and /dev/sdd1. Make sure to modify the procedure to use your actual device nodes.
Open a terminal console, then log in as the root user or equivalent.
Create a RAID 6 device. At the command prompt, enter
mdadm --create /dev/md0 --run --level=raid6 --chunk=128 --raid-devices=4 /dev/sdb1 /dev/sdc1 /dev/sdc1 /dev/sdd1
The default chunk size is 64 (KB).
Create a file system on the RAID 6 device /dev/md0, such as a Reiser file system (reiserfs). For example, at the command prompt, enter
mkfs.reiserfs /dev/md0
Modify the command if you want to use a different file system.
Edit the /etc/mdadm.conf file to add entries for the component devices and the RAID device /dev/md0.
Edit the /etc/fstab file to add an entry for the RAID 6 device /dev/md0.
Reboot the server.
The RAID 6 device is mounted to /local.
(Optional) Add a hot spare to service the RAID array. For example, at the command prompt enter:
mdadm /dev/md0 -a /dev/sde1