Skip to content

NAS (TrueNAS)

System Setup

Tunables

Note: these are geared towards NFS/SMB (i.e. net) performance with a VMXNET3 adapter. Note the nfsd.maxthreads is for a 96 core CPU.

System->Tunables !

https://www.truenas.com/community/resources/high-speed-networking-tuning-to-maximize-your-10g-25g-40g-networks.207/

Pool Creation

Options to note: 1MB block writes turn encryption on everywhere maybe cause you cant do it later turn on sync writes

Shares

NFS

use NFS shares for linux clients make sure the share folder you want to use as your mount point has the same user:group settings as those you specify in truenas under advanced options when you create the nfs share

Share Creation

make the nfs mapall user root in truenas, leave everything else blank make sure to only allow read access (under advanced options in the truenas page)

NFS Service

Services->NFS

Enable NFSv4 Enable NFSv3 ownership model for NFSv4 (NFSv4 ownership model sucks and breaks a lot of my stuff). NFSv4 (4.2 I guess?) has parallel connection support, so the throughput is gonna be leagues better. UDP is not available in NFSv4 so don't bother checking "Serve UDP NFS clients"

Example NFS share fstab syntax:

10.10.10.10:/mnt/pool/datastore /linux/folder nfs ro,auto,sync,nosuid,nodev,noexec,hard,noatime,nodiratime,vers=4.2,proto=tcp,nconnect=16,rsize=1048576,wsize=1048576,nocto,acdirmin=60,acdirmax=60,actimeo=60 0 0

SMB

todo

Other

every week at 3am run a long smart test every sunday and thursday at 3am tun a short smart test run a scrub task every week enable jumbo frame

truenas if you really have to copy data around, and a lot of it, and fast (migration) REDACTED