Need some pointers for a NAS/transcoding server build

Someone told me to post on this forum so here goes:

I’m planning on building a proper NAS and transcoding server for my movie/TV library but since I’ve never set up anything like that before, I’ll need some pointers and have a couple questions.

What it should do

  • Act as a LAN-NAS accessible from Windows, Linux, Android and iOS clients. I want to use it to access and back up files and photos.
  • Automated backup/sync from my devices to the NAS
  • Be a Transcoding server for my local media library (mainly 1080p 10-Bit H265/HEVC video files). It should be able to transcode those on the fly with hardware acceleration so that lower powered devices like phones can easily play it back and it doesn’t consume much power. Jellyfin seems like the best solution for this
  • Be a print server so that I can print from Android and iOS devices on my old laser printer that doesn’t have AirPrint or similar functionality
  • PiHole
  • Good data protection and redundancy to protect from drive failure and bitrot
  • Stability and low maintenance once set up. Should be able to run reliably 24/7 without the need to touch it for weeks/months
  • Automatic alerts to my phone or PC for hardware events (read/write errors, temperature warnings, things like that) and maybe auto shutdown in those cases

Future plans

  • VPN functionality (so I can have an encrypted Tunnel through my home connection when I’m using public WiFi for example)
  • Accessing the NAS and Jellyfin server over the Internet
  • Adding a small UPS to ensure safe shutdown in the event of a power failure (recommendations appreciated)

Hardware

I’m looking at the following build I found on eBay:

  • CPU: Intel Core i3 7100 (Kaby Lake)
  • iGPU: Intel HD Graphics 630 (supports up to HEVC-10bit hardware-accelerated decoding and encoding via QuickSync)
  • RAM: 2x4 GB DDR4
  • Board: Gigabyte GA B250M-D3H
  • SSD: Samsung 860 Evo 250 GB
  • HDD: WD WD20EZRZ 2TB
  • PSU: 350W Chieftec i-Arena (will probably switch that out for something higher quality and higher efficiency)

Would that be adequate for my needs?

I also have a 4 TB Seagate IronWolf NAS HDD that currently houses the bulk of my collection. I’m planning on adding another one of those to the rig for 8 TB usable storage in total with future expansion being an option.

Questions

  • What OS would be best suited for my needs? I’m familiar with Linux so I was thinking maybe Ubuntu Server or something similar? There’s also TrueNAS and docker containers but I’ve never really looked into that stuff. This is where I’ll need some pointers.
  • What file system should I use, how do I set up multiple drives to show up as one to the clients?
  • How big do the redundancy drives need to be? Is the included 2 TB enough for that?
  • Other than Jellyfin, what other software do I need to pull off everything I’ve laid out?
  • Any other tips or tricks you can give me? Would appreciate some sub recommendations and maybe some articles or videos that go into this stuff.

I want to do this right and have something that lasts for years and I’m not afraid to get my hands dirty but I’m pretty overwhelmed right now.

Thanks!

TrueNAS Scale is what you want, particularly in a homelab.

Im just ok with computers but with the help of the community here, I was able to set it up ok. I got mine working with the help of @felixthecat guide for TrueNAS Scale

Your hardware is a little bit on the low end and would probably need a RAM upgrade (32-64Gb), especially with the list of apps you want. You are likely running a Realtek LAN on that mobo, so I dont know how it will perform - mine is an Atheros NIC and it spits out corrected errors rather often and regularly. An intel NIC would be desirable but its another additional cost to you - I cant find a local one that just 2 ports and the 4 port model is about 100USD new in my area.

1 Like

I second the opinion from eel on TrueNAS Scale for the following reasons:

  • ZFS makes maintaining intregrity of your storage very easy, Snapshots, Automatic Backups and Checksum Comparison is all built-in and easy to configure
  • The way TrueNAS exposes everything through the GUI will make it a piece of cake to achieve what you’re trying to do when it comes to Jellyfin, a VPN, NAS, Pi-Hole…
  • If you want to do something on bare Linux, you can run it in a VM and still profit from the underlying Storage Management

