Summary
- Keep spare CMR drives on hand for NAS hot-swapping, and avoid SMR disks for performance reasons.
- Be cautious when exposing your NAS to the internet. Use proper security measures like firewalls and VPNs.
- Utilize DDNS for remote access and hosting, especially if you need a static IP for web servers.
There's no denying that pre-built NAS enclosures provide a stress-free way to store and manage all your important files. However, assembling a NAS is the better alternative for those who wish to fine-tune every aspect of their storage solution, including the OS. If you’ve tried your hand at building a NAS, then you’ve definitely heard of the TrueNAS series of operating systems.
For simpler setups, there’s the ol’ reliable TrueNAS Core that boasts high stability over all else. Alternatively, you might be more inclined to set up its younger sibling, Scale, which brings new facilities to the table. Regardless of your choice, here are ten tips that can help you unleash the full potential of these powerful operating systems.
10 Keep spare (hot-swappable) drives on hand
Just remember the difference between CMR and SMR drives
No matter how much you care for your HDDs and SSDs, even the best drives will die once they’ve reached the end of their lifespan. What’s worse, it’s possible to lose your data if the drive fails prematurely. That’s where having extra drives in your storage arsenal comes in handy. What’s more, you can utilize the Spare option in the Add Vdev section of the Storage tab to create a hot-swappable hard drive that can act as a replacement in case a drive fails mid-operation.
However, when picking out the spare drive, be sure it’s a CMR HDD instead of an SMR disk. The reason is that SMR drives have awfully slow write times, which can severely impact the performance of your NAS. Sure, their cheaper prices make them somewhat usable in scenarios where you don't need to write data onto them for a long time. However, I’d still recommend spending some extra dollars on proper CMR HDDs, even if they’re only meant to be used as hot spares.
9 Know the risks when exposing the NAS to the Internet
Better safe than sorry
While many users, including myself, are content with using their NAS over the LAN, there are times when you may need to access important data from external networks. As such, there are plenty of measures you’ll need to take to prevent unauthorized access or security breaches. For starters, a well-set-up firewall can keep intruders at bay. Likewise, it’s a good idea to use a Virtual Private Network like Wireguard or Tailscale and expose a port of said VPN on the NAS when you want to access it remotely.
As for the don’ts, make sure you haven’t enabled port-forwarding on your router, as leaving local ports open can make your NAS vulnerable to threats. If you’re extremely conscious of the security of your NAS, you should consider disabling UPnP as well.
8 DDNS is a godsend for your remote access and hosting needs
Though you’ll need to install an app on the newer versions of TrueNAS
For the uninitiated, the IP addresses of your home devices are dynamic in nature. This means the external IP of your NAS will change periodically, causing quite a bit of trouble if you try to access the NAS when you’re unaware of the new public IP. Moreover, if you’re running a web server on top of your NAS, you’ll need to ensure that the IP address doesn’t change, otherwise, nobody will be able to open your website.
Besides setting your IP to static, there’s another method to solve this conundrum. By linking a custom hostname to the precise IP address, the DDNS service can ensure you’ll always connect to the NAS, regardless of any modifications to the public IP address. However, if you’re on the latest version of TrueNAS Scale, you’ll need to install an app called DDNS Updater on the OS. Speaking of apps…
7 Experiment with apps and jails
After all, they’re there for a reason
The Virtualization and Apps/Jails tabs are extremely convenient additions that can turn your TrueNAS rig into a multi-purpose server capable of performing several other tasks besides storing a few GBs of files. On their own, Bhyve (on Core) and the KVM-based hypervisor (on Scale) let you experiment with any OS using a virtual machine.
But the ability to deploy several containers for your favorite apps is a killer feature of the OS family. Besides DDNS Updater, you can have a multitude of services, ranging from Nextcloud to Plex. Heck, TrueNAS Scale even has applications that let you host game servers for Terraria, Palworld, and Minecraft right from your NAS.
How to make a Minecraft server on Raspberry Pi
Huge Minecraft worlds inside a tiny Raspberry Pi
6 Docker is incredible if you want more apps
Containers for the win!
While TrueNAS Core and Scale already possess a solid repertoire of apps, you can further expand the catalog of tools available with the help of Docker containers. What’s more, there are a couple of different methods you can use to initialize Docker containers.
For example, you could deploy a virtual machine for your favorite Linux distro and install the Docker packages alongside the containers you wish to deploy on your NAS. Alternatively, you can use the Custom Apps option in the Apps section and set up the container by uploading its image and allocating sufficient RAM and storage resources to it.
5 Use Groups when assigning permissions
Trust me, it'll save you a lot of headaches
If you have many users accessing the NAS, then it might be a good idea to create permissions to enable (or in most cases, disable) access to certain apps, resources, and functionalities. However, setting up and keeping track of permissions for every user can quickly devolve into an annoying experience.
My suggestion is to set up different groups on TrueNAS and set the privileges and authorization rules from the Credentials tab instead. Once that’s done, you can organize the users into different groups based on their storage requirements and authorization level.
4 Don’t confuse RAID, RAIDZ, and dRAID with backups
They have their own purpose
Those who work extensively with drive pools might already be familiar with the different RAID levels supported by TrueNAS. While Core only has a limited number of options, Scale even lets you configure dRAID setups to shorten the resilver times in case one of your drives kicks the bucket mid-operation.
But if you’re a newcomer, then it’s worth noting that RAID setups can’t act as substitutes for proper backups. Sure, initializing two drives in the Mirror configuration or adding parity information using the three RAIDZ levels can grant some level of protection to your drives. However, you’ll be in trouble if multiple drives fail at the same time and you don’t have any external backups or snapshots. That’s before you include human errors like accidental deletions and overwrites, which can make it impossible to recover the data unless you have a proper backup option.
3 Change the Ethernet card if the transfer speeds are too low
A 1GbE connection can get saturated easily
Converting a spare PC into a TrueNAS-powered storage solution is a great way to put your outdated machine to good use. That said, if you’re using ultra-fast SSDs or have multiple drives installed, then you might want to check the Ethernet capabilities of your motherboard/Network Interface Card.
While a 1GbE LAN port is enough for your average user, it can end up bottlenecking the transfer speeds of your drives. Not to mention, having a single LAN socket means you don’t have any provisions in case the port stops working. Not everybody needs an expensive 10GbE card with four LAN ports, but it’s a good idea to grab at least a 2.5GbE NIC if your workload involves frequent read and write operations on the NAS.
2 iSCSI is great for storing games
Including fast-paced titles!
Recently, I transferred my Steam library from my local storage to my NAS devices via iSCSI, and I was quite surprised by how well everything worked. What’s fascinating is that latency and input lag never reared their ugly heads even when I played action-heavy titles that require precise timing to pull off the combos.
I tried storing all of my Steam games on a NAS - here's how it went
The experience wasn't all that bad thanks to the amazing iSCSI protocol
In fact, the only issue I encountered was longer load times when running open-world games on my makeshift NAS containing a 7,200 RPM drive. Looking back, I could have optimized the HDD setup further by configuring another drive in the Stripe layout and enabling caching. Regardless, for those willing to wait a couple of extra seconds for the games to boot, I’d absolutely recommend using the iSCSI protocol to store your game library.
1 The Data Protection tab is your best friend
It has all the tools to keep your NAS in tip-top shape
If you want to take proper care of your NAS and the drives, then you should check out all the tools available in the Data Protection tab. For starters, you can run S.M.A.R.T. Tests to check the condition of your HDDs and SSDs and keep tabs on their failure rates. Likewise, you should schedule regular Scrub tasks to examine checksums of your HDD’s blocks and identify bad blocks.
Then you have the Snapshots and Replication facilities that let you back up the data on your NAS. As if that’s not enough, you can even configure Cloud Sync Tasks to create off-site backups containing all your important files. Essentially, the Data Protection tab is an all-in-one solution to your backup and drive checkup needs.
Harnessing the full power of your TrueNAS setup
Besides these pointers, there are a couple of other features you should be aware of when using your TrueNAS-powered machine. If you’re worried about your NAS’ security, it’s a good idea to set up Two-Factor Authentication for added protection.
Had I written this article a year ago, I would have recommended the Truecharts catalog. Unfortunately, the implementation of Truecharts on TrueNAS is essentially dead due to altercations between iXsystems and the developers of Truecharts. Sure, you could grab a forked repository of the original Truecharts repo, but you’ll be on your own if the Truecharts apps stop working.
But if you’re having a hard time deciding between the different versions of TrueNAS, I suggest checking out our post on TrueNAS Core vs Scale. While they may possess certain similarities, there are plenty of differences between the two that you should be aware of before selecting one for your next NAS setup.
TrueNAS Scale vs TrueNAS Core: Which OS is the best for your NAS?
Despite belonging to iXsystem's TrueNAS lineup of operating systems, there are plenty of differences that set Scale apart from Core