What Is RAID (And How To Set It Up In A NAS)

From iSCSI and SMB shares to ZFS and Btrfs, the world of NAS and storage solutions is full of abbreviations and terms that may sound rather complex to the average … Read more

Taylor Bell

Taylor Bell

Published on Jul 15, 2024

What Is RAID (And How To Set It Up In A NAS)

From iSCSI and SMB shares to ZFS and Btrfs, the world of NAS and storage solutions is full of abbreviations and terms that may sound rather complex to the average consumer. However, RAID is one term that you might have heard of if you’re even remotely into home labs.

An Aiffro K100 NAS with a controller, an HDD, and an SSD kept nearby

Related

I tried storing all of my Steam games on a NAS – here’s how it went

The experience wasn’t all that bad thanks to the amazing iSCSI protocol

While it’s arguably more complicated than the other NAS-related jargon, there are plenty of pros (as well as cons) to implementing RAID on your storage solution. So, we’ve written a detailed guide covering everything you need to know about RAID to make the most of this feature.

What is RAID?

And why should you use it?

RAID, or Redundant Array of Independent Disks, is a facility in most NAS operating systems that allows you to split and/or clone data on multiple drives. Without going into details, RAID typically involves three aspects: data striping, mirroring, and parity.

Although you can technically use drives with different capacities, it’s recommended to grab HDDs/SSDs with the same storage and transfer speeds in a RAID setup. In some cases, you’re even better off using similarly spec’d drives from different manufacturers, as this will reduce the chances of all drives failing at the same time.

Striping refers to splitting data blocks into small-sized blocks and storing them on separate disks to improve read and write speeds. Data mirroring, on the other hand, involves cloning, or rather, replicating the data of one drive onto another to protect your files and documents from disk failure. Finally, parity involves adding error correction codes to the data, allowing the system to detect drive corruption and reconstruct the lost data.

What are the different types of RAID configurations?

A person holding a WD Blue HDD

Depending on the combination of striping, mirroring, and parity, RAID can largely be divided into multiple types. Since we’d be here all day if we included every single RAID combo, here are some of the more important ones you need to know:

  • RAID 0: The first of the many RAID configurations only features striping. As such, it’s only good for scenarios that require faster read and write speeds at the expense of increased chances of data loss. It requires a minimum of two drives for its setup.
  • RAID 1: Like the previous entry on the list, RAID 1 also has a requirement of two drives, though that’s where the similarities end. That’s because RAID 1 features data mirroring, thereby providing more redundancy and ensuring safety in case a single drive fails. But the caveat here is that its transfer speeds are a lot higher than those of RAID 0, and it slashes the total capacity of both drives in half.
  • RAID 5: This one combines the fast read and write speeds associated with RAID 0 with the data reconstruction facility of parity information. Although implementing RAID 5 into your storage provides fast transfer speeds while protecting your data in case a single drive fails, it requires a minimum of three drives to function. Plus, you end up losing the storage space of a single drive as that’s the overhead required to store the parity code.
  • RAID 6: RAID 6 is a more secure version of RAID 5, as it safeguards your data from two drive failures by introducing double parity to the table. Sadly, it’s more expensive because it requires at least four drives to function. You’ll also have noticeably slower transfer speeds in the case of RAID 6, as calculating two sets of parity information.
  • RAID 10: Finally, RAID 10 switches the parity facility of RAID 5 and 6 arrays with mirroring, though you do get decent transfer speeds due to striping. As for the disadvantages, you’ll need at least four drives for RAID 10, and your effective storage capacity gets sliced in half due to the implementation of mirroring.

Apart from these five configurations, you’ll also find other setups, like RAID 2 (which combines bit-level data striping with parity information). To make things even more complicated, NAS operating systems tend to have their own versions of some or even all these RAID levels, and their names vary quite a bit from one OS to another. For instance, TrueNAS uses RAIDZ and RAIDZ2 when referring to RAID 5 and RAID 6 configurations.

Additionally, you may also notice more complex setups, like the dRAID arrays supported by TrueNAS. The key difference between them and RAIDZ arrays is that the former utilize hot spares (simply put, extra drives that don’t store any data) to cut down on the data resilvering/rebuilding times.

How to use RAID on your NAS?

With the theoretical part out of the way, it’s time to put on your tinkering gloves and set up a RAID array on your NAS. We’re going with TrueNAS Scale in this guide, but the overall procedure is more or less the same for other NAS operating systems.

  1. Open the TrueNAS UI on your web browser and log in to your account.
  2. Navigate to the Storage tab and hit the Create Pool button.
    Creating a Pool for RAID arrays in TrueNAS Scale

  3. Give a Name to the pool and hit Next.
    Giving a name to the RAID array in TrueNAS Scale

  4. Click on the drop-down arrow under Layout and choose the type of RAID array you wish to implement in your NAS.
    Choosing the RAID Layout in TrueNAS Scale

  5. If you have multiple drives of the same size, select Manual Disk Selection.
    Choosing the Manual Disk Selection option in TrueNAS Scale

  6. Drag all the drives you plan to add to the RAID setup under the VDEVs section and tap Save Selection.
    Adding the drives to the VDEVs section in TrueNAS Scale

  7. Double-check the Total Raw Capacity and Data metrics under the Configuration Preview and hit the Save and Go To Review option.
    Checking the Total Raw Capacity and Data information in TrueNAS Scale

  8. Press Create Pool button.
    Creating a RAID pool in TrueNAS Scale

  9. Enable the Confirm checkbox and hit Continue before waiting for the NAS to create the RAID pool.
    Checking the Confirm box before creating a RAID pool in TrueNAS Scale

Remember, RAID isn’t a substitute for backups

A Synology DiskStation D224+ NAS with two hard drives

With that, your RAID array is ready for use, and you can create an iSCSI local drive or share it using the SMB facility. But remember that even the most high-end RAID setup can’t act as a backup for all your data. Sure, you can rebuild or resilver the data in case of disk corruption or other drive-related disasters, but you might end up in trouble if multiple drives fail at the same time. Likewise, most RAID setups can’t protect your data if you accidentally delete or, god forbid, overwrite the files.

A Seagate IronWolf NAS 4TB hard drive kept next to a WD Blue 500GB hard drive

Related

How to replace a drive in a NAS

If your NAS is running out of space or has a dead drive, here’s how you can install a new one

Snapshots are a great way to implement a checkpoint-like system, where you can save the state of the NAS at a specific point in time. In case of any issues, you can use this snapshot to reload to the past state and restore any data lost due to human errors like accidental deletion. For those who are even more paranoid about losing data, then it’s a good idea to create backups on a separate system.

Partager cet article

Inscrivez-vous à notre newsletter