TrueNAS
Introduction
TrueNAS is an Open Source project. It is built on top of FreeBSD, which is like a Unix/Linux operating system.
It uses the wonderful ZFS file system, which is sometimes known as RAID-Z. This provides a secure place to store your files, safe against hardware failure of individual hard drives. It also protects against “bit rot” by regularly scanning the whole storage array and validating the checksums. It provides early warning of imminent failure, so you can swap a bad disk out and a new one in before any data is lost.
The ZFS file system also provides a feature called snap shots, which allows you to quickly mark a point in time you may want to return to. It achieves this by its Copy On Write method of updating the RAID array. The files (or parts of files) are only duplicated when the data is changed. The old snap shot does not take up any extra space until new updates are written to the current live copy of the data. These snap shots can be used for temporary local backups, or saved to offline storage, or even exported to another TrueNAS computer.
TrueNAS can also support FreeBSD Jails and even full Virtual Machines. The Jails provide secure encapsulation of a virtual FreeBSD machine in a way that is very efficient and flexible with resources. The Virtual Machines can run almost any operating system, but they require allocation of resources to be fixed and reserved.
My TrueNAS Server
I have been experimenting with an installation of TrueNAS which has :
- 5 x 1Tb SATA Hard Drives, configured as RAID-Z1
- AMD FX-4130 Quad-Core Processor running at 3.8Ghz
- 8Gb RAM
The Hard Drives are all second hand (bought from eBay). They are a mixture of ages, physical sizes, and manufacturers. Although this is not the most efficient way to build an array (the disks each run at different speeds), it's probably the safest, because it's very unlikely two disks will fail at the same time (although still a possibility).
I'm not building this as a super-fast storage array. Most of the file activity will be across my wired CAT5 network (100Mb/s), or 802.11g WiFi (54Mb/s), so any SATA disk (300Mb/s) should be able to keep up with the demands I can place on it.
I have an external USB caddy to hot-plug bare hard disks into. This is used for backups. They can take a while to copy (due to the speed of the USB connection). I'm not sure how long the backups take. I run them over night, and they are always finished before breakfast.
What Does My TrueNAS Server Do?
I have been running a Fedora Linux server for many years on an old Dell Dimension E520 PC. It supports many experimental projects and live systems. Lots of things have accumulated over time - some good, and some now redundant. I'm working my way through the cobwebs and moving various services to my new TrueNAS box. This is a work in progress, and an interesting voyage of discovery.
Things that seem to work ok now :
- Heimdall Dashboard
- BOINC client for World Community Grid
- Transmission P2P Torrent downloads
Things I'm currently working on :
- DNS & DHCP server - using dnsmasq
- FAMP Stack - FreeBSD Apache MySQL PHP - initially for internal use only.
- NTP time sync server
- Simple mail server for internal use only (gathering system reports and alerts)
Things I'll look at soon :
- DLNA / UPnP media server
- MythTV Freeview DVB-T recorder
- Network Intrusion detection
- Reverse Proxy - to provide public access to hosted web sites
- VPN
- Security cameras with motion detection
- Docker container (maybe need to set up Linux in a VM for this)
- Move this web site to my TrueNAS server.
- HumHub
- NextCloud
- PMS - maybe Monica or vTiger