Considering a NAS build (ZFS + SSDs?)

Hey everyone.

I currently “back up” my data by replicating it via Nextcloud, which I have installed on an ODROID HC-2 (an ARM single-board computer with one SATA connector) with a HDD in it . I use a VPN to access Nextcloud when I’m outside of my local network. It’s pretty convenient as a “DIY dropbox” style setup, but obviously it’s pretty sketchy as a backup strategy and from a data reliability standpoint. I’d like to move to a more robust setup - namely I’m considering a proper NAS.

I only have about 500 GB of important data worth backing up (at the moment), and I don’t generate huge amounts of data in the course of my work (I’m not a video editor or anything). 2 TB of total storage would leave me plenty of room to grow.

Feature wish-list

  • Low noise and low electricity consumption.
  • Small physical size (though this is not critical).
  • Good data integrity
  • Easy and automatable back-ups to an external/off-site device.
  • Accessible over a VPN (fairly trivial)

Wanting low noise/power makes me think SSDs (especially since I don’t really have that much data) and wanting good data integrity and easy backups makes me think ZFS. If I understand correctly, ZFS makes incremental backups very easy. I’m a programmer, but I don’t know a lot about filesystems, storage devices and NASes in general.

I’ve looked around a little bit for thoughts on this combination and I’ve gotten a variety of answers (of varying ages). So I figured I’d see what you good folks have to say. Is a small (~2 TB) SSD-based ZFS NAS a good idea for what I’m describing? I’d probably go with freeNAS for the OS (though I’ve never actually used it before).

Your needs make me think that you might be better served by an off-the-shelf NAS like a Synology DS218+ or DS718+.

Your requirment for low-noise, low power, and small form factor point me in that direction. Your capacity needs are minimal and you’ve mentioned nothing that would indicate a need for much more performance out of the CPU than your HC-2 is driving.

Personally, I think ZFS is a bit overrated, especially on the smaller end of things. While it certainly does have a great feature set, it’s not the only option for getting reliable, snapshot based storage.

As for FreeNAS, most of the people I know who have demanding storage needs end up outgrowing FreeNAS very quickly and just roll their own. Those without demanding needs generally don’t need much more than reputable off-the-shelf options provide.

Totally. Just get two 2TB MX500 or similar drives and set up a mirror. If you don’t use many features you might even get away with one 8 gig stick ECC memory. Something haswell based should be cheap enough now. Or something integrated.

[EDIT] Actually, the boards for haswell are kind of stupid pricey. Go Ryzen instead. A Ryzen 3 1200, any non registered stick of ECC DDR4 and the Asus A320M-K and you have a platform. (I’m running that exact setup as a router. :wink: )

I agree with @imhigh.today your use case is well served by an appliance. These typically run arm CPUs (SOCs) and are cool and quiet. A 2 bay mirror of 2TiB SATA SSDs would be great.

The only issue I have with appliance devices is the lack of assurance that they won’t block certain plugins I need and use in the future due to licensing issues. For example I use my NAS as a DVR for my security cameras and whilst you can do that with a Synology, you normally pay extra fees per camera.

If using just two disks, again as @imhigh.today says you don’t need zfs but you may want to build a “proper” NAS so that you can upgrade in the future if you decide to get CCTV or decide you suddenly like obscure Japanese anime. If this is the case then get a microatx case and an atom 3000 class motherboard or a low end Ryzen system (good power consumption) with some spare SATA ports, roll your FreeNAS and enjoy. Freenas will run on a potato so if you want to try before you buy something expensive you can put something together using a $50 Dell optiplex and test the setup. My first NAS was a second hand pc and it ran fine for years.

Thanks for the quick replies. Still mulling things over, but two supplemental questions for now:

  • Suppose I did go with an off-the-shelf NAS appliance. What does that really offer me in terms of reliability over just plugging a large SSD into my HC-2? I would have a second drive with a mirrored copy of the data, but if one of the drive gets silently corrupted, with no checksumming or anything there’s no way to know which drive’s data is good (right?).

  • Supposing I went with an off-the-shelf NAS appliance or just a large SSD in my HC-2, and started doing regular external backups. How should I go about doing automated backups? Rsync cron job to an external drive / second HC-2?

Yes.

Which also means that no backup strategy would help you with that.

1 Like

I’ve had some problems with SSD’s in raid config using zfs, where after a short while they just start writing bad data.
Tried it on a couple of different configs, but never really looked in to it.
luckily it’s allways just been my “Game drive” e.g. no critical storage(meaning no porn was lost, just had to reinstall some steam stuff), and it has all ways been when using raid config SSDs, and not regular HDD’s,or a single SSD, which just works like a boss.
no idea why this happens, just a FYI, and ofc if anyone knows id like to know.

lol that sounds horrible… Was this on linux? What raid config?

I dont get the hype for ZFS. For most NAS solutions it carries so many penalties for pretty much just easy snapshots.

I like synology approach with mdadm and LVM - you can run that on anything and get the tuning you want.

1 Like

A lot of small, cheap units just seem to run some proprietary version of mdadm/ext3.
If zfs too scary/heavyweight, I would generally suggest btrfs in raid 1/10 for error detection, snap shotting and rebuilds after inevitable drive failure

2 Likes

The thing is that ext3 is not enough, you want unionFS, LVM or btrfs to trully unlock the potential of mdadm.
The way it scales, the way you can leverage drives for both capacity and redundancy at the same time.
Not to mention power savings from not stripping for semi-cold -storage.

