What is UnRAID? Outstanding Capacity with Parity

Unraid (Un-RAID) uses Even Parity to protect large numbers of data disks with minimal loss of capacity

UnRAID array with parity and caching drives
UnRAID array with parity and caching drives

There are a number of NAS operating systems out there, including several based on the BSD (Berkeley System Development) operating system. Most are proprietary to the vendor, but several are not. The most unique of these is UnRAID, which forgoes normal RAID methods in favor of something rather unique.

What is UnRAID?

UnRAID (Un-RAID) is an alternative NAS operating system that offers both volume management and fault tolerance through parity. It’s a bit like JBOD in that data is neither striped nor mirrored across the drives. However, where JBOD first fills one disk, then the next in turn, UnRAID allows you distribute files across all, one, or any combination of disks in the array you choose.

Also unlike JBOD, which offers no fault tolerance, you may protect an UnRAID setup with one or two parity disks to guard against single or dual drive failure–no matter how many data disks are in the array. The parity disks must be at least as large as the largest data disk in the array. Why? And how is fault tolerance with one or two parity drives for a massive array possible when traditional RAID parity requires so much space?

Even Parity is the Key

Unlike most RAID parity which starts with XOR bits, UnRAID uses something called even parity. Essentially, this is a bit that when added to the sum of bits in the same location across all the drives in the array, makes said sum an even number.

For instance, if the bit on Drive A is a 1, the bit on Drive B is 1, and the bit on Drive C is 1, adding them together makes 3. That being an odd number, the parity bit will be made 1 to make the result 4. This can work across any number of drives and protect against the loss of one.

E.g., 1 + 1 + 0 + 1 + 1 + 0 = 4, parity 0.

E.g., 0 + 1 + 0 + 1 + 1 + 0 = 3, parity 1.

When a drive fails, the parity bit is added to the remaining bits. If the result is odd, then the missing bit must’ve been a 1. If the result is even, then the missing bit must’ve been a 0.

E.g., 1 + 1 + 0 + 1 + 1 + (P)0 = 4, missing bit 0.

E.g., 1 + 1 + 0 + 1 + 1 + (P)1 = 5, missing bit 1.

UnRAID also supports a second parity disk which uses Reed-Solomon error correction to increase the fault tolerance to two failed drives.

Other Attributes and Factors

You can use one of several file systems with UnRAID: ReiserFS, XFS, or Btrfs. As data is written at the file level, files that are not on a failed drive are still available while the replacement for a failed drive is being rebuilt.

UnRAID shares
UnRAID shares can span disks or reside on any combination of disks you choose

Because there’s no stripping to increase performance, UnRAID offers caching disk functionality. Typically this would involve fast SSDs. Data is written to these, then transferred to the array at user-defined intervals, or as needs be.

UnRAID hosts both virtual machines (entire operating systems with programs running in memory) and the similar Docker (basic Linux OS kernal) and lightweight Containers (Linux apps with required packages).

The Upside of UnRAID

To summarize, UnRAID is a unique solution with a number of advantages.

  • You retain the entire capacity of the data disks in the array
  • One or two parity drives protect any number of drives from single or dual drive failure
  • Data remains accessible on all functioning drives even after drive failures
  • Reduces power consumption and increases disk lifespan by spinning down drives that are not in use.
  • Software is written at the file level, and is less prone to hidden data corruption
  • Runs VMs and Docker/Containers

The Downside of UnRAID

Adding disks offers no performance gain with UnRAID as with many RAID levels. In fact, the overhead of parity and distributing files reduces performance slightly. As mentioned, this can only be mitigated by employing a fast caching drive.

When to Use UnRAID

Generally speaking, when it comes to speed and simplicity, RAID will likely be a better fit with small numbers of drive. However, when maximum capacity, easy recovery, as well power savings and increased drive lifespan are important, UnRAID can be a very good option. But don’t consider it unless you’re using four or more drives.

How to Install UnRAID

UnRAID is designed to run from a USB stick. Browse to this UnRAID Web page and download either the USB Creator, which will download the bistro, or download one of the zipped distros. The USB Creator is very finicky about USB drives. It took me four tries to find one that worked, and even then it wouldn’t boot until I ran the make bootable utility.

My advice is to save yourself the grief and download the distro. Then use a tool such as Rufus to create a bootable USB disk from the image inside the zip file, and run the make bootable utility. Works like a charm.