K
← Back to blog
· · 5 min read

The 3-2-1 rule explained with my own NAS: a failing disk and a single box

I had a NAS with two mirrored disks and felt backed up. A routine review showed a dying disk, zero snapshots and no copy outside the office. What I found, what I fixed and what is still missing.

#backups #nas #truenas #security #smb

For years I’ve told clients that a backup isn’t a backup until you restore it. What I hadn’t done was apply that same review to myself with the same rigor.

My office has a NAS running TrueNAS. It holds the backups of my computers, the photos and videos of all my companies, personal documents and client material. It has two mirrored disks: if one fails, the other has everything. I felt safe.

In early November I did a full review, changing nothing, just looking. This is what I found.

What the review showed

A disk was dying. One of the two mirrored disks, a 3 TB Toshiba with about 53,000 power-on hours (more than six years), had 1,940 reallocated sectors, 240 pending and 63 that could no longer be corrected. The critical alerts went back to September and October, and there were more every week.

A reallocated sector is a part of the disk that failed and was swapped for a spare one. A few aren’t serious. Almost two thousand, and rising, is a disk telling you it’s leaving.

The alerts had been there for months. The NAS had warned. Nobody was looking. That’s the first lesson: an alert nobody reads is the same as no alert.

There wasn’t a single snapshot. No replication, no cloud copy, nothing. If someone deleted a folder by mistake, or ransomware encrypted the files from a connected computer, the mirror copied the disaster to both disks instantly.

There was a backup pool with no disk. A second space that at some point was set up as “backup” was disconnected and empty. It gave the impression that a copy existed, but there wasn’t one.

Why a mirror is not a backup

This is the mistake I see most in small businesses, and I had it myself.

A mirror (RAID 1) protects you from one thing: a disk failing. It doesn’t protect you from:

  • deleting something by mistake, because the deletion is copied to the other disk.
  • ransomware, for the same reason.
  • theft, fire or a power surge, which take the whole box with both disks inside.
  • both disks failing at once, which is more likely than it seems when they come from the same batch or are the same age.

A mirror is availability: the system keeps running when a disk fails. A backup is something else: being able to go back to how your files were yesterday, or last week, even if the box no longer exists.

The 3-2-1 rule, applied to my case

The rule is old and still the best guide I know:

  • 3 copies of what matters: the original and two backups.
  • 2 different kinds of media, so one failure can’t take all three.
  • 1 copy offsite, so a theft or a fire can’t take everything.

This is where I stood when I reviewed:

What the rule asksWhat I had
Copies31, on a mirror
Media21, the same box
Offsite10

The mirror counts as a single copy, because anything that happens to one disk happens to the other, unless one fails physically.

What I fixed the same day

Some things didn’t cost money, only time:

  1. Daily snapshots. A task that takes a picture of the shared folder every night at 1:00 and keeps it for 14 days. A snapshot takes no extra space until something changes, so it’s almost free.
  2. Visible from Windows. I set up the share so those snapshots show up as “Previous Versions”: right-click a folder, Properties, Previous Versions. That way anyone can recover yesterday’s file without asking me.
  3. Removing what was confusing. I disconnected the empty “backup” pool, so nobody thinks there’s a copy that isn’t there.
  4. Correct time. The NAS was set to the Los Angeles time zone. It sounds minor, until you look for last night’s snapshot and it’s three hours off.
  5. Updating the system. TrueNAS was several versions behind. I updated it and kept the previous versions as boot options, in case I had to roll back.

Keep in mind: snapshots handle accidental deletion and a good part of ransomware, but they live on the same disks. If the box is lost, they go with it.

What’s still missing, and costs money

Replacing the disk. I need a 6 TB or larger disk made for NAS use (CMR, not SMR) and to replace the Toshiba from the TrueNAS panel. The system rebuilds the mirror on its own. Since the other disk is already larger, total space almost doubles.

Until that happens, the mirror runs on one healthy disk and one sick one. If the healthy one fails first, everything is lost.

The copy outside the office. That’s the “1” in the rule, and the part I never had. The idea is to copy only what’s critical (backups, documents and client deliverables) to a cloud service, encrypted on the NAS before it leaves, so the provider can’t read it. TrueNAS has this built in. Before signing up I need to measure how big the critical part is and compare two costs: what you pay each month to store it, and what you pay the day you need to download it all.

Testing a restore. Neither of the two steps above counts until a test folder is recovered from the copy and its files open.

What I’d suggest you check

You don’t need to be technical to ask yourself these questions:

  • Where are the copies of what I can’t lose? How many are there, really?
  • Is any of them outside the office?
  • If I delete a folder today, can I get it back tomorrow?
  • Who reads the alerts from the device where I keep everything?
  • When was the last time anyone restored something as a test?

If the answer to several is “I don’t know”, you’re where I was a month ago. It’s not a problem as long as nothing happens. The trouble is there’s no way to know when it will.

I was lucky: the disk warned before dying and someone ended up reading the warning. The 3-2-1 rule exists so you don’t have to rely on luck.

Comments

Comments via GitHub Discussions, requires GitHub login.

Comments pending configuration (Giscus).