RAID 1 and 0: Together, forever
When you’re trying to get the best performance out of multiple drives, a redundant array of independent disks (RAID) is your best bet. There are plenty of RAID modes levels (modes) to choose from, but many favor RAID 10 for its reliability and speed.
RAID 10 is an example of nested RAID, where two or more arrays are integrated into another RAID that is then visible to the system. In the case of RAID 10 (also known as RAID 1 + 0), this means having two or more RAID 1 arrays combined into a RAID 0 array. RAID 10’s sibling is RAID 0 + 1, where the top level RAID 1 array is comprised of two or more RAID 0 arrays.
RAID 10 is an example of nested RAID.
As a result, RAID 10 offers both the great resiliency of RAID 1 with the hot striping action of RAID 0. The only downside is that it requires at least four drives to work. Since RAID 10 stacks a series of RAID 1 arrays together, expanding storage means adding at least two drives, not just one.
As far as speed is concerned, you get all the speed benefits of RAID 0, but instead of speed as a function of the number of drives, speed is calculated as a function of the number of RAID 1 stripes.
To use RAID 10, there are two methods we’re going to show here: software RAID and FakeRAID. Software RAID is implemented by the OS, and the OS handles the logic for the array. FakeRAID is often denoted by motherboard manufacturers as “onboard RAID.” FakeRAID is still software driven, but that software works at the BIOS level, rather than the OS.
If you’re only running one OS, or you’ll only need your RAID in one OS, go for software RAID. If you’re going to need to share the RAID 10 array between two OSes, or plan on installing an OS on top of your RAID, go with FakeRAID.
Prepare your hardware
If you’ve been following along in our series, you’ll know that it’s always best to use drives of identical make, model, and capacity when constructing a RAID array. Even if you’re forced to use different makes and models (as we were in our examples), you have to make sure that the drive capacities are identical. Mixing drives will at best result in an array that will performs as if each drive were the slowest one.
When connecting your drives for use in RAID, be sure to use the same interface for the drive. If two drives in your array are using SATA 6Gbps, use the same interface for every other drive you intend to add to the array. If your motherboard has multiple SATA controllers (our Gigabyte board had the built-in Intel controller as well as a Marvell controller), make sure you use the main controller if you plan on using FakeRAID. We had problems getting our BIOS to detect drives that were attached to our motherboard’s additional Marvell controller.
It’s also a good idea to make sure all of the drives in your array are using the latest firmware. Firmware fixes can result in better speeds and fix potential bugs that can wreak havoc on your data.
If you’re going to use FakeRAID, make sure your motherboard has “onboard RAID.” Most recent motherboards do, but if you’re building a server out of an old machine, this is something you should check.
Windows: Storage Spaces and Disk Management
Unlike with other RAID levels like 0, 1, or 5, Windows 8 doesn’t have an obvious option for creating RAID 10 arrays using Storage Spaces. Similarly, Windows 8 can’t combine RAID arrays in its Disk Management utility either. It can however combine RAID 1 arrays created with Storage Spaces with RAID 0 in the Disk Management utility.
To start, hit Win+S and search for “storage spaces” and open the utility. Next, click create a new pool and storage space. You’ll be prompted for administrator access.
You’ll be greeted by a windows showing all the unformatted disks that can be used. Here, you’ll have to decide how you want your disks spread out in your arrays. Remember that you’ll need at least two drives for each RAID 1 stripe. Since we used four drives in our example, we selected the first two drives for our first stripe. Select the drives you want to use and click Create pool.
Each pool will represent a RAID 1 array that will be a stripe for RAID 0. Choose your drives for your storage pools accordingly.
Next, the wizard will prompt you to create a storage space in the pool. For Resiliency type, select “Two-way mirror.” This is the equivalent to RAID 1. Don’t worry about the filesystem or drive letter: that will be rendered irrelevant later. However, label each stripe something memorable (like Mirror 1, Mirror 2, etc.) so you’ll be able to find it later. When you’re ready, click Create storage space to create the array.
Give your storage space a drive label so you can find it later.
Once you’re done with the first pool, repeat the steps for every other stripe that you’ll be creating. In our case, we repeated the steps with our remaining two drives.
To tie these RAID 1 arrays all together, we’re going to use Windows’ Disk Management tool. To open it up, search for “Disk Management.”
When Disk Management is open, you should see your disks (RAID 1 arrays) in the bottom part of the window, identified by the labels you gave them. Now, we’re going to get rid of the filesystems on those drives. For each disk, right click on the blue segment and select “Delete Volume.” Be careful to leave your system disks and any other attached drives intact. When in doubt, double-check and cross-reference the drive label with the one shown in Storage Spaces.
Deleting a volume will remove the selected partition on that disk.
Once all the RAID 1 disks are clear of filesystems, it’s time to create our RAID 0 array. Right click one of your RAID 1 disks and select “New Striped Volume…” In the popup window that follows, add each of the RAID 1 disks you want to use and click Next.
Assign the RAID 10 array a drive letter. This isn’t necessary, but if you want to use your drive right away, it’s the fastest method to do so. The next screen of the popup window, select the filesystem you want (NTFS or ReFS), and enter a drive label. You can also enable drive compression here. If you forget, you can always change it later in Windows Explorer.
You’ve done the hard part. Now all you have to do is give the volume a name.
The last screen will ask you to review your options. When you’re satisfied everything looks good, click Finish. A final popup will ask you if its okay to convert your drives into dynamic disks. This basically is warning you that you’ll lose any data on them, and that other OSes won’t be able to see them. We’re okay with this, so click Yes.
That’s it! It will take Windows a while to format the drives for use, but when it’s all done, you’ll have a shiny new RAID 10 array.
Next, we’re going to see how Linux and FakeRAID handle RAID 10. (Spoiler alert: It’s much easier.)
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.