There is also SnapRAID for people going for the best efficiency in colder storages.

1 Like

Is it possible for you to currently reproduce this issue? While it’s unlikely to be ZFS that is the cause (sata cables, the controller, the ssd firmware, hell even the bios are more likely culprits), if it is in fact ZFS that’s doing that then it would be fantastic to identify the bug so it can be eliminated.

Could you detail your system components and how everything is set up?
What does the behavior of the errors? Do they occur under heavy load after some time, or just a few errors every so often?

Also, does the drive have the latest firmware?

@hsnyder you may want to consider btrfs as well.

For one, unlike ZFS, it’s built into the kernel, so you don’t have to deal with dkms or rely on random repos to keep ZFS versions matching kernel versions (looking at Arch).

It might also be more ram efficient these days.

Otherwise it’s got the ~same feature set (checksumming of data and metadata; tunable copy on write of data; read-only and read-write snapshotting).

Not to add to much more to the points about zfs Vs non zfs but just to emphasise you are talking about 500GiB of unstructured data. A backup strategy involving regular disk rotations and snapshots will be trivial for that volume. The risk of data corruption on hard drives is small, unless you live on a space station orbiting jupiter, and you are far more likely to lose the mechanical drive or have a fail on write issue than bit rot. Zfs is just not needed for 2 disk solutions and you don’t need more than a pair of mirrored drives for that volume. Focus on backups.

I’d ask @TimHolus for a diagram of a HC2 cluster setup that will make you drool. Otherwise yes rsynch, or if you have a chassis with a hotswap bay just stick s backup drive in there to save snapshots and mechanically swap the drive to an off-site location once a day / week / month depending on your risk appetite.

Alternative would be a cloud solution, or NextCloud to roll your own drop box solution at a relative’s house.

GlusterFS:

200TB based on HC2


32TB based on HC2
ccfc12449ae20f01041ab381080bd2a6d38bd237_2_720x540

My private HC1.
hc1

First, I would think well about the method of backup and recovery and systematic verification of the state. And only later would I think about a file system or RAID.
Do not base the reliability of storing backups based on a specific file system or hardware solutions. Backups should be planned so that all the rest should not matter. If you base a backup and its usability on the basis of one or another file system, it is rather a mistake at the beginning.

Personally, I’m not interested in whether my backups are on one hdd or RAID and I’m not interested in whether ZFS / EXT4 / BTRFS / NTFS … I assume that regardless of the solution something will always fail and lose this data so I need to have a different environment that is properly separated and no matter what happens I will always have a backup. And for this HC2 / HC1 is a nice solution in the 3-2-1 rule. Especially when we don’t have a big budget.

Maybe the idea instead of creating one super tank for special tasks with super heavy armor go towards a light 4x4.
At the end of the day, the important thing is whether you will have a 100% correct backup if you need it and not what they are stored on.

Either large GlusterFS based on HC2 or stand alone three HC2 that will keep your backups. If you like to complicate your life, you can even use another file system everywhere, ZFS, EXT4, BTRFS. :wink:
For protection against bit rot you can try Parchive or RAR and 100% crc or prehistoric solutions like rsbep. You can also create checksums per file and verify regularly as early alarm options but not protection.
Instead of FreeNAS/TrueNAS CORE you can use OpenMediaVault. You can keep the data in an encrypted Veracrypt container or use LUKS. You can use Syncthing to synchronize data. For a Windows-based environment Acronis.

I believe the system i ran into it was,
Ryzen 1800, or 1800x.
32GB memory
2, and 4 x 500gb kingston 400 something, i believe they were called.
i bought 4 because they we’re cheap, along with an icyraid type’ish 2’5 inch where i could mount the 4 drives.
what happened was i installed/created the drives as a pool of raid0 zfs, to get dat sw33t 2gb/s write speed, from 4 drives, but after less then a day they just crapped out, and started writing bad data.
e.g. Sudo zpool status, just started complaining, and yelling at me like we we’re married, and my games became unplayable etc etc.
but it’s no biggie i just switched the 4 drives with a intel 660p? 2tb drive and haven’t looked back since then.
But as i recollect when i was debugging it, it seemed like it had something to do with ZFS/raid/SSD’s which was not totally kosher.
but i simply couldn’t be arsed at the time, i can try at sometime when i’m not swamped at work and remake the setup, since i still have all the SSD’s, and so on.
it should be said individually the drives all works perfectly, it’s just when i combine them as raid.

Interesting. ZFS is only intended to be used with direct access to drives, and I’ve heard legends of the combination of hardware raid + ZFS causing issues, but I’m not sure how that actually manifests. To be honest I kinda doubt it’s even actually a problem even though I dislike hardware raid. It’s always seemed more of a conceptual pool design failure rather than a hardware incompatibility with a concrete failure mode.

I would say the strongest possibility is the SATA (or USB) cable was bad. I’ve got over 40 fucking hard drives, and every error I’ve ever caught with ZFS is either a bad sata cable, SAS cable, or backplane. Those kind of errors can be intermittent, or a flood. Less likely is one of your ssd’s was bad.

1 Like

… uhm, sorry what?

Did you try raidz for the SSD’s?
I have a small array that has been stable over a year as a steam library. Mix of Samsung and Kingston drives.

I would look at the connector to the icy dock first, and would have tried the drives nekked before throwing away, but that’s just me