0

I'm asking this for the sake of clarity as I'm in the process of building a home NAS and going crazy trying to decide how to set it up.

What options are there for no hassle file/data rendundancy to avoid data loss?

What I've concluded so far:

  1. Hardware RAID: not a good idea as failure of the controller can make file/data recovery very difficult and expensive.
  2. Software RAID: Raid 10 and Raid 5 are interesting but vulnerable if more than one drive fails?
  3. File duplication: Manual file duplication is tedious and an automatic solution is better.
  4. FreeNAS: ZFS sounds great but requires a system that has ECC memory and doesn't have any repair utilities for the metadata?
  5. Unraid: Proprietary and I'm not clear on how this NAS operating system functions.
  6. Drive pooling: Solutions like drive bender sound robust but I want to find out what's behind the hype.
10
  • 1
    FreeNAS is the best way to go as ZFS is a software-RAID, self-healing filesystem that isn't dependent on RAID controllers since it's software-based. FreeNAS also offers drive pooling & is backed by iXsystems, which offers the same OS, branded TrueNAS, to its corporate customers. I run 3 pools, 2 of which are configured as Z2 (i.e. any two drives can fail without data loss), w/ 1 configured as Z1. FreeNAS will also auto-rebuild a drive should possible corruption be found, is built upon FreeBSD, and offers any and everything one could possibly want out of an NAS.
    – JW0914
    Commented Dec 4, 2019 at 12:35
  • FreeNAS with ZFS is brilliant software. Just understand, that if something goes wrong you might lack the skills to recover. Commented Dec 4, 2019 at 13:09
  • @EugenRieck that's what I'm afraid off. I guess my ideal system might be automatic file duplication and some lower-level software to handle errors with the logical and physical volumes.
    – James P.
    Commented Dec 4, 2019 at 13:27
  • Does ZFS have versioning / shadow copies / mechanism to mitigate accidental overwrite/deletion ?
    – Smock
    Commented Dec 4, 2019 at 13:29
  • 1
    @JamesP. RAID6, LVM with snapshots and XFS might be manageable enough and do the job good enough. Commented Dec 4, 2019 at 13:30

1 Answer 1

1

Reliable backup must protect from a lot of things at once - and failure of only one of that layers might make the complete solution useless:

  • Protect from medium failure
  • protect from file system corruption and similar software failure
  • protect from deletion, encryption by malware, etc.

There are many tools out there to achieve this: Let's start with RAID:

RAID will protect you from loss of a disk or a few disks. Configured and monitored correctly, it will provide high resilience against medium loss. It does however, and that's important, provide no protection at all against the other two failure points.

File system corruption is rare, but if it hits it very often results in partial data loss. Murphy's law makes sure, it's the most important files that are lost. There are two main approaches to this:

  • First of all use a very resilient file system: I am hesitant to make recommendations, but I dare say that XFS worked very well for me. In contrast to that, I have already lost ań ext4 file system to software failure.
  • Next explore the use of snapshots: This has a lot of advantages, one of them being that even a hot snapshot of the file system is very likely to be mountable without major data loss if really necessary. In addition to that, monitoring the snapshot space usage gives you an idea of the file system change rate, thus alerting you of e.g. a crypto virus maybe before it is too late. It is also trivial to recover a deleted file from a snapshot.

Deletion, encryption, etc. must be fought on different levels: I already mentioned what snapshots can contribute to the mix, but basically what you need is a cold copy of the data. Snapshots may or may not be good enough, that needs to be your choice after deliberation of all circumstances.

EDIT

Let me add one more thing: If you explore ZFS, make sure you know what you do: If something happens to your ZFS strcuture you need very specialized knowledge to get out of that situation. My personal experience is to not rely on it, if you don't have years-long experience in how to recover from problems - else you risk losing everything in one swoop.

15
  • What perils of ZFS are you referring to? ZFS is self-healing and rebuilding from a failed disk is quite simple via CLI (FreeNAS makes it even simpler via it's WebUI): zpool scrub <pool>. Perhaps you tried ZFS on a non-BSD system (IIRC, it took quite a while for it to be ported to Linux and IIRC it was buggy in Linux early on, however, I haven't looked into it on Linux for years)? On BSD, it's rock-solid... one would be hard-pressed to find an NAS OS/setup that's better and more feature-rich than FreeNAS.
    – JW0914
    Commented Dec 4, 2019 at 13:28
  • I am talking of my experience: Pools failing to initialize after power loss, scrubbing processes hanging at some percentage, etc. Just google for "ZFS pool corrupt". There surely is a solution to most of this, but it is very often some undocumented arcane ritual only accessible with years of specialized training. I don't have that. Commented Dec 4, 2019 at 13:28
  • "After power loss": No NAS should be powered on without using a UPS, so any data loss or corruption as a result of not using one is user error, not an issue with ZFS (similar corruption occurs on Linux in general from a dirty dismount). Corruption with ZFS only comes from a minute amount of sources: dirty dismount or failing hardware... please feel free to fact check via the FreeNAS forum.
    – JW0914
    Commented Dec 4, 2019 at 13:34
  • @JW0914 I understand that a NAS should have a UPS. I also understand, that UPSes fail just as every other component might fail. And classiying things as user error , then pointing to a ZFS fanboy forum validates my reservations perfectly. I accept you are of a different opinion and respect it - you are welcome to write another answer and share it with us. Commented Dec 4, 2019 at 13:37
  • To claim someone or an OS support forum as a "fanboy" for pointing out factually accurate information is perplexing. You have better odds of a coconut falling on your head than a UPS failing during a power outage, especially if the user is ensuring they're aware of the health of their UPS. I have FreeNAS configured to email me the health report from my UPS weekly, and FreeNAS is configured to auto-shutdown if power has not been restored to the UPS within 30s. It is user error if the user isn't properly configuring their setup... if it's not the user's error, then whose error is it?
    – JW0914
    Commented Dec 4, 2019 at 13:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .