Cheap btrfs nas

So, since Wendell scared me with his bit rot video (and a few other articles I read recently), I was wondering if anyone recently build a low-cost low-power NAS.

Theorectically, I may be able to use a raspberry pi 3 and connect the drives via usb, but then I'd have to have n+1 seperate power connectors for a n drive NAS. In the end, I'd like to have a one-power-connector only NAS and, as the title suggests, I am going to use btrfs as filesystem since afaik btrfs doesn't have the xTiB of drives == xGiB of RAM as zfs does.

Also, I don't mind if the NAS would be slow, as long as my files are more or less safe. Do you have any suggestions?

Edit: It would be awesome if I could use a ARM CPU xD

That doesn't use ECC

If you want a cheap NAS without ECC go for AM1, it'll even handle some light plex stuff

Build list is pretty old though

PCPartPicker part list: http://pcpartpicker.com/list/bMDW23
Price breakdown by merchant: http://pcpartpicker.com/list/bMDW23/by_merchant/

CPU: AMD 5350 2.05Ghz Quad-Core Processor ($37.88 @ OutletPC)
Motherboard: ASRock AM1H-ITX Mini ITX AM1 Motherboard ($50.98 @ Newegg)
Memory: Crucial 8GB (1 x 8GB) DDR3-1600 Memory ($39.63 @ Amazon)
Case: NZXT Source 210 (White) ATX Mid Tower Case ($39.88 @ OutletPC)
Power Supply: SeaSonic 350W 80+ Bronze Certified ATX Power Supply ($31.99 @ SuperBiiz)
Total: $200.36
Prices include shipping, taxes, and discounts when available
Generated by PCPartPicker 2016-10-01 12:47 EDT-0400

**
And ya pretty sure BTRFS is still experimental, if you care about your data just stick to ZFS

1 Like

Gonna agree with @Streetguru on this one. If you can avoid it though, don't use BTRFS. Parity in BTRFS is majorly broken, in that it will sometimes recalculate the parity incorrectly.

This xTiB === XGiB rule only applies when you're doing deduplication. If you don't want to dedup your data, you don't need this. You can also tune the ZFS ram usage settings.

Obviously, use BTRFS if you want, but don't assume anything about it being reliable.

In my opinion, LVM (or mdadm) and xfs is better than BTRFS in its current (Linux 4.7) state.

1 Like

If you are going with BTRFS, a quick PSA: Do not use RAID 5 or 6 with it. It is not ready for prime time and you will experience data loss. The code behind it is bad and will most likely require a rewrite to fix it.

Depending on the amount of drives you want to use and what services and how many people are using those services I would recommend a quad core Xeon D or Avaton

1 Like

ZFS will still use a lot of ram without depuplication. By default it will use up to half of your available memory for cache plus whatever it needs for the file system. An SSD cache will require an additional 1gb per 10gb of cache or something like that. Deduplication requires an additional 4gb per 1tb etc.

The amount of ram zfs needs depends a lot on the workload so if you're not hitting the NAS very hard it won't use much ram. But if you don't have much ram and zfs needs it then it might cause a system crash.

There are ways to tune zfs for low memory systems however, probably at the cost of performance.

1 Like

I actually like the implementation of BTRFS on the newer Synology boxes. It uses BTRFS features on oldschool mdraid. So it won't repair stuff automatically but it will say "hey, that file is fucked". So as long as you have another source for the file (which you should if you care about your data) you then can replace it yourself. I plan on using crashplan for that and I also have another off site backup of my most important stuff.

Oh, but yeah, that is not cheap .. like, at all.

2 Likes

Thanks for all your replies...

@Streetguru: this doesn't look to bad, theoretically I could even pick up this mainboard (cpu included) to save another 20$ and 10W.

http://www.asrock.com/mb/AMD/QC5000-ITXPH

Oh seems I either have to read up on zfs tuning or stick with btrfs

I know btrfs is experimental, but I wouldn't have minded, the parity part is a little scaring though. As far as I've read, btrfs' checksums are better.

Didn't intend to use btrfs + raid5/6, because of it being unstable. As of the number of persons using the NAS, it would be my wife and me. I'd be fine with it being slower, since I have other and faster network attached storage.

@noenken: Since I am looking for a rather cheap nas and I would really like to build one myself, I'm probably not going to buy a Synology one, but thanks.

Well, rather lenthy answer, I hope I didn't forget anyone - thanks again :-)

The sata controller is a bit anemic. You may want to add a sata controller via PCIe

RAID1 or mirroring works fine in btrfs, it's just the raid5/6 stuff which is broken.

2 Likes

Yeah, Since @Azulath is going to be staying away from 5/6, he's totally fine using BTRFS.

ZFS will still use a lot of ram without depuplication. By default it will use up to half of your available memory for cache plus whatever it needs for the file system. An SSD cache will require an additional 1gb per 10gb of cache or something like that. Deduplication requires an additional 4gb per 1tb etc.

Odd. I've not seen anything like that with my SSD cache. I've got 16GB of ram on the machine that hosts my array and 120GB of SSD L2ARC along with 40 more of ZIL.

As far as the "half your available memory" goes, that's true, but again, it's default. I usually limit ARC to 1GB of ram. I've got SSD's and the only need for ram would be to help with 10G networking, which I don't use.

1 Like

I think the ARC is used to cache the metadata more than anything, so it saves the disks having to keep going back and forth between data and meta data when reading small files. The SSD cache memory usage seems to be workload dependant, so the cache can be full but not much memory is being used but after some heavy reads it goes right up. I think that 1gb per 10gb of cache is the maximum that is required to reference the cached data.

That's just based on stuff I've read anyway, I've only been playing around with ZFS for a couple of weeks.

1 Like

The A4-5000 is going to be a fair amount slower than the 5350

1 Like

Thanks again for the additional info :-)

@Streetguru: you might be right - "fair amount slower" doesn't compete well against a minor difference of 20$ and 10W