Live data from Hacker News

Building a Budget Homelab NAS Server

mtlynch.io

151–160 of 316 posts

Re: Building a Budget Homelab NAS Server

#151

Earlier quoted context omitted.

Did similar recently. Some suggestions for anyone else looking to do the same: i3 runs a bit cooler than ryzen, still 8 threads. 8tb WD blues (they're SMR at 8 and up). You can find Atx boards with 8 sata ports and dual nvme slots for caching / fast pools.

I'd be really careful about SMRs in a RAID. You can end up with no end of performance issues. It's all the downsides of a single SMR drive multiplied by however many drives are in the pools.

I think @dhzhzjsbevs meant that 8TB and higher is CMR. A quick google search seems to support that.

Re: Building a Budget Homelab NAS Server

#152
post #49

Author here. I consider myself an intermediate homelabber and a TrueNAS beginner. I just built my first NAS server, so wrote this to capture everything I wish I'd known at the start. I hope it's helpful for anyone else thinking about building their first NAS server. Any questions or feedback about the post are more than welcome.

[deleted]

Re: Building a Budget Homelab NAS Server

#153
post #40

Earlier quoted context omitted.

However, such a drive is getting heavily into diminishing returns territory. e.g. a 20TB drive from Seagate is $500. A 4TB drive is $70, 8TB is $140. Getting the same spend in smaller capacity drives would give you 28TB in the 4TB drives and 24TB/32TB in the 8TB drives (for $80 under/$60 over). Add in a second to rotate and you're spending $1000 in drives, assuming these 26TB drives replace the 20TB drives at a simil…

You have to factor in the power usage of having multiple drives spinning. Though I’d agree that smaller drives are better when you have a drive failure, as resilvering is quicker.

OpenZFS 2.0's sequential resilver may help:

* https://github.com/openzfs/zfs/pull/10349

* https://github.com/openzfs/zfs/releases/tag/zfs-2.0.0

Re: Building a Budget Homelab NAS Server

#154
post #49

Author here. I consider myself an intermediate homelabber and a TrueNAS beginner. I just built my first NAS server, so wrote this to capture everything I wish I'd known at the start. I hope it's helpful for anyone else thinking about building their first NAS server. Any questions or feedback about the post are more than welcome.

A few points from someone with years managing raid and ZFS in arrays all the way up to 50 disks: RAID-Z1 is something I never consider without a solid backup to restore from and a plan to execute that process at least once in the lifecycle of an array. If you suffer a total disk failure of one of those disks in the array, you have likely lost some data. The good news is that ZFS will tell you exactly which files you…

> If you suffer a total disk failure of one of those disks in the array, you have likely lost some data. [...] The reason is, with a total loss of a single disk, any read error on any of the remaining disks is a lost/corrupted file.

Wait, what? If a RAID-(z)1 ZFS array loses one disk, there's data loss? I've ran so many RAID-1 and RAID-10 arrays with mdadm that I can't even being to count them, and I had many drive failures. If any of those arrays would have corrupted data, I would have been mad as hell.

What I am missing here? How is this even remotely acceptable?

Re: Building a Budget Homelab NAS Server

#155
I would advise using ZFS on Linux over ZFS on FreeBSD. You may find this somewhat surprising if you know my post history being a major FreeBSD advocate, but I have run into a somewhat surprising and persistent (and known, but not to me when I started building) issue with FreeBSD's USB Mass Storage support. This issue does not happen on Linux. This is among several issues I noted which affected my ability to make a budget-friendly homelab NAS.

Since you are using an M.2 drive rather than a USB drive for your boot drive, you are not affected by the issue that affected me. But I've reached a point where I would not trust FreeBSD to not have weird and esoteric hardware issues that could affect performance or reliability for storage. I'd recommend using ZFS on Linux (Note, I still use FreeBSD as my primary OS for my personal laptop).

Re: Building a Budget Homelab NAS Server

#156

My conclusion from this was that the Synology is actually excellent value, and a newer one would likely have been superior on all dimensions (including time spent).

It’s hard to beat synology: small form factor, low power, quiet, excellent DSM software, web interface for file browsing, expandable array, a lot of apps including mobile apps for photo backup and backup apps, etc.

But Synology doesn’t use ZFS, which is a better filesystem than btrfs. In particular ZFS offers native encryption (instead of the clunky ecryptfs in synology), and allows ZFS send from Linux servers.

Re: Building a Budget Homelab NAS Server

#157

This article seems right up my alley, so here are some thoughts: - ZFS is pretty amazing in it's abilities, with it ushering in the age of software RAID over hardware RAID - ZFS shouldn't be limited to FreeBSD. The Linux port has come quite a long way. I'd advise you to use PPA over repo though, as many key features are missing from the version on repos. - TrueNAS is more targeted towards enterprise applications. If…

I also forgot to mention, your guidance on ZFS memory requirements is outdated. From what I have heard recent releases have drastically reduced the size of ARC cache necessary. One person reported it working phenomenally on a newer Raspberry Pi.

Re: Building a Budget Homelab NAS Server

#158

Earlier quoted context omitted.

A few points from someone with years managing raid and ZFS in arrays all the way up to 50 disks: RAID-Z1 is something I never consider without a solid backup to restore from and a plan to execute that process at least once in the lifecycle of an array. If you suffer a total disk failure of one of those disks in the array, you have likely lost some data. The good news is that ZFS will tell you exactly which files you…

> If you suffer a total disk failure of one of those disks in the array, you have likely lost some data. [...] The reason is, with a total loss of a single disk, any read error on any of the remaining disks is a lost/corrupted file. Wait, what? If a RAID-(z)1 ZFS array loses one disk, there's data loss? I've ran so many RAID-1 and RAID-10 arrays with mdadm that I can't even being to count them, and I had many drive f…

> any read error on any of the remaining disks is a lost/corrupted file.

That is the meat of it. With traditional RAID it is the same issue, except you never know it happens because as long as the controller reads something, it's happy to replicate that corruption to the other disks. At least with ZFS, you know exactly what was corrupted and can fix it, with traditional RAID you won't know it happened at all until you one day notice a corrupted file when you go to use it.

RAID-Z1 is better than traditional RAID-5 in pretty much every conceivable dimension, it just doesn't hide problems from you.

I have encountered this literal scenario where someone ran ZFS on top of a RAID-6(don't do this, use Z2 instead). Two failed drives, RAID-6 rebuilt and said everything was 100% good to go. A ZFS scrub revealed a few hundred corrupted files across 50TB of data. Overwrote the corrupted files from backups, re-scrubbed, file system was now clean.

Re: Building a Budget Homelab NAS Server

#159
post #49

Author here. I consider myself an intermediate homelabber and a TrueNAS beginner. I just built my first NAS server, so wrote this to capture everything I wish I'd known at the start. I hope it's helpful for anyone else thinking about building their first NAS server. Any questions or feedback about the post are more than welcome.

The slog is only used for synchronous writes, which most writes are not (as I understand it). Most workloads (ie non-db server) won't see much improvement with one.

Re: Building a Budget Homelab NAS Server

#160

Earlier quoted context omitted.

I know software raid is better overall but are there any advantages to hardware raid anymore? Is it just worse at everything?

I would go as far as to say "hardware raid" these days is limiting, expensive, and less performant that can be achieved with software RAID.

I think the worst point is vendor lock-in. If your controller fails, and a replacement isn't available, then you may be dead in the water. That kind of goes against the very point of RAID.
Post reply on HN