Linux and mdadm
The great thing about creating RAID volumes in Linux is that it’s so easy. RAID is really important for servers, and like most server software on Linux, it gets a lot of development attention. In our example, we used Ubuntu 14.04 LTS Desktop on a live USB stick.
Ubuntu Desktop doesn’t come with the driver that handles RAID out-of-the-box, so we’ll need to download and install it. Open up a terminal and enter the following command:
sudo apt-get install mdadm
Installing mdadm only takes a couple seconds.
From here, we can create the RAID 10 array with GUI tools or the command line.
If you prefer GUI, search for “Disks” and open the Gnome Disk Utility (it will appear as “Disks”).
When the window open, look for a check mark at the top of the list of devices. Click the checkmark, and you’ll be able to select a bunch of devices. If you select more than one writable storage device, a button at the bottom will appear with the label “Create RAID.” Select the drives you want to use and click the button.
Make sure to only select the disks you want to use for your array.
In the popup window, select “RAID 10 (Stripe of Mirrors)” as the RAID Level and give the array a name. You can adjust the chunk size (the size of striped data) as well. When you’re done, hit Create.
That’s all there is to it. Easy, right? If you want to feel a bit more like a wizard, you can do the same thing with a couple of command line entries.
First, we need to know what devices are called in the filesystem. You can use lsblk to figure that out:
lsblk -o name,mountpoint,size,type,model
lsblk is handy when you can't remember devices' names.
Once you’ve identified the drives you want to use, use the mdadm command to create your array. In our example setup, we used the following:
sudo mdadm --create /dev/md10 --level=10 --raid-devices=4 /dev/sdb /dev/sdc /dev/sdd /dev/sde
We got a couple errors because we had previously used the same drives in another RAID 10 array, so mdadm asked us if it was okay to write over that data.
How's that for a one-liner?
You’ll have to wait for Linux to synchronize the drives before you use them, however. Once the array is synchronized, you’ll need to partition, format and mount the array to actually use it.
Onboard FakeRAID is harder to set up, but is your only real choice if you want your RAID array to be accessible to both Windows and Linux. You can also install an OS on top of a FakeRAID array.
Once your drives are physically installed, boot into your BIOS by tapping the key prompted on startup. The message will say “Press DEL to enter Setup…” or something similar.
Once you’re in your BIOS, look for an option called “SATA mode.” This option is in different places for each motherboard manufacturer, so refer to your user manual if you can’t find it. Once you’ve found the setting, change it from AHCI to RAID. This will let your onboard RAID software know that there are possible RAID devices to be started. When you’re done, save and reboot.
For FakeRAID, switch the SATA mode from AHCI to RAID.
On the next boot, you have to get into the RAID software to set up your arrays. If you have an Intel RAID controller, you may be prompted to hit CTRL+I to start the Intel Rapid Storage Technology (RST) RAID software. The software varies by vendor, so consult your motherboard manual on entering the RAID utility. In this example, Gigabyte's implementation let us use the RST tools from inside the UEFI BIOS utility.
In Intel’s RST menu, you should see some options and a list of hard drives on your system. Select “Create RAID Volume.” Give your volume a name and select "RAID10 (0 + 1)" as the RAID level.
Intel RST FakeRAID only supports RAID 0, 1, 5 and 10.
Next, select the drives you want to include in your array. Other RST implementations may have you select drives first. Make sure that the drives you select are the correct ones; you'll lose any data saved on the drives that you use in a FakeRAID array.
On the next boot, your FakeRAID array will appear as a single disk to the operating system. Additionally, RST may display the status of your RAID disks during the boot process, before the operating system loads.
In order for Windows to be able to repair any drives in your FakeRAID setup, you’ll have to install the appropriate driver. For Intel RST, the driver is available on Intel’s website. In Linux, you’ll have to install mdadm to use the array.
RAID 10 arrays aren’t cheap due to the number of drives you need in order to set them up, but if you’ve got the coin (and the spare SATA connections) to implement it, RAID 10 offers a rock-solid combination of resiliency and speed for your data.