I think the Hardware would be sufficient, although hard to grow into more in the future.
The Board has 6 SATA Ports and one Intel NIC, so that’d be a good start, but not more but a start.

A few considerations:

  • You should plan for redundancy in your Storage. 2x4TB for 8TB Striped doesn’t sound like a good idea unless you want to loose data
    → Go with either 2x4TB Mirrored for 4TB of capacity or 3x4TB in RAID-Z1 (or RAID 5 if you don’t end up with ZFS) for 8TB of capacity
  • A Singular NIC could end up being a bit of a constraint, especially with a few of the things you outlined
  • 6 SATA Ports might sound good now, but you could easily end up needing more
  • This is an old bottom-of-the-line consumer Board - I wouldn’t trust its reliability too much. Famously, most often Motherboards break before CPU/RAM/Storage at an age.
  • As eel pointed out, you’re a bit short on RAM and CPU Power

What I’d suggest is to find a used Supermicro Server Board for an E312X5 - the SKUs with a 5 at the end have an iGPU. For the following reasons:

  • More Intel NICs and SATA Ports
  • You’ll likely end up with a Board that has IPMI for Remote Management
  • Many good SATA Ports
  • More Connectivity for PCIe, Fans, Sensors, etc.
  • BIOS will have relevant settings if you want to pass through PCIe Devices etc.
  • Reliability of Supermicro Stuff newer than X9 is still amazing

Thanks for your replies!

Adding RAM isn’t an issue, I think I even have a 16 gig Kit somewhere that I could pop in.

Would ECC RAM make sense for this application or is that overkill?

I don’t think it’ll grow much beyond this. If my needs increase beyond the capabilities of this machine I will just build a “proper” server (even though this is definitely going to be a big step up from an external USB HDD). The storage should last me quite a while too since I pretty much have everything in terms of media I could possibly want and aside from this my data needs are tiny (like <100 GB which includes all documents and photos).

As for redundancy, do I need to have 3 identical 4 TB drives or is it possible to have the 2x4 TB drives for data and then 2x2 TB drives for redundancy?

And do all of the drives need to be formatted and erased at the same time? That would pose an issue because currently I have about 5 TB of data that needs to go on the 8/12 TB ZFS volume but I only have like 15 TB of storage total in my entire house right now (I know, rookie numbers :D)
The current situation is this:

  • 1x 4 TB drive, NTFS, full with data
  • 1x 4 TB drive, empty
  • 2x 2 TB drives, empty
  • 1x 2 TB drive, NTFS, full with data

So to set this up I would need to copy the data from the first drive onto the 2 empty 2 TB drives, format the 4 TB drives as ZFS, copy the data onto that ZFS volume and then add the 2 TB drives as redundancy if that’s possible. Otherwise I might just need to get a third 4 TB drive if it comes to that but I’d rather avoid that right now.

Can I add the redundancy drives later or do they need to be present from the beginning?

CPU power should be fine for the basic functionality though right? (Transcoding server, NAS and print server)

If you love your data, you want ECC. It is always recommended, but never required.

This won’t work. There are no “drives for redundancy”, only drives worth of data for redundancy.
Always buy identical drive sizes when considering any RAID-like configuration.

That’s why we like to say " always have a backup", ZFS pool or RAID isn’t a backup.

You can copy all data to 2x2TB drives and the last TB you have to get some other storage. You will need all 3x4TB to create the RAIDZ vdev and ZFS will wipe anything that’s not ZFS. You can expand the pool with another set of 3 drives of any capacity later.
Scrap the 2TB drives or use as backup or whatever.

