A nested RAID device consists of a RAID array that uses another RAID array as its basic element, instead of using physical disks. The goal of this configuration is to improve the performance and fault tolerance of the RAID.
Linux supports nesting of RAID 1 (mirroring) and RAID 0 (striping) arrays. Generally, this combination is referred to as RAID 10. To distinguish the order of the nesting, this document uses the following terminology:
The following table describes the advantages and disadvantages of RAID 10 nesting as 1+0 versus 0+1. It assumes that the storage objects you use reside on different disks, each with a dedicated I/O capability.
Table 7.2. RAID Levels Supported in EVMS
A nested RAID 1+0 is built by creating two or more RAID 1 (mirror) devices, then using them as component devices in a RAID 0.
![]() | Important |
|---|---|
If you need to manage multiple connections to the devices, you must configure multipath I/O before configuring the RAID devices. For information, see Chapter 5, Managing Multipath I/O for Devices. | |
The procedure in this section uses the device names shown in the following table. Make sure to modify the device names with the names of your own devices.
Open a terminal console, then log in as the root user or equivalent.
Create 2 software RAID 1 devices, using two different devices for each RAID 1 device. At the command prompt, enter these two commands:
mdadm --create /dev/md0 --run --level=1 --raid-devices=2 /dev/sdb1 /dev/sdc1
mdadm --create /dev/md1 --run --level=1 --raid-devices=2 /dev/sdd1 /dev/sde1
Create the nested RAID 1+0 device. At the command prompt, enter the following command using the software RAID 1 devices you created in Step 2:
mdadm --create /dev/md2 --run --level=0 --chunk=64 --raid-devices=2 /dev/md0 /dev/md1
The default chunk size is 64 KB.
Create a file system on the RAID 1+0 device /dev/md2, such as a Reiser file system (reiserfs). For example, at the command prompt, enter
mkfs.reiserfs /dev/md2
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/md2.
Edit the /etc/fstab file to add an entry for the RAID 1+0 device /dev/md2.
Reboot the server.
The RAID 1+0 device is mounted to /local.
(Optional) Add hot spares to service the underlying RAID 1 mirrors.
For information, see Section 6.4, “Adding or Removing a Spare Disk”.
A nested RAID 0+1 is built by creating two to four RAID 0 (striping) devices, then mirroring them as component devices in a RAID 1.
![]() | Important |
|---|---|
If you need to manage multiple connections to the devices, you must configure multipath I/O before configuring the RAID devices. For information, see Chapter 5, Managing Multipath I/O for Devices. | |
In this configuration, spare devices cannot be specified for the underlying RAID 0 devices because RAID 0 cannot tolerate a device loss. If a device fails on one side of the mirror, you must create a replacement RAID 0 device, than add it into the mirror.
The procedure in this section uses the device names shown in the following table. Make sure to modify the device names with the names of your own devices.
Open a terminal console, then log in as the root user or equivalent.
Create 2 software RAID 0 devices, using two different devices for each RAID 0 device. At the command prompt, enter these two commands:
mdadm --create /dev/md0 --run --level=0 --chunk=64 --raid-devices=2 /dev/sdb1 /dev/sdc1
mdadm --create /dev/md1 --run --level=0 --chunk=64 --raid-devices=2 /dev/sdd1 /dev/sde1
The default chunk size is 64 KB.
Create the nested RAID 0+1 device. At the command prompt, enter the following command using the software RAID 0 devices you created in Step 2:
mdadm --create /dev/md2 --run --level=1 --raid-devices=2 /dev/md0 /dev/md1
Create a file system on the RAID 0+1 device /dev/md2, such as a Reiser file system (reiserfs). For example, at the command prompt, enter
mkfs.reiserfs /dev/md2
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/md2.
Edit the /etc/fstab file to add an entry for the RAID 0+1 device /dev/md2.
Reboot the server.
The RAID 0+1 device is mounted to /local.