Safely storing your most important files requires both
- using filesystems that can detect bit rot, as well as
- keeping copies of those files on different devices.
What’s RAID? #
A Redundant Array of Inexpensive Disks, or “RAID,” lets you gather together several hard drives to form a single “volume” to host your files.
NAS devices make it easy to use RAID.
There are different flavors of RAID. The most common flavors offer better performance, data redundancy, or a combination of both.
RAID-1, for example, copies every bit between two different drives. If one drive fails, your data is still on the healthy drive.
Many other RAID levels also offer this “safety net” in case you have a drive failure.
Why isn’t RAID a backup? #
There are several reasons why data redundancy offers different benefits from periodic, offline backups.
1. Data loss from human and software errors #
If you, or software you run, accidentally delete files on a RAID device, those files are gone on both mirrored devices. Your disconnected backup will still have those files, though.
2. Data loss from malware #
Very similarly, if you have a computer on your LAN infected by malware such as a cryptolocker or other forms of ransomware, the files on all drives in your RAID will be affected, and the RAID won’t help you recover your data.
3. Data loss from power, controller, and cache failures #
Power surges, power supply failures, and internal component failures in your motherboard or disk controller attached to your RAID may fail cataclysmically, and take all (or most) of the drives in your RAID with it.
System crashes paired with write caches on drives can cause RAIDs to quietly fall out of sync, as well.
4. Data loss from correlated failures #
Storing your data on 2 or more drives produced from the same factory on the same day have statistically correlated failures.
Unfortunately, if you pick drives from different manufacturers to form your RAID, it may suffer performance issues due to different cache sizes, different spindle and seek speeds, and slightly different interactions to the same disk controller commands.
5. Data loss from array rebuild failures #
Correlated drive failures don’t have to happen precisely at the same time, either: when one drive fails, and you “rebuild” your RAID with a new drive, the old drive(s) will be taxed, and can fail during the rebuild. With 12 TB drives commonly used, rebuild times have grown from days to up to a week or more, depending on hardware. (It’s a long time to nervously watch the blinking lights in your NAS!)
Beware: snapshots are (also!) not backups #
Filesystems that support “snapshots” can provide automatic views at historical filesystem states.
Snapshots are very convenient, in that they are “set and forget”: your NAS takes care of them automatically, after they are set up (as opposed to offline backups, which take some amount of manual effort).
Snapshots can prevent data loss due to human and software errors and malware, but it does not protect against power and controller errors, correlated failures, or array rebuild failures.