It’s space of redundancy, not drives. A 3-wide RAIDZ1 needs 1/3 of the space as redundancy, a 4-wide RAIDZ1 needs 1/4, and so forth.
And you can’t “upgrade” or convert from a e.g. two disk stripe or mirror to a RAIDZ.

Dual core CPU is really old tech. You probably can’t use higher compression levels on your datasets because the CPU will bottleneck a lot on anything really. LZ4 is basically free real estate, but an old dual core @51W TDP? Probably more a burden than worth. Better CPU allows for higher compression > more space and performance and better CPU = better performance/watt. You get what you pay for I guess.

Useful upgrades other than CPU: 16GB of memory and that SSD as read cache in ZFS.

Is running ZFS without any redundancy an option? I could then just copy the files onto the spare drives as a cold backup in case something happens.

And honestly even if my house burns down, rebuilding the library wouldn’t be an issue. Just a lot of time. Nothing irreplaceable on there. So maybe that’s the better solution in my case?

As for the filesystem compression, will that even do much for video files? I thought they’re way too random to meaningfully compress them on the fly. I mainly picked the CPU for the iGPU’s media decode/encode capabilities and I did want a low TDP chip and no dGPU to keep the energy consumption at a minimum.

Sure. But you lose all integrity and security features of ZFS. You may as well use a different filesystem then, although other features like snapshots, ARC, tunables or easy backups are very convenient to have (which is why I keep ZFS on my laptop). And if you lose one disk, you lose the pool.

This is not a low energy consumption CPU. The two cores are probably running at 100% whenever you look at them. A modern Ryzen 5600x or -G @45W, as a comparison, is around 6 times as fast and probably spends most time in idle or low load when facing the same work. Old tech is always more power-hungry.

No, not for media that is already compressed. But it’s great for anything else.

  • TrueNAS Scale (anything primarily ZFS based) is not the best choice for easy / gradual expandability.
    ZFS filesystem expansion is done in vdevs each of which could be a raidz (nee raid5) or raidz2/3 (raid6/7?) arranged bunch of disks.

  • ECC is overkill.

I’d go to OMV with btrfs or perfectmediaserver route.

need software
LAN-NAS accessible from * samba+sftp
Automated backup/sync syncthing or a different backup alternative
on the fly transcoding (mainly 1080p 10-Bit H265/HEVC video files). jellyfin
Be a print server from Android and iOS devices old laser printer cups
PiHole docker can run in a container
data protection from drive failure and bitrot btrfs or snapraid
Low maintenance. 24/7 without the need to touch it for weeks/months hard_problem_1?
alerts to my phone or PC for hardware events (read/write errors, temperature warnings, things like that) and maybe auto shutdown in those cases hard_problem_2?

hard_problem_1: how to deal with upgrades (…and rollbacks). This is the scariest thing for most folks.
hard_problem_2: you don’t want to shutdown when there’s a problem, and it’s hard broken there’s no way for box to notify you that it’s not working until e.g. you notice you’re missing a weekly email.


I’d go with Ubuntu Server (more DIY) or OMV because a web ui and guided install.

hdd > gpt partitions > dm-crypt (cryptsetup) > LVM > several volumes for different uses.
LVM is where most of the partitioning magic happens, you can shrink/grow, carve out volumes for VMs, add read/write SSD caches.

You can use btrfs and btrfs raid from within logical volumes (ask LVM to place your logical volumes onto actual disk). This way btrfs checksumming can recover bitrot from drives, and you can more easily reorganize as you get bigger disks.

This gives you most flexibility, … and as a consequence, your expansion plan would be to just order the biggest drive WD or Seagate sell whenever you need more space - and unplug and send to recycling the smallest one (it’s encrypted, no need to wipe).

2 Likes

Alright I’ve finished testing all the hardware and copying all the data off the 4 TB drives.

Just installed OpenMediaVault and I have a question about how to partition the drives:

Do I add a volume group and a logical volume across both drives? Like this:

And then BTRFS on that logical volume:

That look right?