TrueNAS

An overview of my storage software of choice.

TrueNAS
TrueNAS: The world's most popular Open-Source Software Defined Storage.

I have been using TrueNAS as my network attached storage solution for over a year now. I migrated over from previously having all my disks in a Proxmox build. I decided to restructure and wanted my disks managed separately. Let's dive in.

Why TrueNAS?

Most individuals are reliant on a big tech company to host their data. It's free (up to a certain amount), convenient and integrates well into desktop and mobile devices. Google Drive, Apple iCloud, Microsoft OneDrive are the big name contenders. But the 'cloud' is just someone else's computer. We don't know what they're using the data for. One option would be to encrypt the data before uploading using a software called Cryptomator. Nobody really does this and even if they do, the other issue is losing access to the data all together because the third party you are relying on has rugged you.

This is why we should keep our own data, on hardware we control, and TrueNAS enables that.

Background

In early 2024, my desktop PC had run its course. I could no longer upgrade the parts without significant overhaul. I could no longer play my favourite game (Counter-Strike 2), the PC was almost a decade old at this point having bought it in July 2014. It had served me very well and was still in working condition, but was ultimately replaced with a new desktop PC with better specs.

The Repurpose

I thought it would be ideal to repurpose the old desktop PC, put TrueNAS on it and run it as a dedicated NAS device. I had all the parts, I just needed to throw in the drives, install TrueNAS, setup storage pools, add samba share, add nfs share, job done.

Here is a beginner guide to setting up TrueNAS.

COMPLETE TrueNAS Community Edition (Scale) Setup Guide for Beginners
Learn how to set up TrueNAS Community Edition (formerly TrueNAS Scale), detailed for beginners. Don’t make common mistakes!🎯 WunderTech Website: https://www…

The Hardware

  • Intel i7-4790K CPU
  • 32GB DDR3 RAM
  • Gigabyte GA-Z97A-GAMING-7 Motherboard
  • Antec P280 Black Super Mid Tower
  • Antec 750W PSU
  • Drives:
    • Boot Drive + nvme PCI-e adapter: Patriot P300 M.2 128GB SSD
    • 2.5" SSD: Samsung 870 EVO 2TB SATA
    • 2.5" SSD: Samsung 870 EVO 2TB SATA
    • 2.5" SSD: Samsung 870 EVO 2TB SATA
    • 2.5" SSD: Samsung 870 EVO 2TB SATA
    • 3.5" HDD: Western Digital 4TB
    • 3.5" HDD: Seagate 4TB

A limitation of this motherboard is if you use the built in M.2 nvme slot as a boot drive, you lose functionality of 2 SATA ports. So I bought a nvme PCI-e adapter and used an M.2 disk as the boot drive. Now all 6 SATA ports are available for use.

In terms of power consumption, this is doing 60W idle. It's not the best, but it's not the worst either. I want to see if I can somehow bring this down. I've tried amending some settings, but that didn't do much. I'll have to dig further, but for now, here it is:

My TrueNAS server

The Software

Unfortunately, I installed TrueNAS Core which is slowly being decommissioned in favour of TrueNAS Scale. TrueNAS Core is built on FreeBSD and has lived up to its name - rock solid, stable, reliable, hasn't skipped a beat. There is an upgrade path to TrueNAS Scale, which I'll eventually have to migrate to, but no rush just yet. If I was to start again, I'd be installing TrueNAS Scale.

Here you can see the dashboard.

TrueNAS Core Dashboard

It's a nice, clean dashboard that gives you all the information you need, right on the home page.

Storage Pools

As you can see from the dashboard, I have 3 storage pools.

  • 2 x 4TB HDD drives form the 'hddpool'. 1 vdev mirror. 4TB total capacity.
  • 4 x 2TB SSD drives form the 'ssdpool'. 2 vdev mirror. 4TB total capacity.
  • 1 x 1TB SSD drive forms the 'recordingpool'. It a drive that is attached via USB, because I don't have any more SATA ports!

Here are the disks and the pool they belong to.

There a plenty of storage configurations to choose from in TrueNAS. You'll need to research the pros and cons of each method. RAID-Z is a popular choice, but in this install I went with mirror'd VDEVs.

I figured if I used mirror'd VDEVs, it would be easier to expand capacity by adding 2 further disks. Problem is, to expand, I'll need an HBA as this motherboard only has 6 SATA ports. I'll have to look into that later.

Here's a video worth watching on the topic from TechnoTim on YouTube. He goes though the concept of mirror'd vdevs and weighs up the pros and cons.

Getting the Most Performance out of TrueNAS and ZFS
After setting up your TrueNAS server there are lots of things to configure when it comes to tuning ZFS. From pools, to disk configuration, to cache to netwo…

Services

I've kept this TrueNAS very simple. It serves SMB shares and NFS shares of all storage pools. This allows any device on the network to connect to it using login credentials.

TrueNAS Core services - SMB/NFS

Cloud Sync Tasks

A periodic task is set on the 7th day of every month to synchronise my photos to my parents place. I have a wireguard tunnel set up between the two locations using pfSense. This gives me an automated off-site backup solution for my data. I've set up an SFTP server with 1TB storage running Ubuntu Server on a Dell Optiplex 7050 micro that sits at my parents place.

Monthly backup to off-site location

Final thoughts

If you've got an old PC lying around, consider building a network attached storage (NAS) with it. TrueNAS is a great storage solution to remove your reliance on Big Tech cloud storage services.