Why TrueNAS?
TrueNAS (formerly FreeNAS) is a free, open-source network-attached storage (NAS) operating system built on FreeBSD and ZFS. It turns commodity hardware into an enterprise-grade storage appliance with features that cost thousands in commercial products: data integrity verification, automatic corruption repair, snapshots, compression, and thin provisioning.
ZFS is the core technology that makes TrueNAS powerful. It combines a filesystem and volume manager, providing copy-on-write semantics, checksums on all data, and self-healing capabilities. When a bit rot happens on a disk (and it will), ZFS detects it and reconstructs the data from parity. No other filesystem does this at the consumer price point.
TrueNAS SCALE vs CORE
TrueNAS comes in two branches, and choosing the right one depends on your environment:
TrueNAS SCALE runs on Debian Linux and is the recommended choice for most users. It includes Docker container support through Kubernetes, making it easy to run applications alongside your storage services. The Linux kernel provides broader hardware compatibility, and the app ecosystem covers everything from media servers to monitoring tools.
TrueNAS CORE runs on FreeBSD and is the original TrueNAS. It's extremely stable and mature, with the full power of FreeBSD's networking stack. If you're managing a FreeBSD environment or need specific FreeBSD features, CORE is the way to go. SCALE is where active development focuses, but CORE continues to receive security updates.
Hardware Recommendations
ZFS has specific hardware requirements that differ from traditional filesystem setups:
- ECC RAM -- ZFS uses RAM for its ARC (Adaptive Replacement Cache) and ECC RAM prevents bit errors in that cache. Without ECC, you lose ZFS's data integrity guarantees. This is non-negotiable for production storage.
- Boot drives -- Use two small SSDs in mirror for the OS. Never boot from a single drive or from a disk that's part of your storage pool.
- Cache drives -- An SLOG (ZIL) SSD handles synchronous write operations. For home labs, a cheap SATA SSD like a Samsung 870 EVO 500GB is plenty. A L2ARC (read cache) SSD helps when your working set exceeds RAM, but it's optional for most setups.
- Data drives -- Enterprise HDDs (Gold, Ultrastar, Exos) are ideal for capacity. For home use, consumer drives like WD Red Plus or Seagate IronWolf work fine. Always match drive sizes within a vdev -- mixing sizes wastes space.
- NIC -- A 10GbE NIC unlocks the true potential of ZFS. For home labs, a used Intel X520 or X540 dual-port SFP+ card costs around $40 and provides 20Gbps of throughput.
Understanding ZFS Pools and VDEVs
ZFS organizes disks into pools (zpools), and pools are built from vdevs (virtual devices). Understanding this hierarchy is critical:
- Mirror vdev -- Data is written to all disks in the vdev. A 2-disk mirror gives you RAID 1 redundancy. Add more disks to increase capacity. This is the recommended configuration for home labs.
- RAIDZ1 -- Single parity, equivalent to RAID 5. Can survive one disk failure. Requires minimum 3 disks.
- RAIDZ2 -- Double parity, equivalent to RAID 6. Can survive two disk failures. Requires minimum 4 disks.
- RAIDZ3 -- Triple parity. Can survive three disk failures. Requires minimum 5 disks.
Key rules: all vdevs in a pool must have the same capacity, you cannot add disks to an existing vdev (only add new vdevs), and mirror vdevs scale by adding more mirrors, not by adding more disks to an existing mirror.
Storage Pools in Practice
Here are pool configurations that work for different scenarios:
Small lab (4 drives) -- Two 2-disk mirrors. One mirror for datasets that need redundancy (documents, VMs), one mirror for datasets where you don't need it (downloads, scratch space). Simple, fast, and lets you lose one disk from each mirror independently.
Medium lab (8 drives) -- One RAIDZ2 vdev with 6 drives for protected data, two drives in mirror for cache or less critical data. This gives you 6 drive worth of usable space with double parity protection.
Large lab (12+ drives) -- Multiple RAIDZ2 vdevs or a single large RAIDZ2. Plan your vdev size carefully -- a vdev's speed is limited by its slowest disk, and rebuilding a large vdev after a failure takes a very long time.
Shares and Protocols
TrueNAS supports multiple file sharing protocols simultaneously:
- SMB/CIFS -- Windows file shares. Set up shares with proper NTFS permissions and access based on Active Directory groups. Enable SMB2/3 for best performance with modern Windows clients.
- NFS -- Unix/Linux file shares. Configure export paths and client access controls. Essential for Linux VMs, Docker containers, and development environments.
- iSCSI -- Block-level storage for VM disks, database files, or any application that needs raw disk access. Create iSCSI targets pointing to ZFS datasets and connect from your hypervisor.
- AFP -- macOS file shares. TrueNAS supports AFP for legacy Mac clients, though SMB3 works well with modern macOS.
- FTP/SFTP -- File transfer protocols for remote access. SFTP is recommended -- it runs over SSH and provides encrypted file transfer.
Snapshots and Replication
Snapshots are ZFS's killer feature. A snapshot is a point-in-time read-only copy of a dataset. Creating a snapshot is nearly instantaneous and uses zero additional space initially -- it only consumes space when data changes after the snapshot was taken.
Use snapshots for:
- Ransomware protection -- Take hourly snapshots and keep them for 24 hours. If ransomware hits, roll back to the last clean snapshot
- Data recovery -- Accidentally deleted a file? Snapshots let you browse previous versions and recover it
- Testing -- Snapshot before making changes, roll back if something breaks
TrueNAS includes built-in replication that can send snapshots to another TrueNAS system over SSH. This creates an offsite backup without third-party software. Schedule nightly replication to a secondary system and you have a complete disaster recovery solution.
Maintenance and Monitoring
ZFS is designed to be low-maintenance, but a few tasks keep it running smoothly:
- Monitor SMART data on all drives -- replace failing drives before they cause data loss
- Run periodic scrubbing (
zpool scrub) to detect and repair silent data corruption. Schedule monthly scrubs via TrueNAS scheduler - Keep firmware up to date, especially for SSDs and RAID controllers (use HBA mode, not RAID mode)
- Monitor pool health via
zpool statusand watch for any degraded states - Ensure you have at least 25% free space in your pools -- ZFS performance degrades significantly when pools are near full
- Back up your TrueNAS configuration (
System Settings - General - Save) and store it offsite