Skip to content

32_Software_RAID_Setup

Marc A. Smith edited this page Mar 3, 2017 · 4 revisions

Linux Software RAID (md)

The TUI in ESOS supports basic MD array functions (creation, removal, and adding/removing devices). For advanced configurations, you should refer to the CLI documentation described below.

Creating a new Linux MD RAID array (Software RAID -> Add Array) will guide you through the process with a couple different dialogs. The first will allow you to select the desired block devices that will be member devices of the new array. And on the following screen, you can give the array a name, choose the RAID level, and chunk size. The array is immediately assembled after choose 'OK' in the dialog.

You can also remove (stop) an MD array in the TUI (Software RAID -> Remove Array). This actually does not zero the superblocks in the member devices, it simply stops the running MD array.

If you need to remove a member device from an MD array, first mark the device as failed (Software RAID -> Set Device Faulty).

After the member device is in the "failed" state, you can then remove the member device (Software RAID -> Remove Device).

To add or replace a member device in the TUI: Software RAID -> Add Device


Using the CLI to Configure

The mdadm tool is provided with ESOS to manage Linux software RAID (md) arrays. Since there are so many good guides, articles, and information on using mdadm available on the Internet, we won't even mention a specific link in this document; simply Google "mdadm howto" and you'll get a whole slew of them. We'll provide a couple basic examples below. Possible ESOS storage configuration ideas that make use of software RAID might include using RAID0 across two different hardware RAID controllers to possibly gain performance, or using software RAID1 across multiple hardware RAID controllers or SCSI disks to increase reliability.

Create a partition on each SCSI disk block device you'd like to use for software RAID ("Linux RAID Autodetect", type 'fd'). You can use either fdisk or parted to create partitions (both are included with ESOS).

To create a RAID0 (striped) volume with a 64 KiB chunk size on two disks, run the following command:

mdadm --create /dev/md0 --chunk=64 --level=0 --raid-devices=2 /dev/sda1 /dev/sdb1

To create a RAID1 (mirrored) volume with a 64 KiB chunk size on two disks, run the following command:

mdadm --create /dev/md0 --chunk=64 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1

You can now use these new software RAID block devices as backing for a file system, or directly as a vdisk_blockio SCST device, or in conjunction with another storage management layer (eg, LVM2). The possibilities are limitless!


Next Steps

After you've created your MD RAID array(s) you can then either run LVM on the arrays with the 33_LVM_Configuration wiki page, or create traditional file systems and virtual disk files -- check out the 34_File_Systems_Configuration page.

You can also continue with the 35_Hosts_and_Initiators page now if you're going to simply map the MD array devices directly.