This is the multi-page printable view of this section. Click here to print.
Solutions
- 1: Migrating Data to TrueNAS from Third-Party Solutions
- 2: Accessing TrueNAS Remotely
- 3: Migrating MinIO Data from Previous TrueNAS Versions (Deprecated)
- 4: Optimizations
- 4.1: Cross-Site Disaster Recovery
- 4.2: Media Workflows
- 4.3: Security Recommendations
- 4.4: STIG Compliance
- 4.5: Networking Recommendations
- 5: Integrations
- 5.1: AWS Images (Obsolete)
- 5.2: Asigra Plugin
- 5.3: Containers
- 5.4: CSI Driver
- 5.4.1: CSI Driver Administrators Guide
- 5.4.2: CSI Driver User Guide
- 5.4.3: CSI Driver Reference
- 5.5: Nextcloud
- 5.6: OpenStack Cinder Driver
- 5.7: Proxmox VE Storage Plugin
- 5.8: Veeam
- 5.9: Veeam Software Appliance
- 5.10: Veeam Infrastructure Appliance
- 5.11: Veeam Immutability
- 5.12: VMware
- 5.12.1: TrueNAS Virtualized with ESXi
- 5.12.2: TrueNAS vCenter Plugin
- 5.13: Hyper-V
- 5.14: Entra Domain Services (Azure DS)
TrueNAS can integrate with various other technologies or solutions to provide an enhanced experience or better integrate the TrueNAS system into a specific use case. The articles in this guide are organized into two sections: optimization recommendations for specific TrueNAS use cases and integration information for various partner solutions. Many of the TrueNAS tutorials in this section cover configuring the TrueNAS side of a partner solution and redirect over to that solution’s documentation for further guidance.
MinIO is a trademark of the MinIO Corporation.
Migrating Data to TrueNAS from Third-Party Solutions
Every NAS user has a unique storage setup and requirements. The following are general recommendations and options for migrating data into TrueNAS from third party storage solutions.
SMB Migration Using Syncthing
Users migrating data from an existing third-party NAS solution to TrueNAS 24.04 (Dragonfish) can do so using the Syncthing Enterprise application to mount the source with a remote SMB share that preserves metadata.
See Third-Party Data Migration for considerations and a full tutorial.
NFS Migration
Rsync is an open-source file transfer utility that runs on computers with Linux OS (or a Unix-like OS). Locate usage instructions and tutorials for rsync here .
If you decide to use rsync, be aware that your filesystem must support Access Control Lists (ACLs).
SMB Migration
We recommend migrating via SMB sharing if you use computers with Windows OS (or if you prefer SMB).
Robocopy is ideal for users with Windows clients. SMB also allows you to drag and drop files to migrate them from your current NAS storage into TrueNAS. Using SMB is slower than using a utility like Robocopy.
iSCSI Migration
vMotion uses block-level storage protocols to move data. If you prefer to use iSCSI (block-level storage) protocols, vMotion might be an option. vMotion is often used to move virtual machines from one host to another. Research whether vMotion is suitable for your setting and use needs.
Cloud Migration
Migrating via the cloud is another option. Services like MinIO™, S3, and Google Drive (among many others) can move your files and data from one NAS to another. Utilities like rclone facilitate migration through cloud storage platforms.
Be aware that cloud storage can be expensive when moving large amounts of data.
MinIO is a trademark of the MinIO Corporation.
Accessing TrueNAS Remotely
Overview
TrueNAS is fundamentally a storage appliance, so we recommend that you always run it not directly exposed to the internet.
However, there are many instances where a user needs to access their storage data or services remotely. In most corporate environments, a corporate VPN service controls internal and external access, performs proper auditing, and applies and enforces security best practices. For the small business or home lab, where a corporate VPN is not an option, you can choose from many easy-to-deploy and manage services that give you or your clients access to your storage services and applications. This guide introduces several access options and provides a basic walk-through enabling remote access to your TrueNAS.
In TrueNAS 24.10 and later, there are several VPN technologies to choose from, each with strengths and weaknesses that make them suitable for particular environments. This guide focuses on three options available through the TrueNAS App catalog for rapid deployment.
Tailscale
ZeroTier
Wireguard
Tailscale
Website: Tailscale
Pricing: Free / Paid Tier
Difficulty: Easy to Moderate
Usability: Tailscale focuses on simplicity and ease of setup. It uses a centralized control plane and integrates with identity providers like Google or Microsoft for authentication. It is ideal for users with limited networking knowledge.
Installing Tailscale in TrueNAS
Before installing Tailscale in TrueNAS, create an Auth Key through your Tailscale account. More Information
After creating your Auth Key you can navigate to the TrueNAS Apps Catalog and install Tailscale:
Apps -> Discover Apps -> (Search for Tailscale) -> Install
On the Installation page, scroll down to the AuthKey field, and paste the previously created key. Accept all other default settings, and then scroll down and click Install.
After the installation completes and you see the app status as Running you can navigate back to your Tailscale Machines list to see your TrueNAS system listed.
Using the Addresses listed for TrueNAS, you can now reach your TrueNAS host, including shares, apps, and other services from your other Tailscale clients anywhere in the world.
ZeroTier
Website: ZeroTier
Pricing: Free / Paid Tier
Difficulty: Moderate to Hard
Usability: User-friendly ZeroTier offers more advanced configuration options, such as managing multiple networks, IP ranges, and multicast settings. This makes it better suited for users with technical expertise.
Installing ZeroTier in TrueNAS
Before installing ZeroTier on TrueNAS, create a Network through your ZeroTier account. More Information
After creating the Network, copy the Network ID and then navigate to the TrueNAS Apps Catalog to install ZeroTier:
Apps -> Discover Apps -> (Search for ZeroTier) -> Install
On the installation screen, scroll down to the ZeroTier Configuration -> Networks field. Click to add a network and paste in the network key you copied previously. Accept all other default settings, and then scroll down to click Install.
After the installation completes and the App status changes to “Running”, you can navigate back to your ZeroTier Networks list, and click on your network to see your TrueNAS system waiting for approval.
Click to authorize TrueNAS and you have successfully finished and joined your TrueNAS system to a ZeroTier network.
Using the Addresses listed for TrueNAS, you can reach your TrueNAS host, including shares, apps, and other services from your other ZeroTier clients anywhere in the world.
Wireguard
Website: WireGuard
Pricing: Free
Difficulty: Hard
Usability: Wireguard requires manual setup and configuration. You need to manage keys, IPs, and routing yourself.
Installing Wireguard in TrueNAS
Wireguard can be setup and configured by installing the WG Easy application in the TrueNAS app catalog. Click here for more detailed information on setting up and configuring the app.
Migrating MinIO Data from Previous TrueNAS Versions (Deprecated)
Due to the interaction between the TrueNAS, MinIO™, and FreeBSD software lifecycles, the MinIO plugin does not generally deploy in TrueNAS 13.0 nor is full data migration of MinIO data from end of life (EoL) deployments of MinIO possible. Users are encouraged to pursue a manual backup and restore strategy before attempting to move to TrueNAS 24.04 or newer. These versions provide fully maintained, and updatable MinIO applications .
Enterprise customers are encouraged to contact iX Support to discuss options for guided data migration from the EoL S3 service or MinIO Plugin in TrueNAS 13.0 to the supported MinIO Enterprise applications available in TrueNAS 24.04 and newer releases.
MinIO is a trademark of the MinIO Corporation.
Optimizations
The optimizations topic has articles discussing how best to configure TrueNAS for various use cases or specific needs. This includes Disaster Recovery configurations, Media and Entertainment tuning, and Security best practices.
Cross-Site Disaster Recovery
TrueNAS supports many different disaster recovery (DR) scenarios! Some of these scenarios with recovery processes are listed here.
Point-in-Time Recovery – ZFS Replication
Of the native ways to replicate data, ZFS replication is the most efficient and reliable method for asynchronously replicating data from one TrueNAS system to another. Replication is based on snapshots of datasets or zvols and synchronizes the snapshots of the first system to the second system. There are numerous advantages to using ZFS replication. One of those is that a snapshot is a point-in-time, read-only copy of the data. This ensures that the contents of the snapshot cannot be altered.
ZFS replication is commonly used for disaster recovery. Should the first system or site go down, the remote system can be brought back by cloning the snapshot to a new dataset and restoring the share. This recovery does require some work on the side of the admin, but it’s incredibly quick and ensures that whatever was transferred is retained. Snapshots and replications can be scheduled to run every few minutes.
Another benefit of ZFS replication is the capability for the snapshots and referenced data to be stored on systems and pools of different specs or pool configuration. All-flash, high-performance pools can be backed up to lower performance pools with traditional drives and different RAID configurations. Smaller systems can also be backed up to larger central repositories. Companies such as FirstLink and others use this to help clone edge devices like the TrueNAS Mini systems to a central core TrueNAS in their data center. ZFS replication on TrueNAS ensures data protection regardless of system complexity, size, or location.
File-based Recovery – Rsync
Rsync is a file-level migration that’s the same as rsync in the Linux/FreeBSD command line. It’s handy for semi-live sync of data if you need just the same files between sites each shared over a local share.
Rsync is useful for file transfer, but it’s not recommended if files are being modified. For example, if an rsync task starts while 100 GB is being written and the data is changed before the file is written, it will cause issues with versioning and data integrity. Rsync should never be used to copy active VM data stores, block-level data (iSCSI or fibre channel shares), or other data that could constantly be in use. Rsync is slower than ZFS replication, particularly for large datasets, so it’s recommended for convenience over data integrity. It can be used between TrueNAS and many other systems.
File Recovery To or From the Cloud – Cloud Sync
TrueNAS can copy, pull, and sync data to a variety of cloud-based data storage systems, including Amazon AWS, Microsoft Azure, Google GCP, Google Drive, Backblaze B2, Dropbox, Box, and more. By integrating rclone sync for file transfers, this feature can copy files on TrueNAS into a cloud repository of a user’s choosing.
For larger datasets, TrueNAS systems are more cost-effective long term than cloud offerings, including Amazon AWS. For this reason, using TrueNAS as a backup target for protecting cloud-based data, e.g., from AWS, Dropbox, or Google Drive, is ideal because data stored in TrueNAS will get scrubbed, checked, and retained with an unlimited number of snapshots available.
Automatic Site-to-Site failover – DNS, Load-Balancing, Proprietary Tools
Automatic failover between sites is beyond the scope of TrueNAS systems alone. TrueNAS is a storage system, and while it handles data replication well in a variety of ways, automatic failover to a remote site requires knowledge of the services themselves. For environments with web or video streaming services, [DNS round-robinn(https://en.wikipedia.org/wiki/Round-robin_DNS) with failover might be feasible. Several web servers, like NGINX , also feature load-balancing services which could help mitigate service overload or downtime. TrueNAS systems provide a stable backend in this topology, with the option of also running ZFS replication for additional safety. Contact the TrueNAS Enterprise team if you need assistance with designing a storage system for your business.
An example design:
TrueNAS is a storage platform with powerful ways to ensure data integrity and consistency between local and remote sites. ZFS replication is the fastest and best way to ensure the data transferred is intact. Rsync is useful for file sync but cannot be used for live data or block-level data that could change during transfer. Cloud sync supports user workloads that archive to or from mainstream cloud providers. Beyond these tools, TrueNAS works with other systems, such as Asigra Backup and iconik smart media management , to provide an ultra-scalable backend with robust performance and a strong emphasis on data protection. The tools that TrueNAS provides combined with the flexibility to work with nearly any IT environment make it a robust system for cross-site and DR workloads.
Media Workflows
Developing and delivering media content that reaches audiences whenever and wherever they are has increased in importance and complexity. In today’s highly connected, entertainment-driven world, media and entertainment (M&E) companies need to stay competitive to succeed. These organizations need to produce information and entertainment in a variety of different formats to display on mobile devices, desktops, workstations, Blu-ray players, game consoles, set-top boxes, and TVs as well as in digital and analog movie theaters. Workflows grow in complexity daily and time-to-market windows continue to shrink. Where and how to store and archive all this content remains top-of-mind. M&E projects run on multiple heterogeneous environments, need an enterprise- grade storage array’s features, and require multiple protocols.
Most M&E production houses purchase data storage based on capacity and performance dictated by the needs of existing applications. As a result, businesses often end up with multiple classes of application-specific storage or storage silos including SAN, NAS, all-flash arrays, and many forms of direct attached storage (DAS) from a multitude of vendors.
Creative organizations are often forced to over-provision and over-purchase capacity or performance, or use an all-flash array to meet their production needs. This reactive purchasing drives up the cost of media production. As media files grow, it becomes complex to manage and inefficient to increase the capacity or performance of DAS or consumer-grade NAS, so many turn to cloud storage. The security risk and expense of cloud storage are a top priority of IT and Media Managers. These factors and others put intense pressure on your budget and data storage infrastructure to keep up with the demand.
A TrueNAS Enterprise storage system brings an enterprise-grade storage solution supporting multiple protocols to M&E production houses that is capable and affordable for many M&E applications. It is designed to enable M&E customers to address media capacity and performance requirements while reducing total cost of ownership (TCO), consolidating digital assets, accelerating media workflows, and providing the features needed to protect all media assets. Read more to learn how TrueNAS can be optimized for typical M&E production house usage.
General tuning recommendations are changing constantly! Check back often to see what’s changed or add your own recommendations !
General Optimizations
- Use SMB3 sharing on both the TrueNAS and any client systems.
- A typical recommendation is to use Mixed RAID (2+1 RAIDZ) in most cases with added Read and Write cache. The Write cache is optional if the system is only using SMB sharing.
- Setting jumbo frames (MTU: 9000) on the network, TrueNAS, and client side is important for large file streams.
- Do not store Media Cache Files and Media Cache Databases on a NAS. These files must stay local on clients. Ideally, client systems use SSDs and NVMe devices to store these files.
- With standard (non flash) systems, don’t move or copy files or footage while editing. This causes choppy playback.
Software-specific Tuning
Beyond general optimization for Media and Entertainment workflows are tunings or TrueNAS usage recommendations for specific applications.
Adobe Premiere®
System size is a primary factor when tuning TrueNAS for Adobe Premiere workflows.
4K workflows typically want 20 disks or more. 8K can be all-flash demanding, but Premiere has the proxies feature to reduce the performance impact. Make sure your client systems or other applications support this feature too.
To get some performance improvement when scrubbing through long video files with audio tracks, de-select play audio while scrubbing under Preferences > Audio
Shared projects must enable Project Locking in Premiere.
Security Recommendations
Follow these best practices to administer TrueNAS securely.
General Recommendations
- Modifying the base TrueNAS firmware image is unsupported and can create security issues.
- Keep TrueNAS up-to-date with the most recent updates for your supported version.
- Upgrade to new major releases promptly consistent with the deployment use case.
- Disable any network services when not in use.
- Restrict the TrueNAS web UI, IPMI, and any other management interfaces to private subnets away from untrusted users, or keep them disconnected when not in active use.
- Configure Syslog settings to send logs to an external server (CORE | SCALE ).
- In TrueNAS 24.04 (Dragonfish) or later, locally monitor and review audit logs using the Audit screen.
- In the System > Advanced Settings, always keep Show Text Console without Password Prompt set to Disabled.
For information about any identified security vulnerabilities in TrueNAS products, consult the TrueNAS Security Advisories site. Check back regularly for updates.
TrueNAS Default Ports
TrueNAS open ports are 80 and 443.
TrueNAS provides a range of different storage services and uses TCP/IP for both data and management functions. All protocols can be securely encrypted and routed using VPN technologies. This approach is encouraged when using services directly over the Internet or WAN.
Inbound Ports
The TCP ports and services that listen for external connections:
| Inbound Port | Protocol | Service Name | Description of Service | Encrypted | Defaults |
|---|---|---|---|---|---|
| 80/443 | TCP | HTTP/HTTPS | Web interface REST API WebSockets API | Optional | Open |
| 22 | TCP | SSH/SFTP | Secure Shell Secure FTP ZFS Replication Rsync over SSH | Yes | Closed |
| 111/2049 | TCP/UDP | NFS v3 | Network File Service | No | Closed |
| 137/138/139/445 | TCP/UDP | SMB | Windows File Service | Optional | Closed |
| 548 | TCP | AFP | Apple File Service | No | Closed |
| 20/21 | TCP | FTP | File Transfer Protocol | No | Closed |
| 443 | TCP | WebDAV | HTTPS access to files | Yes | Closed |
| 3260 | TCP | iSCSI | Block storage over IP | Optional | Closed |
| 9000 | TCP | S3 API | Object storage over IP | Yes | Closed |
| 873 | TCP | Rsync | Remote synchronization | Optional | Closed |
| Not defined | UDP | Wireguard | Point-to-point encryption | Yes | Closed |
| 161/162 | TCP | SNMP | Simple Network Monitoring | Optional | Closed |
Outbound Ports
Outbound protocols do not listen for or accept external connections. These protocols and ports are not a security risk and are usually allowed through firewalls. These protocols are considered primary and might need to be permitted through a firewall:
| Outbound Port | Protocol | Service Name | Description of Service | Encrypted | Defaults |
|---|---|---|---|---|---|
| 80/443 | TCP | HTTP/HTTPS | Software updates and Pro-active support | Optional | Open |
| 25/465 | TCP | Sendmail/TLS | Send emails for alerts | No | Outgoing |
| 123 | TCP | NTP | Network Time synchronization | Yes | Outgoing |
| 514 | TCP | Syslog | Logging of alerts and changes | No | Outgoing |
Callouts to Websites
Some elements of TrueNAS make external callouts to online locations. Manage these callout addresses as part of your general network configuration (e.g., TrueNAS and router allow/deny hosts, etc.) to further secure your system. Callouts are grouped into several classes.
User Accounts
Restrict new TrueNAS user accounts to the most minimal set of storage ACL permissions and access possible.
On TrueNAS 22.12 or newer, create the administrator account on install and disable root NAS administrative access.
In TrueNAS 24.04 (Dragonfish) or later, use the Credentials > Groups > Privileges screen to define limited access administrative roles, such as read-only or share administrators. Assign users to those groups to grant partial NAS administrative access. Members of privileged groups can access the UI but cannot perform administrative tasks outside those defined by their role(s).
Use complex passwords and Two-Factor Authentication for all TrueNAS administrator accounts.
Grant TrueNAS user accounts (local or domain accounts) access to SSH or console shells only if that user is explicitly trusted.
Shares
Using SMB, iSCSI, or NFS to share data is common for TrueNAS users. However, it allows outside connections to the system and must be configured to minimize security concerns.
iSCSI
Follow the iSCSI creation wizard to create an iSCSI share.
When creating a new Portal, consider adding a Discovery Authentication Method. This adds authentication between the initiator and the extent based on the chosen authentication method, CHAP or Mutual CHAP.
Be aware that discovery authentication only secures initial discovery. iSCSI data traffic is not encrypted and should be isolated from regular data traffic or other types of network communication. One common approach is to create a dedicated network or VLAN (Virtual Local Area Network) specifically for iSCSI traffic.
Entering a list of Initiators and Authorized Networks is also recommended. This allows you to define systems or networks that can connect to the extent. When these options are empty, all initiators and all networks can connect to the extent.
NFS
During NFS share creation , define which systems are authorized for share connections. Leaving the Authorized Networks or Authorized Hosts and IP addresses lists empty allows any system to connect to the NFS share. To define which systems can connect to the share, click *Advanced Options, then enter all networks, hosts, and IP addresses to share access.
NFS service settings are in Services after clicking the (pencil).
For greater security and more granular access control, enable the NFSv4 protocol. To apply NFS ACLs, click Advanced Options on the add or edit NFS share screen, then enter Access details.
SMB
Select a Purpose during SMB share creation . This changes the share configuration with one click. For example, when selecting Private SMB Datasets and Shares from the list, TrueNAS adjusts the Advanced Options so the share is set up for private use. To fully customize the share settings, select No presets as the Purpose. Unless you require a specific purpose for the share, we recommend selecting Default share parameters as the Purpose.
SMB service settings are in Services after clicking the (pencil).
Do not use NTLMv1 Auth with an untrusted network. This encryption option is insecure and vulnerable.
Microsoft is deprecating NTLM network authentication in a staged process. Windows 11 version 24H2, Windows Server 2025, and later versions have removed NTLMv1 network authentication. See Upcoming changes to NTLMv1 in Windows 11 version 24H2 and Windows Server 2025 for more information. Microsoft also plans to disable all NTLM authentication by default in a future major Windows release. See Advancing Windows Security: Disabling NTLM by Default for more information.
Enterprise and Active Directory deployments are not affected by either change. TrueNAS SMB deployments that use Active Directory rely on Kerberos authentication and are unaffected by these changes. Active Directory remains the recommended configuration for business and enterprise SMB deployments.
Home and workgroup deployments that use local TrueNAS accounts are affected as follows:
- The NTLMv1 Auth setting in the TrueNAS SMB service has no effect for Windows 11 (version 24H2 and later) or Windows Server 2025 clients, which no longer send NTLMv1. This setting might still be relevant for legacy or non-Windows devices that use NTLMv1.
- Windows clients using NTLMv2 (standard for workgroup and local account SMB access) currently connect without issue. These clients lose SMB access when Microsoft enforces the full NTLM disable-by-default in a future Windows release. macOS, Linux, older Windows versions, and network-attached devices such as printers and MFPs are not affected. When that change takes effect, re-enabling NTLM in Windows security policy is a temporary workaround.
TrueNAS plans to add improved authentication support for home and workgroup users in a future release, dependent on upstream development in Samba.
When an administrator group is required, verify the group members are correctly configured. Administration group members have full permission to modify or delete the share data.
SSH
Using Secure Shell (SSH) to connect to your TrueNAS is very helpful when issuing commands through the CLI. SSH settings are in Services after clicking the (pencil).
For best security, disable all login options for root or admin accounts in the SSH service options. Instead, create and exchange SSH keys between client systems and TrueNAS before attempting to connect with SSH.
Be careful when prompted to overwrite any existing SSH key pairs, as this can disrupt previously configured SSH connections. SSH key pair overwrites are permanent.
- Open Windows Powershell or a terminal.
- Enter
ssh-keygen.exe. - Type in a location to store the new key pair or press Enter to use the default location (recommended) shown in parentheses.
- Type in a passphrase (recommended) for the keypair or press Enter to not use a passphrase. Confirm the passphrase.
- Open the Terminal app
- Enter
ssh-keygen -t rsa -b 2048. This uses the RSA algorithm to create a key of 2048 bits, which is generally considered acceptable. - Type in a location to store the new key pair or press Enter to use the default location (recommended).
- Type in a passphrase (recommended) for the keypair or press Enter to not use a passphrase. Confirm the passphrase.
- Open the shell.
- Enter
ssh-keygen. By default, this uses the RSA algorithm to create a 3072-bit key pair. - Type in a location to store the new key pair or press Enter to use the default location (recommended).
- Type in a passphrase (recommended) for the keypair or press Enter to not use a passphrase. Confirm the passphrase.
- Open the shell.
- Enter
ssh-keygen -t rsa. This uses the RSA algorithm to create the key pair. - Type in a location to store the new key pair or press Enter to use the default location (recommended).
- Type in a passphrase (recommended) for the keypair or press Enter to not use a passphrase. Confirm the passphrase.
Root account logins using SSH are never recommended. Create TrueNAS user accounts with limited permissions and log in to these when using SSH. If a critical situation requires root login, first set up two-factor authentication (CORE | SCALE ) as an extra layer of security. Disable the Log in as Root with Password setting as soon as the situation is resolved.
Unless required, do not set Allow TCP Port Forwarding.
Many SSH ciphers are outdated and vulnerable. It is not safe to enable any weak SSH ciphers. Block both the CBC and Arcfour ciphers by going to Services > SSH > Edit > Advanced Options and adding this line in the Auxiliary Parameters:
Ciphers chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
Virtualization: VMs, Plugins, Apps
In TrueNAS 13.3, 13.0, and earlier, these features are obsolete and should not be used in production environments.
For production environments, use the tested and supported virtualization features available in TrueNAS 24.04 or newer. TrueNAS Enterprise customers can contact the TrueNAS Support team to schedule a TrueNAS deployment.
Review any application or virtual machine (VM) deployment scenario for additional security exposure or vulnerabilities. The TrueNAS team cannot resolve security vulnerabilities introduced from within user-deployed virtualized environments.
After configuring a VM , disable any VNC or SPICE virtual machine display devices.
Update applications regularly. TrueNAS monitors connected application catalogs and trains and displays available updates on the Installed applications screen.
STIG Compliance
TrueNAS Compliance
TrueNAS falls into the category of an appliance with its own operating system as covered in General Purpose Operating System Security Requirements Guide (GPOS SRG) findings. Through connection to Active Directory, TrueNAS also complies with the Active Directory Domain Security Technical Implementation Guide SRG findings related to authentication and access controls for user, group, and systems.
Customizing TrueNAS Security Options for STIG Compliance
Many areas of compliance with the STIG SRG findings are automatically addressed through the TrueNAS kernel and middleware, but some are optional settings and features in the TrueNAS UI administration users customize to suit individual use cases and security policies. This article details customizable settings to accomplish a security-hardened system for STIG and FIPS compliance.
Install TrueNAS
Existing TrueNAS systems can upgrade to the latest release through the UI.
Earlier releases of TrueNAS can upgrade by following the established migration paths or might need to clean-install the latest release of SCALE using the
If side-grading (migrating) from an earlier release to the latest TrueNAS release, follow guidance in the Preparing to Migrate article before beginning the migration.
If clean-installing TrueNAS for the first time, follow guidance in the Installation Instructions articles.
Prerequisites
If you are installing TrueNAS on servers other than licensed TrueNAS Enterprise systems, you should read and follow guidance in the TrueNAS Hardware Guide .
Configuring TrueNAS
After installing TrueNAS, users must configure network, storage, users, sharing, and data backup solutions. See Configuration Instructions for more information.
Administration Accounts
TrueNAS creates the root user and an administration user at installation. Some releases of TrueNAS might only have root as the default administration user, while other releases have either the admin or truenas_admin as the default user.
TrueNAS systems with the root user, or either the admin or truenas_admin user should create a new administration user with full control privileges and assign a complex password that follows current password management guidelines.
After testing the login for the new administration user, disable both the root user password if not already disabled, and the default admin or truenas_admin user password to security-harden the system. Only enable the root user password when necessary to perform functions not available to the administration user, and when tasks are complete, disable the root user password again.
If creating multiple administration user accounts for individuals that fill specific roles, limit privileges and access to what is minimally required to perform the system responsibilities.
See Using Administrator Logins for more information on administration user accounts.
Restrict Access to Roles
TrueNAS allows for role-based access control (RBAC) through the privileges function such as the predefined, full control, readonly, and sharing_administrator roles.
In 24.10 and later releases, full administrators can configure new privileges to create other administration user roles with access limited to specific tasks such as replication, cloud sync, cloud backup, apps and docker, directory services, system audit, and keychain read/write capabilities. Create the new privilege and assign it to a new or existing group, and then assign the new group to the administration user.
Use caution when creating new privileges. Incorrectly configuring privileges can result in unintended consequences. Do not modify the default existing privileges!
See Using Administrator Logins for more information on administration user accounts.
Restrict Access to SSH
Enable SSH access only for the full-control administration user (Local Administrator) but do not leave the SSH service enabled when not in use. Disable the SSH service after completing the required tasks. Re-enable it only when you need access again.
Do not set the SSH service to start automatically if the system restarts to prevent starting and leaving SSH running when not needed. See SSH Service for more information.
If using multiple administration user accounts, limit SSH session access to only users that require this ability to communicate with TrueNAS at the command-line level. See Restrict Access to Sudo Commands for more information.
Restrict Access to Sudo Commands
Only the main system administration account should have access to sudo commands.
If other administration users need access to SSH or sudo command, restrict access to specific sudo commands rather than allowing unlimited access.
Also, require password entry before executing any sudo command in an SSH or shell session.
If creating multiple administration users with permissions to perform specific tasks, do not enable sudo commands or configure limited access by entering only the specific commands they need to use to complete required tasks.
See Managing Users
and Using Administrator Logins
for more information on creating users and allowing sudo command access.
Restrict Access to Shell
Configure access to the shell for only the main administration user with full control. For better control leave access to the shell to only the root user. Enable the root user password only when required.
If creating multiple administration users, deny or restrict administration user access to the shell.
If granting limited access to the shell, restrict sudo command access to only those commands necessary for the role the administration user fills and enforce password entry for commands.
Lock Users
If necessary, use the Lock User option on the Credentials > Users > Edit User screen to prevent or restrict user access for a limited time. Locking the account disables but does not delete the account.
Web UI Security
Various settings found on the System > General Settings and Advanced Settings screens can limit web UI access, increase visibility of system activity, and increase system security. TrueNAS can also require login credential entry before permitting access to the Console Setup menu after the system installation.
Require Login to Show Console Setup Menu
After the initial system installation, administration users with full control can configure TrueNAS to require a user login before showing the Console Setup menu screen. Go to System > Advanced Settings and click Configure on the Console widget. Clearing the Show Text Console without Password Prompt sets TrueNAS to show the login prompt before showing the Console Setup menu.
Set Up a GUI SSL Certificate
TrueNAS provides a default, self-signed certificate to enable encrypted web interface connections but users can obtain, import, or create a new certificate to use for this function for added security. If adding or importing a certificate, go to Credentials > Certificates then first add or import the certificate authority (CA) and then create or import the certificate to add it as a selectable option in the GUI SSL Certificate field on the System > General Settings > GUI Settings screen.
Configure HTTPS TLS Protocols
TrueNAS uses TLSv1.2 and TLSv1.3 to provide a cryptographic protocol for securing client/server connections. TrueNAS provides the TLSv1.0 and TLSv1.1 options for backward compatibility but these protocols are less secure than the default protocol selections. To change the default selections, go to System > General Settings, and click Settings on the GUI widget. Click the dropdown arrow for HTTPS Protocols, make the change and then click Save.
Configure a Banner
TrueNAS allows you to configure a banner message to show before logging into the web UI or SSH login screens.
To configure a web UI banner message, go to System > Advanced Settings and click Configure on the Access widget. Type the text into the Login Banner field, and click Save. This shows a banner screen when users first enter the web UI IP address. Users click Continue to gain access the TrueNAS login screen.
To configure a banner before authorized users can log into an SSH session, go to System > Advanced Settings and click Console. Enter the text for the message in the MOTD Banner field and click Save.
Session Controls
Monitor the user session displayed on the Access widget located on the System > Advanced Settings screen. Use Terminate Other Sessions to end a WebSocket session/connection to TrueNAS if necessary. Configure session timeout in seconds to limit how long TrueNAS remains logged in when not in active use.
Configure Two Factor Authentication
Two Factor Authentication adds a second level of security to log-in access. TrueNAS provides the option to enable two-factor authentication globally, which prompts users to set up 2FA for the web UI. A separate option allows requiring two-factor authentication to log into an SSH session for users who configured a 2FA secret.
STIG Mode Exception: In GPOS STIG compatibility mode, 2FA for UI access is mandatory for all users. In standard mode, users can skip 2FA setup and log in without it.
When global 2FA is enabled in standard (non-STIG) mode:
- Users with a configured 2FA secret must provide the 2FA code to log in to the UI
- Users without a configured 2FA secret can log in without 2FA but see a one-time per session prompt to set it up
- SSH 2FA only applies to users who configured a 2FA secret and are using password-based authentication
See Managing Global Two-Factor Authentication for more information
Monitor System Activity
Monitor System Console Messages
TrueNAS allows showing real-time console messages at the bottom of the web UI screen. Turning this on allows the administration user to monitor console messages detailing system activity. Click on the banner at the bottom of the UI screen to open a dialog showing system activity for a few days of system activity. Go to System > General Settings and click Settings on the GUI widget. Select Show Console Messages and click Save to show console messages.
System Auditing
To customize the system auditing retention period, specify how long the TrueNAS retains auditing records. See Audit Logs for more information on TrueNAS audit logs and configuring auditing settings.
To keep audit log records beyond the retention period, use the Export button to download a copy of the audit database. Move the file to a remote backup server to retain a copy of the log based on your data security policies. TrueNAS prevents modification of the audit log database on the TrueNAS server. Use other data protection measures to prevent modification of a downloaded copy of the file.
System Logging
Configure TrueNAS to send system logs to an external server using the Syslog widget on the System > Advanced Settings screen in release 24.10 and later .
Enter the IP address or host name for the remote system logging server. Select the preconfigured system certificate.
You need a certificate to use TLS protocol for syslog transport to the remote log server. Create a new dedicated certificate authority and certificate to secure the TLS connection with the remote server.
To include the fully-qualified domain name (FQDN) in logs to precisely identify systems with similar host names, select or enable the Use FQDN for Logging option.
Alert Settings
Configure alert settings to monitor system, user, and process activity from the System > Alert Settings screen.
Configure the email address to receive system alerts when triggered.
Next, configure the individual alert parameters for your use case. Consider setting the following alerts for STIG compliance:
| Category | Alert | Reason |
|---|---|---|
| Audit | Audit Service Backend Failed | Set alert level preference to send notifications when an auditing function failure occurs to promptly correct the issue and not lose audit logs. |
| Audit Service Setup Failed | Set alert level preference to send notifications when the auditing setup fails to correct the issue promptly and not lose audit logs. | |
| Certificates |
| Set alert level preferences to send notifications when certificates near expiration. This allows you to renew or replace certificates before they affect certificate-dependent functions. |
| Certificate Revoked | Set alert preferences to notify you of certificate revocations so you can promptly obtain a new certificate. | |
| Web UI HTTPS Certificate Setup Failed | Set alert level preferences to send notifications when the web UI HTTPS certificate setup fails to promptly address issues that impact the security of HTTPS access to the TrueNAS web UI. | |
| Directory Services | Active Directory Domain Validation Failed | Set the alert level preference to send notifications when Active Directory domain verification fails to promptly investigate and take corrective action. |
| Key Management Interoperability Protocol (KMIP) | Failed to Communicate with KMIP Server | Set alert level preference to send notifications when a communication failure with the KMIP server occurs to promptly diagnose and correct issues. |
| Set the alert level preference to send notifications when the SED global password fails to sync with the KMIP server to promptly diagnose and correct password and/or sync issues. | |
| Sharing |
| Set alert preferences to notify you when the system detects deprecated services or configurations. Consult release notes and tutorials for information on affected Share protocols and their replacements. |
| Set alert preferences to notify you of failed or missing network connections so you can update configurations promptly. | |
| NTLMv1 authentication has been attempted in the last 24 hours | Set alert preferences to notify you when NTLMv1 authentication occurs between TrueNAS and Windows servers. NTLMv1 provides some session security, message integrity, and confidentiality but lacks the robustness of modern protocols and remains vulnerable to replay and brute-force attacks. Investigate any NTLMv1 usage promptly and upgrade to more secure authentication methods. | |
| SMB share path has unresolvable issues | Set the alert level preference to send notifications when there are unresolvable issues with an SMB share path. Leaving share paths issues unaddressed can leave the system and data in the shares vulnerable to attack. | |
| Storage | Pool consuming USB disks | Set the alert level preference to send notifications when TrueNAS detects a USB disk connected to and used by the system. USB drives can put data and data security at risk if used for normal storage and as a potential source of unauthorized data transfer medium. USB drives are not recommended as a target for system and data backups. |
| System |
| Set alert preferences to notify you when TrueNAS detects administrator activity in web UI and SSH sessions. These alerts help you identify potential unauthorized access to TrueNAS features, functions, system configuration, and data storage. |
| The Web Interface Could Not Bind to Configured Address | Set the alert level preference to send notifications when TrueNAS detects problems binding to any network address. Address incorrectly configured network addresses promptly to maintain secure communication between TrueNAS and other remote servers. |
Network Security
Do not leave inactive network connections configured or active in TrueNAS even if they are non-public IP addresses.
Allowed IP Addresses
To limit the IP address(es) allowed access to the TrueNAS web UI to a single or range of IP addresses in a subnet, go to System > Advanced Settings > Allowed IP Addresses and either enter a single IP address to restrict access to one IP address, or enter an IP address and subnet mask to restrict access to a range of IP addresses.
Use caution when configuring the system to restrict access to avoid locking out web UI access to all users! If locked out of the web UI, connect a terminal and keyboard to the system server to change this setting to allow web UI access again.
Disable Unused Network Connections
Unused network connections, whether in network interfaces such as a bridge, VLAN, link aggregate, interface aliases, or static routes. Left active in the system and if publicly accessible, these addresses present security vulnerabilities. Check share advanced options and share service configurations for invalid network addresses or connections to discontinued remote servers.
Allowed Domains and IP Addresses/Hosts
To increase network, consider configuring allowed domains on the Network > Global Configuration screen .
To increase share security, configure allowed host names or IP addresses for SMB shares or NFS shares .
Data Security
To keep data secure, TrueNAS provides dataset access controls, encryption, and the ability to lock/unlock datasets. Shares can configure share or filesystem access controls. Applications allow configuring access control on the storage volumes or host path datasets they use for container storage.
Configure Access Control Lists (ACLs)
TrueNAS provides both POSIX and NFSv4 access control protocols and applies them based on the dataset preset selected when creating the dataset. Advanced users can override the default ACL protocol applied through advanced dataset setting options to suit their security protocols or individual use cases.
Configure dataset access for owners, individual users, groups, or everyone. Set permissions to allow or deny read-only, read/write, or full control access. See Setting Up Permissions for more information.
SMB shares permit setting up permissions for just the share but not the dataset for the share, or for both the dataset and the share. See Windows Shares for more information on SMB shares, creating shares, and configuring settings including permissions.
NFS shares do not have the same setting options and rely on the dataset ACL settings. See NFS Shares for more information.
Apps installation wizards for apps in the enterprise and stable trains, and some community apps include the option to enable ACLs where you set the owner and permissions level by storage volume/dataset host path.
Configure Encryption
TrueNAS allows users to set encryption at the dataset level but does not recommend setting it at the pool level. Pool-level encryption forces encryption on all datasets created in the pool and can only use key encryption. Encrypting at the dataset level allows more granular control over encrypted versus unencrypted datasets, and allows setting the encryption type to either key or passphrase protection. Child datasets of encrypted datasets inherit encryption from the parent dataset. See Storage Encryption for more information on encrypting datasets.
Encrypted datasets allow users to lock them to prevent read or write access until users unlock them.
Data Transfer Security
TrueNAS allows encryption on data transfers made through cloud sync and replication tasks. This provides an additional encryption layer that works with or without dataset-level encryption.
See Encrypting Cloud Sync Tasks for more information on encrypting cloud sync tasks, or Adding Transfer Encryption for information on adding encryption to remote replication tasks.
Maintain SSH Connection Credentials
TrueNAS uses SSH connection credentials for cloud backup tasks, cloud sync tasks, rsync tasks, and replication tasks. Purge the list of SSH connections to backup servers no longer actively used to minimize security vulnerabilities through connections to the remote servers or services no longer used. Select out-of-date or inactive SSH connections, SSH Keypair, or cloud credentials to edit or delete them.
Updating TrueNAS Releases
TrueNAS provides a way to update to the latest releases from the UI. The main Dashboard and Software > Updates screen provide access to the latest releases for the currently installed release train selected in TrueNAS.
Alternatively, users can use an
Manage Boot Environments
To manage versions of TrueNAS releases, go to System > Boot to open the Boot Environments screen. Select the checkbox(es) for releases you want to delete from the list of inactive releases. Maintaining releases does not pose security risks but does consume space on the boot pool. See Boot Pool Management for more information on working with boot pool environments.
Virtualization
This document does not cover user-created virtual machine environments. The operating systems and applications you deploy in these VMs determine their STIG compliance.
Future STIG Compliance
TrueNAS does not comply with STIG GPOS SRG for the following findings scheduled for a future release:
Networking Recommendations
Follow these best practices for a stable and performant network.
The TrueNAS team welcomes contributions from members of the TrueNAS community!
Use the Feedback button on the right side or click Edit this Page at the top right of this page to suggest your own networking tips and tricks.
Static IP Address
By default, TrueNAS configures the primary network interface for Dynamic Host Configuration Protocol (DHCP) IP address management. Consider assigning a static IP address for increased network stability and communication between devices.
See Setting Up Static IPs for more information.
Interfaces
Use multiple network interfaces if possible for load balancing and redundancy. Configure link aggregation (LAGG) to combine multiple physical interfaces into a single logical interface.
See also Setting Up a Link Aggregation .
LACP
If supported by your network switch and other networking equipment in your environment, select Link Aggregation Control Protocol (LACP) to use the most common protocol for link aggregation interfaces based on IEEE specification 802.3ad . LACP dynamically aggregates multiple network interfaces into a single logical link, providing increased bandwidth and fault tolerance.
LACP allows you to bundle multiple physical network links into a single logical link, increasing the overall bandwidth available. This is especially beneficial in environments where high data transfer rates are required, such as when multiple users are accessing storage concurrently. LACP does not provide a performance benefit for single-user TrueNAS systems.
We do not recommend using LACP/LAGG for iSCSI traffic. See below for more information.
SMB Multichannel
Depending on the requirements of your intended use case, SMB Multichannel (L3+) can offer certain advantages over LACP (L2).
SMB Multichannel allows for dynamic load balancing at the application layer, enabling multiple connections to be established between a client and a server. This results in more efficient utilization of available network paths, especially in scenarios where the workload consists of multiple parallel data streams. In contrast, LACP operates at the link layer and aggregates physical links into a single logical link. While it provides load balancing, the granularity is typically based on source and destination IP addresses or MAC addresses, which may not distribute traffic as dynamically.
It is not best practice to enable both LACP and SMB Multichannel in conjunction. Consider your network requirements and select the more appropriate aggregation strategy.
SMB Multichannel allows for flexibility in adapting to varying bandwidth requirements of different applications or workloads. It can dynamically adjust the number of connections based on the available network resources and the demands of the data being transferred.
SMB Multichannel does not require specific switch configurations or support for link aggregation, making it potentially easier to deploy in environments where switch compatibility or configuration limitations exist. LACP, on the other hand, relies on switch support for link aggregation. While it is a standardized protocol, ensuring consistent switch compatibility and configuration can sometimes be more complex in diverse network environments.
SMB Multichannel is application-aware and can optimize connections based on the requirements of the specific application. This can lead to more efficient use of available network resources for applications that can benefit from parallel connections. LACP, being a lower-layer protocol, is less aware of the applications running over the network and may not optimize connections at the application layer to the same extent.
These advantages can be more pronounced at higher network speeds, such as in 100G environments (see below ).
See Setting Up SMB Multichannel for more information.
NFS Session Trunking
TrueNAS Enterprise
NFSv4.1 session trunking lets a Linux client use multiple TrueNAS IP addresses in a single NFS session. It balances I/O across interfaces without LACP, similar to MPIO for iSCSI.
Session trunking requires:
- TrueNAS 24.10 or later.
- A Linux client with kernel 5.17 or later.
- Each TrueNAS interface on its own subnet.
- An empty Bind IP Addresses setting on the NFS service screen so NFS listens on all addresses.
To enable trunking, mount the same export through each TrueNAS IP address with the
max_connectoption. The client detects that both addresses belong to the same server and distributes I/O across both connections.mount -t nfs -o vers=4.1,max_connect=2 <server-ip1>:/export /mnt/data mount -t nfs -o vers=4.1,max_connect=2 <server-ip2>:/export /mnt/data_trunkImportantDo not use
nconnectandmax_connecttogether. In testing, the combination distributed I/O unevenly across paths. Usemax_connectto balance traffic across multiple interfaces. Usenconnectto open multiple connections to a single interface.To keep the client connected during path loss or a controller failover, add the
hard,intr,timeo=200, andretrans=6options to the mount command.mount -t nfs -o vers=4.1,max_connect=2,hard,intr,timeo=200,retrans=6 <server-ip1>:/export /mnt/dataIf one path fails, the client continues on the remaining path. If both paths fail at the same time, such as during an HA failover, I/O pauses until the session re-establishes on the surviving controller. With these mount options, no data loss is expected. Enable spanning tree edge port (portfast) on switch ports connected directly to TrueNAS and client interfaces to shorten recovery after a link failure.
See Adding NFS Shares and the NFS service screen for more information. For other ways to combine interfaces, see LACP and SMB Multichannel .
NFS over RDMA
TrueNAS Enterprise
NFS over RDMA reduces CPU overhead and latency on systems with RDMA-capable network interface cards. To use it, select Enable NFS over RDMA on the NFS service screen , then add
proto=rdmato the client mount options. Session trunking works over RDMA. NFS over RDMA and NVMe-oF over RDMA can run at the same time on the same network adapters.mount -t nfs -o vers=4.1,max_connect=2,proto=rdma <server-ip1>:/export /mnt/data mount -t nfs -o vers=4.1,max_connect=2,proto=rdma <server-ip2>:/export /mnt/data_trunkConfigure the network switches for RDMA before you enable it:
- Enable jumbo frames on every switch port and interface in the path.
- Enable Priority Flow Control (PFC) on the RoCE priority, on all switch ports that carry RDMA traffic. This is typically CoS/priority 3 with DSCP 26.
- Place each TrueNAS interface and each client interface on its own VLAN with a local layer 3 gateway.
See Adding NFS Shares for more information.
Network Traffic Segmentation
Segregate network traffic using both layer 2 and layer 3 methods for improved efficiency and security. This helps optimize bandwidth, reduce congestion, and enhance overall network resilience against potential security threats.
Layer 2 Isolation
Use VLANs (Virtual Local Area Networks) to segment your network and isolate traffic. VLANs allow you to create logical segments within a physical network switch, even if devices in those segments are physically connected to the same switch.
VLANs provide logical segmentation, allowing different groups of devices to be in separate broadcast domains regardless of their physical location in the network. Devices in one VLAN do not see the broadcast traffic of devices in other VLANs, reducing broadcast domain size and improving network efficiency. VLANs provide flexibility in network design, providing enhanced isolation, access control, and scalability. They are often used to group devices based on functional roles or departments and optimize performance by prioritizing discrete traffic types on each VLAN.
See also Setting Up a Network VLAN .
Layer 3 Isolation
Use network layer (subnet) isolation to separate storage traffic from other network traffic to avoid congestion. If you have multiple subnets in your network, you can run the management UI and IPMI if included on your motherboard on one subnet and data on another.
Devices in different subnets cannot communicate directly without the use of a router or layer 3 switch. Each subnet has its own IP address range. Devices within the same subnet share the same network address and have unique host addresses.
Communication between devices in different subnets requires routing. Broadcast traffic is contained within the boundaries of a subnet. Devices in one subnet do not receive broadcasts from devices in other subnets without routing.
Separate subnets are commonly used for security and to manage IP address space efficiently. By placing the TrueNAS system on a separate subnet, you can isolate it from general internet traffic. This helps in reducing the attack surface and provides an additional layer of security.
Separating the TrueNAS system onto its own subnet allows for more granular control over bandwidth allocation You can prioritize or limit the bandwidth for traffic to and from the NAS, ensuring that it gets the necessary resources without being adversely affected by other network activities. Isolating the NAS on a dedicated subnet helps prevent scenarios where heavy internet traffic impacts the performance of the NAS. This is particularly important if the NAS is used for critical or time-sensitive operations. Implement Quality of Service policies to prioritize storage traffic over other non-essential traffic. This ensures that data transfers to and from the NAS receive the necessary priority and resources.
As your network grows, isolating the NAS onto its own subnet provides a scalable solution. It allows you to maintain control and security even as you add more devices and services to the network.
See Managing Interfaces .
iSCSI
iSCSI shares require specific networking considerations. iSCSI should be its own dedicated VLAN network to isolate it from other network traffic. This enhances security, reduces the risk of interference, and provides easier Quality of Service (QoS) management.
The failover feature on TrueNAS Enterprise platforms with High Availability (HA) can malfunction in network environments that heavily use the Spanning Tree Protocol (STP). When configuring or troubleshooting HA failover, if TrueNAS HA failover does not function properly, investigate STP use in the network and consider disabling STP on network switch ports connected to the TrueNAS platform.
Prioritize iSCSI traffic over other types of traffic on the network. This ensures that storage-related activities receive the necessary network resources for optimal performance.
Ensure consistent network configurations across all components involved in the iSCSI setup. Consistency helps in maintaining predictability and stability in the network environment.
For more information, see Block Shares (iSCSI) . See also Best Practices for Configuring Networking with Software iSCSI from VMware.
MPIO for iSCSI
Use multipath I/O (MPIO) to combine interfaces when using iSCSI. Do not use LAGG link aggregation.
MPIO is designed to improve the reliability and performance of data transfers by using multiple physical paths between the iSCSI initiator (client) and the iSCSI target (storage). MPIO can distribute I/O traffic across multiple paths, balancing the load and improving overall performance. If one path fails, MPIO can automatically switch to an alternate path, ensuring continuous access to the storage.
Both the iSCSI initiator and target must support MPIO for it to be effective. MPIO requires configuration on both the initiator and target sides. Each path needs to be properly identified and managed.
To configure multipath for iSCSI, go to the iSCSI screen and configure additional Portal IP addresses.
iSCSI and VMWare
Refer to the VMWare best practices guide for information on configuring multiple network adapters when using VMWare with your TrueNAS system.
Jumbo Frames
Enable jumbo frames on an iSCSI share to enhance storage performance through the transmission of larger data packets, reducing overhead and improving overall efficiency.
All network hardware, including switches and client systems, must support and enable jumbo frames to prevent fragmentation and performance degradation.
To enable jumbo frames, go to the Network screen and edit the parent interface(s). Set the MTU (Maximum Transmission Unit) to 9000. Click SAVE.
Restart the system and restart the iSCSI share to inherit.
ALUA
TrueNAS Enterprise
TrueNAS Enterprise High Availability (HA) systems should enable Asymmetric Logical Unit Access (ALUA) for iSCSI shares. ALUA and MPIO can be used at the same time.
ALUA allows a client computer to discover the best path to the storage on a TrueNAS® system. HA storage clusters can provide multiple paths to the same storage. For example, the disks are directly connected to the primary computer and provide high speed and bandwidth when accessed through that primary computer. The same disks are also available through the secondary computer, but because they are not directly connected to it, speed and bandwidth are restricted. With ALUA, clients automatically ask for and use the best path to the storage. If one of the TrueNAS® HA computers becomes inaccessible, the clients automatically switch to the next best alternate path to the storage. When a better path becomes available, as when the primary host becomes available again, the clients automatically switch back to that better path to the storage.
To enable ALUA, select Enable iSCSI ALUA from the Target Global Configuration tab on the iSCSI screen.
Enterprise customers should contact TrueNAS Enterprise Support to validate network design changes.
100 Gigabit Ethernet Design Considerations
In a 100G network environment, established best practices remain relevant, however close attention to detail becomes critical to achieve the expected performance of both single and multi-client deployment strategies. Configuration and infrastructure elements that may present minor inconveniences at lower speeds, can result in significant disruptions at 100 gigabytes.
Capacity and Bandwidth
Network backhaul must have sufficient capacity and bandwidth to handle the aggregate traffic generated by one or more 100G connections. This includes accommodating normal data transfer rates and potential bursts of high-speed data. The network should provide low latency and high throughput to ensure efficient data transmission.
Network Architecture
The overall network architecture and design play a significant role in supporting 100G networking. This includes considerations such as deploying appropriate routers, switches, and other networking equipment capable of handling high-speed data flows.
All components, such as optical transceivers, should be compatible. Consult your network switch manufacturer’s compatibility matrix to confirm.
Link Aggregation
The increased bandwidth capacity of a 100G network can result in enhanced performance. However, implementing Link Aggregation Control Protocol (LACP) on 100G switches, particularly with Multi-Chassis Link Aggregations (MLAGs) and additional layers of abstraction, can introduce added complexity. This can result in performance issues and requires more meticulous configuration.
Implementing SMB Multichannel in a 100G environment can contribute to more efficient utilization of the available resources and improved overall performance for file sharing and data access.
The ability of SMB Multichannel to establish multiple connections in parallel aligns well with the capabilities of a high-speed network. This parallelism can result in efficient use of the available bandwidth and improved performance, especially when dealing with large data sets. Optimized for Large Workloads:
In scenarios involving substantial data transfers, such as large file copies or data-intensive applications, SMB Multichannel in a 100G environment can help optimize connections and adapt to the high-speed networking capabilities, leading to improved responsiveness and reduced transfer times. While SMB Multichannel itself is not specific to a particular network speed, its benefits become more pronounced and impactful in environments with higher bandwidth capacities, such as those provided by 100G networks.
RDMA
At 100G and higher speeds, CPU overhead from network protocol processing can limit throughput. Remote Direct Memory Access (RDMA) reduces this overhead. See NFS over RDMA for NFS configuration.
Record Size Tuning
The increased bandwidth of 100G networks has the potential to expose performance bottlenecks that have limited impacts in 10G or even 40G environments. This means that optimization practices, such as record size tuning, can have a significant impact on network performance.
You should ensure that the record size for each dataset is in alignment with its I/O workload. To adjust record size, go to Advanced/Other Options on the Add or Edit Dataset screen.
For a detailed discussion of record size tuning, see Tuning Recordsize in OpenZFS from Klara.
Performance Testing
After completing the initial network configuration, you should obtain performance benchmarks and verify the configuration suits your use case.
Choose benchmark tests that closely resemble your real-world workload. Synthetic benchmarks may not give a full understanding of the performance characteristics of your system.
Disk Testing
While not strictly a networking concern, storage system disk benchmarking via fio (Flexible I/O tester) can help you evaluate if the system is optimally tuned for your intended use. For instance, systems that deal primarily with large files, such as data backup or media storage, benefit from a larger block size, while systems dealing primarily with small files, like documents or logs, prefer a smaller block size. Confirm that your local storage performance is functioning as intended before moving on to test network bandwidth.
Do not run fio tests with write or trim workloads against an active storage device.
See the fio documentation for all parameters and options.
Integrations
Integrations discusses how TrueNAS can work with different third-party applications to create unique or efficient storage management environments.
AWS Images (Obsolete)
This content is obsolete and is not functional for Amazon AMI creation. See Amazon’s Knowledge Center for guidance on creating custom Amazon Machine Images (AMIs) .
Asigra Plugin
Asigra provides a TrueNAS plugin to simplify cloud storage backups with their service. The Asigra plugin connects TrueNAS to a third-party service and is subject to licensing. TrueNAS must have a public static IP address for Asigra services to function. Please read the Asigra Software License Agreement before using this plugin.
Asigra also provides this installation guide for the Asigra Backup Plugin for TrueNAS .
To begin using Asigra services after installing the plugin, expand the plugin options and click Register. A new browser tab opens to register a user with Asigra .
Refer to the Asigra documentation for details about using the Asigra platform:
- DS-Operator Management Guide : Using the DS-Operator interface to manage the plugin DS-System service. Click Management in the plugin options to open the DS-Operator interface.
- DS-Client Installation Guide : How to install the DS-Client system. DS-Client aggregates backup content from endpoints and transmits it to the DS-System service.
- DS-Client Management Guide : Managing the DS-Client system after it has been successfully installed at one or more locations.
Containers
TrueNAS can be used as backing storage for container workloads.
The democratic-csi driver (available at https://github.com/democratic-csi/democratic-csi ) allows users to integrate popular container solutions like Kubernetes, Nomad, Cloud Foundry, or Mesos into the TrueNAS CLI. The driver is sponsored by and officially supported by TrueNAS for TrueNAS Enterprise Customers.
A CSI (Container Storage Interface) is an interface between container workloads and third-party storage that supports creating and configuring persistent storage external to the orchestrator, its input/output (I/O), and its advanced functionality such as snapshots and cloning.
The democratic-csi focuses on providing storage using iSCSI, NFS, and SMB protocols, and includes several ZFS features like snapshots, cloning, and resizing.
Features
- dynamically provisions/de-provision storage and shares it as appropriate for cluster usage
- online resize operations to dynamically expand volumes as needed
- cross-architecture (amd64, armv7, arm64)
Installation
There are 3 steps to integrating a container solution in TrueNAS:
- Prepare TrueNAS.
- Prepare the nodes (ie: your Kubernetes cluster nodes).
- Deploy your container orchestrator.
Prepare TrueNAS for a Container Solution
We recommend using TrueNAS 12.0-U2.1+. However, the driver typically works with previous versions too, but is unsupported. Before you start, log in to TrueNAS, go to Services, and make sure iSCSI, NFS, and SSH are enabled.
Create Pools
Go to Storage > Pools and create the pools to include in your container.
Set up SSH
Now you need to ensure that a supported shell is used by the user account that your container solution can use to SSH to TrueNAS. Go to Accounts > Users and set the desired user’s Shell to either bash or sh, then click SAVE.
Set up NFS
- Go to Services and click the next to NFS to edit its properties.
- Make sure Enable NFSv4, NFSv3 ownership model for NFSv4, and Allow non-root mount are checked, then click SAVE.
Set up iSCSI
- Go to Sharing > Block Shares (iSCSI).
- Use the default settings in the Target Global Configuration tab.
- In the Portals tab, click ADD, then create a *Description. Set the IP Address to 0.0.0.0 and the Port to 3260, then click SUBMIT.
- In the Initiators Groups tab, click ADD. For ease of use, check the Allow ALL Initiators, then click SAVE. You can make restrictions later using the Allowed Initiators (IQN) function.
- Kubernetes will create Targets and Extents automatically.
Prepare the Nodes
Install and configure the requirements for both NFS and iSCSI.
iSCSI
<div class="admonition note">
<div class="admonition-header"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 125.7-86.8 86.8c-10.3 10.3-17.5 23.1-21 37.2l-18.7 74.9c-2.3 9.2-1.8 18.8 1.3 27.5L64 512c-35.3 0-64-28.7-64-64L0 64zm384 64l-128 0L256 0 384 128zM549.8 235.7l14.4 14.4c15.6 15.6 15.6 40.9 0 56.6l-29.4 29.4-71-71 29.4-29.4c15.6-15.6 40.9-15.6 56.6 0zM311.9 417L441.1 287.8l71 71L382.9 487.9c-4.1 4.1-9.2 7-14.9 8.4l-60.1 15c-5.5 1.4-11.2-.2-15.2-4.2s-5.6-9.7-4.2-15.2l15-60.1c1.4-5.6 4.3-10.8 8.4-14.9z"/></svg>
<span>Note</span>
</div>
<div class="admonition-content">
<p>Multipath is supported for the <code>iscsi</code>-based drivers. Configure multipath with multiple portals in the configuration as needed.</p>
If you are running Kubernetes with rancher/rke, please see https://github.com/rancher/rke/issues/1846 .
SMB
When using Windows based machines, you might need to enable guest access, even if you are connecting with credentials.
Set-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters AllowInsecureGuestAuth -Value 1
Restart-Service LanmanWorkstation -Force
Deploy Your Orchestrator Into the Cluster
Kubernetes
Kubernetes is “an open-source system for automating deployment, scaling, and management of containerized applications.”
Deploy the Driver (Helm Installation)
helm repo add democratic-csi https://democratic-csi.github.io/charts/
helm repo update
# helm v2
helm search democratic-csi/
# helm v3
helm search repo democratic-csi/
# copy proper values file from https://github.com/democratic-csi/charts/tree/master/stable/democratic-csi/examples
# edit as appropriate
# examples are from helm v2, alter as appropriate for v3
# add --create-namespace for helm v3
helm upgrade \
--install \
--values freenas-iscsi.yaml \
--namespace democratic-csi \
zfs-iscsi democratic-csi/democratic-csi
helm upgrade \
--install \
--values freenas-nfs.yaml \
--namespace democratic-csi \
zfs-nfs democratic-csi/democratic-csi
Multiple Deployments
You can install multiple deployments of each or any driver. You will need:
- a new helm release name for each deployment
- a unique
csiDriver.namein the values file - a unique name for each storage class (per cluster)
- a unique parent dataset (don’t try to use the same parent across deployments or clusters)
Snapshot Support
Install beta (v1.17+) CRDs (once per cluster):
kubectl apply -f snapshot.storage.k8s.io_volumesnapshotclasses.yaml
kubectl apply -f snapshot.storage.k8s.io_volumesnapshotcontents.yaml
kubectl apply -f snapshot.storage.k8s.io_volumesnapshots.yaml
Install snapshot controller (once per cluster):
# replace namespace references to your liking
kubectl apply -f rbac-snapshot-controller.yaml
kubectl apply -f setup-snapshot-controller.yaml
Install democratic-csi as usual with volumeSnapshotClasses defined as appropriate.
- https://kubernetes.io/docs/concepts/storage/volume-snapshots/
- https://github.com/kubernetes-csi/external-snapshotter#usage
- Visit the Kubectl Cheat Sheet or this Kubernetes CSI guide for more Kubernetes deployment and configuration information.
Nomad
Nomad is a “simple and flexible workload orchestrator to deploy and manage containers and non-containerized applications across on-prem and clouds at scale.”
The democratic-csi works in Nomad with limited functionality and has to be deployed as a set of jobs. The controller job runs as a single instance, and the node job runs on every node and manages mounting the volume.
Read the Nomad Support page in the democratic-csi GitHub for detailed setup instructions. Visit the Nomad Storage Plugins page to learn how Nomad manages dynamic storage plugins.
Mesos
Mesos is an open source cluster manager that abstracts CPU, memory, storage, and other compute resources away from machines (physical or virtual), enabling fault-tolerant and elastic distributed systems to easily be built and run effectively.
Cloud Foundry
Cloud Foundry is an open source cloud platform as a service (PaaS) on which developers can build, deploy, run and scale applications.
As always, we welcome and encourage contributions from the community!
Additional Resources
CSI Driver
CSI Driver Overview
The TrueNAS CSI (Container Storage Interface) Driver is an official TrueNAS product that enables Kubernetes clusters to dynamically provision, manage, and consume storage from TrueNAS storage systems. The driver automatically creates storage volumes on-demand from Kubernetes, and leverages ZFS capabilities such as snapshots, clones, and compression in Kubernetes. The driver provides native Kubernetes integration via industry-standard CSI specifications.
The CSI driver supports snapshots, clones, ZFS compression (with no extra setup), and supports both file (NFS) and block (iSCSI) storage protocols. Standard Kubernetes uses K8s APIs and works with all K8s tooling. The CSI driver integration leverages TrueNAS investment in Kubernetes environments.
Storage administrators set up TrueNAS and the storage guardrails (StorageClasses), and thereafter developers can create the storage volumes they need through YAML files, bypassing the need to submit IT requests for the storage they need.
The CSI driver is ideal for:
- Stateful applications in Kubernetes, like databases (PostgreSQL, MySQL, MongoDB), content management systems, CI/CD build caches, and application persistence.
- DevOps and development, like development environments with persistent data, shared build artifacts, and testing environments
- Data-intensive workloads, like big data processing (Spark, Hadoop), ML/AI training data storage, media processing and transcoding
- Enterprise Kubernetes deployments, like multi-tenant Kubernetes clusters needing reliable storage, hybrid cloud deployments with on-premises storage, and edge computing with local TrueNAS systems.
The CSI driver is simple to use. Developer/users only need to create PVCs using the StorageClass cluster administrators setup, and the driver handles everything else.
CSI Driver Administrators Guide
Configuration Overview
This article is for Kubernetes cluster administrators who perform the one-time configuration of Kubernetes that consists of:
- Setting up each worker node that can use the CSI driver
- Deploying the TrueNAS CSI driver in Kubernetes
After receiving the authentication credentials from the TrueNAS administrator, they then establish communication with TrueNAS using the API authentication key provided by TrueNAS and the TrueNAS system IP address.
The TrueNAS administrator does the one-time setup that consists of:
- Creating an API key for Kubernetes authentication
- Setting up a pool to use for storage
- Turning on the appropriate service (nfs for file or iscsi for block storage requests)
- Supplying the Kubernetes administrator with the API and IP address of the TrueNAS system
Each Kubernetes cluster user (developer) creates a YAML file that specifies the volume size, access mode, StorageClass, etc., then submits this PVC request in Kubernetes using a kubectl command. TrueNAS receives the request, adds the requested volumes based on the StorageClass information received in the yaml file.
The CSI driver does the work of communicating what is received from Kubernetes, passes it to TrueNAS, and then sends information from TrueNAS back to Kubernetes where users can mount the storage volume(s) requested.
Prerequisites
Kubernetes Cluster Requirements
- Kubernetes Version 1.20 or higher
- Node OS Linux (Ubuntu, RHEL, Debian, etc.)
Required packages on Kubernetes nodes:
- For NFS:
nfs-common(Debian/Ubuntu) ornfs-utils(RHEL/CentOS) - For iSCSI:
open-iscsi(Debian/Ubuntu) oriscsi-initiator-utils(RHEL/CentOS)
- For NFS:
Privileges: Cluster admin access for installation
TrueNAS Requirements
TrueNAS SCALE 25.10.0 or later
Services enabled:
- NFS service (for NFS volumes)
- iSCSI service (for iSCSI volumes)
Network connectivity - Kubernetes nodes must reach TrueNAS IP
Storage pool - provide at least one ZFS pool with space available to meet user needs
API key with administrative privileges to authenticate Kubernetes connections
TrueNAS network requirements:
- TrueNAS WebSocket API Port 443 (HTTPS/WSS)
- NFS Port 2049 (TCP/UDP)
- iSCSI Port 3260 (TCP)
- Firewall that allows Kubernetes pod network CIDR to reach TrueNAS
Configuring TrueNAS
The CSI driver automatically creates datasets and NFS shares or iSCSI targets with UUID-based names, which are not human-readable. For example, a path like /mnt/Tank1/pvc-538b3b31-2619-4cda-837a-57a47c40e8df. Do not modify or delete these auto-created shares or targets.
Log in to TrueNAS:
Generate an API key for Kubernetes.
a. Click Settings on the top toolbar, then click My API Keys to open the User API Keys screen. b. Click Add, enter a name for the key, for example, Kubernetes or CSI driver. c. Click Save. d. Copy the key to a txt file or a document you keep secured, and backed up regularly.
Provide this to the Kubernetes cluster administrator, who should enter this key in Kubernetes along with the TrueNAS IP address to establish authenticated communication with TrueNAS.
For more information on TrueNAS API keys, see Managing API Keys .
To locate the IP address for TrueNAS, go to System > Network. The primary network interface is listed in the Interfaces card.
Enable the NFS service if using NFS, or enable the iSCSI service if using iSCSI.
a. Go to System > Services. b. Edit the service settings to provide the required port access. For the NFS service, set TCP port 2049, and set UDP port 2049. For iSCSI, set TCP port 3260. c. Click Save. d. Click the enable-service toggle to turn on the NFS and/or iSCSI services based on your use case. If you installed the nfs-common package on the Kubernetes worker nodes, enable the NFS service. If you installed the open-iscsi package on the Kubernetes worker nodes, enable the iSCSI service.
Create a new pool or locate a pool with enough storage to accommodate the Kubernetes cluster storage needs. Go to Storage Dashboard, identify a pool with enough storage capacity to suit your use case, or click Create Pool to add a new pool for Kubernetes volumes. For more information on creating new pools, see Creating Pools . To increase storage in an existing pool, see Expanding a Pool in Managing Pools .
Verify the WebSocket API port is set to port 443. Go to System > General Settings. The GUI card should show the Web Interface HTTPS port set to 443. If not, click Settings, locate the Web Interface HTTPS Port field and change the value to 443. Click Save after making a change.
Provide the pool name to the Kubernetes cluster administrator.
Verifying the Network Configuration
Check with your network administrator to verify the Kubernetes cluster can communicate with the TrueNAS server.
Configuring Kubernetes
First, download the container image and the deploy/truenas-csi-driver.yaml file found here:
If doing full OpenShift, you can fetch it from the Red Hat catalog.
Obtain the deploy/truenas-csi-driver.yaml file.
Download the raw YAML file from https://raw.githubusercontent.com/truenas/truenas-csi/master/deploy/truenas-csi-driver.yaml
Or fetch it directly using the following command:
curl -O https://raw.githubusercontent.com/truenas/truenas-csi/master/deploy/truenas-csi-driver.yaml
For standard Kubernetes, the user needs to edit deploy/truenas-csi-driver.yaml before deploying.
They update the ConfigMap with their TrueNAS connection details (URL, pool name, NFS server address, iSCSI portal) and the Secret with their API key.
Then kubectl apply -f deploy/truenas-csi-driver.yaml. which is covered in step 4 in the procedure below.
If using OpenShift, editing the YAML is not required. The user installs the operator from OperatorHub through the web console, then creates two small resources:
1. A Secret with their API key
2. A TrueNASCSI custom resource with their connection details (TrueNAS URL, pool name, etc.)
Both of those can be created through the OpenShift console UI or via oc apply. The operator handles all the deployment details.
After that, on either platform, the user creates StorageClass and PVC resources, but these are standard Kubernetes patterns, and not a driver-specific setup.
The procedure below covers adding the API key and TrueNAS IP address to Kubernetes to establish communication, editing the deploy/yaml file, adding required packages, deploying the CSI driver, and setting up StorageClasses.
Kubernetes automatically communicates with TrueNAS, making storage requests, driver calls to the TrueNAS API, and TrueNAS creates the resources. For more information on Kubernetes, refer to:
To deploy the CSI Driver, the Kubernetes cluster administrator does the following:
Install NFS packages on all nodes.
# Debian/Ubuntu sudo apt-get install -y nfs-common # RHEL/CentOS sudo yum install -y nfs-utilsInstall iSCSI packages on all nodes (if using iSCSI).
# Debian/Ubuntu sudo apt-get install -y open-iscsi sudo systemctl enable iscsid sudo systemctl start iscsid # RHEL/CentOS sudo yum install -y iscsi-initiator-utils sudo systemctl enable iscsid sudo systemctl start iscsidVerify kubectl access.
kubectl cluster-info kubectl get nodesConfigure the deployment manifest, by editing the
deploy/truenas-csi-driver.yaml.Update
ConfigMap(line ~160) in the YAML file:data: truenasURL: "wss://YOUR_TRUENAS_IP/api/current" truenasInsecure: "true" # Set to "false" for production with valid certs defaultPool: "YOUR_POOL_NAME" # e.g., "tank" nfsServer: "YOUR_TRUENAS_IP" iscsiPortal: "YOUR_TRUENAS_IP:3260" iscsiIQNBase: "iqn.2000-01.io.truenas" # Optional: customize IQN prefixUpdate
secret(line ~150) in the YAML file:stringData: api-key: "YOUR_TRUENAS_API_KEY"Update Image (line ~188, ~345):
image: ghcr.io/truenas/truenas-csi:latest # Or your registry path imagePullPolicy: IfNotPresentDeploy the CSI driver.
# Apply the manifest kubectl apply -f deploy/truenas-csi-driver.yaml # Wait for pods to be ready kubectl wait --for=condition=Ready pod -n truenas-csi -l app=truenas-csi-controller --timeout=120s kubectl wait --for=condition=Ready pod -n truenas-csi -l app=truenas-csi-node --timeout=120s # Verify deployment kubectl get pods -n truenas-csi kubectl get csidriver csi.truenas.ioVerify the driver started by checking controller logs for the startup message.
kubectl logs -n truenas-csi -l app=truenas-csi-controller -c csi-controller | head -5Create the StorageClasses for the package method used (NFS or iSCSI).
Create a test volume
# Create test PVC kubectl apply -f - <<EOF apiVersion: v1 kind: PersistentVolumeClaim metadata: name: test-volume namespace: default spec: accessModes: - ReadWriteMany storageClassName: truenas-nfs resources: requests: storage: 1Gi EOF # Wait for binding kubectl wait --for=jsonpath='{.status.phase}'=Bound pvc/test-volume --timeout=60s # Check status kubectl get pvc test-volumeIf PVC binds the installation is successful!
StorageClass Parameters
The following parameters are needed when configuring Kubernetes.
Common Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
protocol | string | nfs | Storage protocol: “nfs” or “iscsi” |
pool | string | (from ConfigMap) | ZFS pool name (overrides default) |
datasetPath | string | - | Relative path under pool for datasets (e.g., “k8s/volumes”) |
compression | string | lz4 | ZFS compression: lz4, gzip, zstd, off |
NFS and iSCSI Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
sync | string | standard | ZFS sync: standard, always, disabled |
nfs.hosts | string | - | Comma-separated allowed hosts |
nfs.networks | string | - | Comma-separated allowed networks (CIDR) |
nfs.mapAllUser | string | root | User for NFS mapall (controls file ownership) |
nfs.mapAllGroup | string | wheel | Group for NFS mapall (controls file ownership) |
Example:
parameters:
protocol: "nfs"
pool: "tank"
compression: "lz4"
sync: "standard"
nfs.networks: "10.0.0.0/8,192.168.0.0/16"
| Parameter | Type | Default | Description |
|---|---|---|---|
volblocksize | string | 16K | ZVOL block size: 4K, 8K, 16K, 32K, 64K, 128K |
sparse | string | false | Use sparse (thin-provisioned) ZVOLs |
iscsi.blocksize | string | 512 | iSCSI extent logical block size |
iscsi.iqn-base | string | (from ConfigMap) | Custom IQN prefix per StorageClass |
Example:
parameters:
protocol: "iscsi"
pool: "ssd-pool"
compression: "lz4"
volblocksize: "8K"
iscsi.blocksize: "512"
StorageClass Design Patterns
ReclaimPolicy Explained
Delete (default):
- When PVC is deleted, PV and backend storage are automatically deleted
- Use for: Temporary data, dev/test environments
- Risk: Accidental PVC deletion causes data loss
Retain:
- When PVC is deleted, PV and backend storage are kept
- Admin must manually delete resources
- Use for: Production databases, important data
- Safety: Prevents accidental data loss
Example:
reclaimPolicy: Retain # Safe for production
reclaimPolicy: Delete # Convenient for dev/test
Advanced ZFS Properties
Set advanced ZFS properties via StorageClass:
Any parameter prefixed with zfs. is set as a ZFS property:
parameters:
protocol: "nfs"
pool: "tank"
zfs.recordsize: "128K" # Sets recordsize property
zfs.atime: "off" # Disables access time updates
zfs.dedup: "on" # Enables deduplication (use cautiously!)
Custom ZFS Properties
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: truenas-custom
provisioner: csi.truenas.io
parameters:
protocol: "nfs"
pool: "tank"
compression: "lz4"
zfs.recordsize: "1M" # Large recordsize for large files
zfs.atime: "off" # Better performance (no access time updates)
zfs.redundant_metadata: "most" # Balance between performance and safety
zfs.xattr: "sa" # System attribute-based extended attributes
Common ZFS Properties Descriptions
recordsize: Suggested block size (4K-1M) - affects performanceatime: Access time updates (on/off) - disable for performancededup: Deduplication (on/off) - requires lots of RAMsync: Write behavior (standard/always/disabled)redundant_metadata: Metadata redundancy level
Warning: Some properties (like dedup) can significantly impact TrueNAS performance. Consult ZFS documentation and test before using in production.
CSI Driver User Guide
This guide is for developers/users using a Kubernetes cluster that want to use the TrueNAS CSI driver to create and submit requests for storage to use in pods. It covers creating PersistentVolumeClaims, mounting storage volumes, and using the features available to TrueNAS storage users.
For an overview of the Kubernetes/CSI driver integration see TrueNAS CSI Driver
For reference material including a glossary of terms, see CSI Driver Reference
Kubernetes Cluster Administrators Guide
provides instructions on configuring StorageClasses and the Kubernetes integration with the CSI driver.
The process involves creating a yaml file stored locally, and then submitting it to create the PVC using kubectl commands.
The Kubernetes uses the CSI driver to send the information from Kubernetes to TrueNAS. TrueNAS creates the storage volume based on the information in the PVC yaml file, and sends this back to Kubernetes through the CSI driver, where it can be mounted and used in a pod.
Using the CSI Driver
Developers/users should follow this process to set up storage they can mount in their Kubernetes pods.
Replace my-app-data with the name of your PVC in the commands in this section.
- Create a PersistentVolumeClaim.
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: my-app-data
namespace: default
spec:
accessModes:
- ReadWriteMany # For NFS (multiple pods can access)
storageClassName: truenas-nfs
resources:
requests:
storage: 10Gi # Request 10GB of storage
- Apply the PersistentVolumeClaim.
kubectl apply -f my-app-data.yaml
Where my-app-data is the name of the yaml file (and PVC) created locally by the developer/user.
- Check the PVC status.
kubectl get pvc my-app-data
Using a Volume in a Pod
apiVersion: v1
kind: Pod
metadata:
name: my-app
namespace: default
spec:
containers:
- name: app
image: nginx
volumeMounts:
- name: data
mountPath: /usr/share/nginx/html # Where to mount in container
volumes:
- name: data
persistentVolumeClaim:
claimName: my-app-data # Reference the PVC
Then to apply a volume in a pod:
kubectl apply -f pod.yaml
Verifying a Volume is Mounted
These commands check if a pod is running, verify a mount inside a container, and then write test data to and read it back from the container.
# Check pod is running
kubectl get pod my-app
# Verify mount inside container
kubectl exec my-app -- df -h /usr/share/nginx/html
# Write test data
kubectl exec my-app -- sh -c "echo 'Hello from TrueNAS' > /usr/share/nginx/html/index.html"
# Read it back
kubectl exec my-app -- cat /usr/share/nginx/html/index.html
Expanding a Volume
Check the current size. The CAPACITY shows current size.
kubectl get pvc my-app-dataEdit a PVC to request a larger size. Change the storage size, then save and exit.
kubectl edit pvc my-app-data # Change: resources: requests: storage: 10Gi # To: resources: requests: storage: 20Gi # Save and exitAlternatively, use kubectl patch:
kubectl patch pvc my-app-data -p '{"spec":{"resources":{"requests":{"storage":"20Gi"}}}}'Wait for the expansion. Watch the CAPACITY column increase in size.
kubectl get pvc my-app-data -w # Watch CAPACITY column increase to 20GiNote: For iSCSI volumes, you might need to restart the pod for the filesystem resize to take effect.
Creating a Snapshot
Create a VolumeSnapshot, and then apply it.
apiVersion: snapshot.storage.k8s.io/v1 kind: VolumeSnapshot metadata: name: my-app-snapshot-20250102 namespace: default spec: volumeSnapshotClassName: truenas-snapshot-class source: persistentVolumeClaimName: my-app-dataApply it:
kubectl apply -f snapshot.yamlVerify the snapshot.
kubectl get volumesnapshot my-app-snapshot-20250102Check in TrueNAS.
Navigate to Datasets, locate and select the dataset on the table, then click View Snapshots on the Data Protection card to open the Snapshots screen. Search for the snapshot. The snapshot name format is
pool/dataset@snapshot-name
Restoring from Snapshot
You can restore from a snapshot by creating a new volume from a snapshot, or cloning an existing volume.
Create New Volume from Snapshot
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: my-app-restore
namespace: default
spec:
accessModes:
- ReadWriteMany
storageClassName: truenas-nfs
resources:
requests:
storage: 10Gi
dataSource:
name: my-app-snapshot-20250102
kind: VolumeSnapshot
apiGroup: snapshot.storage.k8s.io
Apply it:
kubectl apply -f restore-pvc.yaml
kubectl wait --for=jsonpath='{.status.phase}'=Bound pvc/my-app-restore --timeout=120s
Result: New volume with data from snapshot
Cloning an Existing Volume
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: my-app-clone
namespace: default
spec:
accessModes:
- ReadWriteMany
storageClassName: truenas-nfs
resources:
requests:
storage: 10Gi
dataSource:
name: my-app-data # Source PVC to clone
kind: PersistentVolumeClaim
Apply it:
kubectl apply -f clone-pvc.yaml
kubectl wait --for=jsonpath='{.status.phase}'=Bound pvc/my-app-clone --timeout=120s
Result: New independent volume with copy of source data
Advanced Features
The TrueNAS CSI driver supports advanced storage operations including snapshot-based backup and restore, volume cloning, and multi-protocol deployments. These features are available to all cluster users with the appropriate StorageClass configured by the cluster administrator.
Creating Volume Snapshots for Backup and Restore
The following is a backup workflow:
Create Pre-Upgrade Snapshot.
kubectl apply -f - <<EOF apiVersion: snapshot.storage.k8s.io/v1 kind: VolumeSnapshot metadata: name: db-before-upgrade namespace: production spec: volumeSnapshotClassName: truenas-snapshot-class source: persistentVolumeClaimName: postgres-data EOFPerform Application Upgrade.
kubectl set image deployment/postgres postgres=postgres:15Restore if upgrade fails. Stop the application and then create a new volume from a snapshot. Next update the deployment to use the restored volume and then restart the application.
# Stop the application kubectl scale deployment postgres --replicas=0 # Create new volume from snapshot kubectl apply -f - <<EOF apiVersion: v1 kind: PersistentVolumeClaim metadata: name: postgres-data-restored namespace: production spec: accessModes: [ReadWriteOnce] storageClassName: truenas-iscsi resources: requests: storage: 100Gi dataSource: name: db-before-upgrade kind: VolumeSnapshot apiGroup: snapshot.storage.k8s.io EOF # Update deployment to use restored volume kubectl set volume deployment/postgres --add --name=data --claim-name=postgres-data-restored # Restart application kubectl scale deployment postgres --replicas=1
Volume Cloning for Environments
Volume cloning creates an instant copy of an existing volume using ZFS copy-on-write, making it ideal for spinning up staging or test environments with real production data.
Cloning Production Data to Staging
Benefits:
- Instant copy via ZFS clones
- Minimal storage overhead (copy-on-write)
- Staging has real production data for testing
- No impact on production volume
# Clone production volume
kubectl apply -f - <<EOF
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: app-data-staging
namespace: staging
spec:
accessModes: [ReadWriteMany]
storageClassName: truenas-nfs
resources:
requests:
storage: 50Gi
dataSource:
name: app-data-prod
kind: PersistentVolumeClaim
EOF
Multi-Protocol Deployments
Some applications benefit from using both protocols. Example content management system:
# Media files - NFS for shared access
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: cms-media
spec:
accessModes: [ReadWriteMany]
storageClassName: truenas-nfs
resources:
requests:
storage: 100Gi
---
# Database - iSCSI for performance
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: cms-database
spec:
accessModes: [ReadWriteOnce]
storageClassName: truenas-iscsi
resources:
requests:
storage: 20Gi
CSI Driver Reference
This article provides general reference information about the CSI Driver, a deployment checklist, capacity planning, troubleshooting and diagnostic commands for resolving issues between Kubernetes and the CSI driver, workflows for NFS and iSCSI deployments of the CSI driver integration with Kubernetes, best practices, a glossary of terms, as well as upgrade and suggested deployment options.
This article provides information that is not included in the administration and user guide articles.
Kubernetes Fundamentals
Kubernetes is an open-source container orchestration platform that automates deployment, scaling, and management of containerized applications.
The following are important terms and foundational to how the CSI driver works with Kubernetes:
Pod - A pod is the smallest deployable unit in Kubernetes. It contains one or more containers. Because pods can be created and destroyed frequently, they need persistent storage to retain data beyond their lifecycle.
Persistent Volume - A persistent volume is a piece of storage in the cluster, provisioned by the Kubernetes administrator or can be dynamically provisioned via storage classes (StorageClass). It exists independently of pods, and has a lifecycle independent of any pod that uses it.
PersistentVolumeClaims (PVC) - A persistent volume claim (PVC) is a request for storage by a user or application. It specifies size, access mode, and storage class. Kubernetes finds or creates a matching PV. It acts like a ticket that entitles a pod to use storage. Think of it like this:
PV = a physical parking space PVC = a parking ticket requesting a space Pod = a car that parks in the space
StorageClass - A StorageClass defines classes of storage with different properties. They enable dynamic provisioning, specifying which provisioner to use (for example, TrueNAS CSI Driver), and contains parameters for that provisioner (pool name, compression, etc.).
Container Storage Interface (CSI) - A container storage interface (CSI) is an industry standard for storage plugins in Kubernetes. It enables storage vendors to write one plugin that works everywhere, and separates storage logic from Kubernetes core. The TrueNAS CSI driver implements this standard.
How it works
A user creates a PVC requesting storage (creates a YAML file specifying volume size, access mode, StorageClass, etc.).
Kubernetes calls the CSI driver CreateVolume function (executes the kubectl apply -f filename.yaml command)
The CSI driver creates storage on the backend (TrueNAS creates the volume per request in YAML file), and then returns volume information to Kubernetes.
Kubernetes then creates a PV and binds it to a PVC.
A pod can now mount and use the volume.
Best Practices
Before deploying the CSI driver integration, review the following best practices sections to assist with planning the implementation in Kubernetes.
Deployment Best Practices
Use Dedicated Namespace
- Deploy driver in
truenas-csinamespace (notdefaultorkube-system) - Isolates driver from application workloads
- Deploy driver in
Resource Limits
- Set memory and CPU limits on driver pods
- Prevents resource exhaustion
- Recommended: 128Mi-256Mi RAM, 100m-200m CPU per container
High Availability
- Controller uses leader election (supports multiple replicas)
- For HA: Set
replicas: 3in controller deployment - Node driver runs on all nodes automatically (DaemonSet)
Security
- Use a strong TrueNAS API key
- Rotate API keys periodically
- Enable TLS verification in production (
truenasInsecure: "false") - Restrict the NFS networks parameter to the cluster pod CIDR
Storage Management Best Practices
Pool Planning
- Use separate pools for different performance tiers
- Monitor pool capacity
- Set up TrueNAS alerts for pool >80% full
Naming Conventions
- Use descriptive StorageClass names (e.g.,
fast-ssd,archive-hdd) - PVC names should indicate application and purpose
- Snapshot names should include date/time
- Use descriptive StorageClass names (e.g.,
Quota Management
- Set realistic default sizes in StatefulSet templates
- Monitor actual usage
- Use volume expansion when needed (don’t over-provision initially)
*Compression Strategy
lz4(default) - Good balance of speed and compressionoff- For pre-compressed data (videos, images, archives)gziporzstd- Higher compression for archives, backups- Test with your data to determine the best setting
Application Usage Best Practices
StatefulSets for Databases
apiVersion: apps/v1 kind: StatefulSet metadata: name: postgres spec: serviceName: postgres replicas: 3 volumeClaimTemplates: # Automatic PVC per replica - metadata: name: data spec: accessModes: [ReadWriteOnce] storageClassName: truenas-iscsi resources: requests: storage: 50GiShared Storage for Multi-Pod Apps
# One PVC, multiple pods (NFS only) apiVersion: v1 kind: PersistentVolumeClaim metadata: name: shared-uploads spec: accessModes: [ReadWriteMany] storageClassName: truenas-nfs resources: requests: storage: 100Gi --- # Multiple pods reference same PVC apiVersion: apps/v1 kind: Deployment metadata: name: web-app spec: replicas: 5 # All 5 pods share same storage template: spec: volumes: - name: uploads persistentVolumeClaim: claimName: shared-uploadsBackup Strategy
- Create a VolumeSnapshotClass before using snapshot features:
apiVersion: snapshot.storage.k8s.io/v1 kind: VolumeSnapshotClass metadata: name: truenas-snapshot-class driver: csi.truenas.io deletionPolicy: Delete - Daily snapshots via CronJob
- Export snapshots to an external backup system
- Test restore procedures regularly
apiVersion: batch/v1 kind: CronJob metadata: name: daily-snapshot spec: schedule: "0 2 * * *" # 2 AM daily jobTemplate: spec: template: spec: serviceAccountName: snapshot-creator containers: - name: create-snapshot image: bitnami/kubectl command: - /bin/sh - -c - | kubectl apply -f - <<EOF apiVersion: snapshot.storage.k8s.io/v1 kind: VolumeSnapshot metadata: name: db-snapshot-$(date +%Y%m%d) namespace: production spec: volumeSnapshotClassName: truenas-snapshot-class source: persistentVolumeClaimName: postgres-data EOF restartPolicy: OnFailure- Create a VolumeSnapshotClass before using snapshot features:
Performance Optimization Best Practices
Choose the Right Protocol
- NFS: Shared file access, ease of use, cross-platform
- iSCSI: Better performance for databases, single-node access
Tune ZFS Properties
recordsize: Match application I/O patterns- Database: 8K-16K
- Large files: 128K-1M
sync: Adjust based on durability vs performance needsstandard: Good balance (default)always: Maximum durability, slower writesdisabled: Faster, risk of data loss on crash
Volume Block Size (iSCSI)
volblocksize: Must match application needs- Cannot be changed after creation
- Default 16K is good for most uses
- Database: Match DB page size (8K for PostgreSQL)
Network Optimization
- Use a dedicated network for storage traffic (if possible)
- 10GbE recommended for high throughput
- MTU 9000 (jumbo frames) for better performance
Production Deployment Checklist
Pre-Deployment:
- TrueNAS system properly sized for workload
- Network connectivity tested from all K8s nodes to TrueNAS
- API key generated with strong security
- Pool created with appropriate RAID level
- NFS/iSCSI services tested manually
- Backup strategy for TrueNAS configuration
Deployment:
- Use production-grade container registry
- Tag images with version numbers (not
:latest) - Set
truenasInsecure: "false"(validate TLS certificates) - Configure resource limits on driver pods
- Enable leader election for controller HA
- Deploy to dedicated namespace
Post-Deployment:
- Monitor driver logs for errors
- Create test volume and verify in TrueNAS
- Set up alerting for driver pod failures
- Document StorageClasses for users
- Train users on PVC creation
- Establish snapshot/backup schedules
Capacity Planning
TrueNAS Side
- Reserve 20% pool space for snapshots and overhead
- Monitor pool space usage
- Set up TrueNAS alerts for capacity thresholds
Kubernetes Side
- Use ResourceQuotas to limit PVC sizes per namespace
apiVersion: v1 kind: ResourceQuota metadata: name: storage-quota namespace: dev spec: hard: requests.storage: 1Ti # Max 1TB total storage in namespace persistentvolumeclaims: "50" # Max 50 PVCs
Troubleshooting
This section provides troubleshooting for common issues, and offers solutions to resolve them.
“Pool name is required but not configured”
Cause: Pool name is empty or not set
Solution:
- Check ConfigMap has
defaultPoolset - OR ensure StorageClass has
poolparameter - Verify pool name is correct and exists in TrueNAS
# Check ConfigMap
kubectl get configmap truenas-csi-config -n truenas-csi -o yaml
# Update if needed
kubectl patch configmap truenas-csi-config -n truenas-csi -p '{"data":{"defaultPool":"tank"}}'
kubectl rollout restart deployment truenas-csi-controller -n truenas-csi
“Authentication failed: credentials were rejected by TrueNAS”
Cause: Invalid or expired API key
Solution:
Generate new API key in TrueNAS (Settings → API Keys)
Update Kubernetes secret:
kubectl create secret generic truenas-api-credentials \ --from-literal=api-key='NEW_KEY_HERE' \ --namespace=truenas-csi \ --dry-run=client -o yaml | kubectl apply -f -Restart controller:
kubectl rollout restart deployment truenas-csi-controller -n truenas-csi
“Please provide a valid dataset name according to ZFS standards”
Cause: Dataset name starts with / or contains invalid characters
Solution: This is fixed in v1.0.0. If using an older version, upgrade to the latest driver.
Connection Timeout to TrueNAS
Cause: Network connectivity issue
Diagnosis:
# Test from a pod
kubectl run nettest --image=busybox --rm -it --restart=Never -- ping -c 3 TRUENAS_IP
# Test WebSocket port
kubectl run wstest --image=curlimages/curl --rm -it --restart=Never -- \
curl -k -I https://TRUENAS_IP/api/current
Solution:
- Check firewall rules on TrueNAS
- Check Kubernetes network policies
- Verify TrueNAS is reachable from pod network (not just host network)
- For Docker/kind: Add iptables rule to allow pod traffic
NFS Mount Fails with “Permission Denied”
Cause: NFS export doesn’t allow access from Kubernetes nodes
Solution:
Check NFS share in TrueNAS UI
Verify “Authorized Networks” includes Kubernetes pod CIDR
Update StorageClass to set network restriction:
parameters: nfs.networks: "10.244.0.0/16" # Your pod CIDR
iSCSI: “No iSCSI session found”
Cause: iscsid not running on nodes or login failed
Diagnosis:
# Check if iscsid is running
kubectl exec -n truenas-csi <node-pod> -c csi-node -- ps aux | grep iscsid
# Check node logs
kubectl logs -n truenas-csi <node-pod> -c csi-node
Solution:
- Ensure
open-iscsipackage is installed on all nodes - Ensure iscsid service is enabled and started
- Check iSCSI portal is reachable on port 3260
Volume Expansion Stuck
Cause: StorageClass doesn’t allow expansion
Check:
kubectl get storageclass truenas-nfs -o jsonpath='{.allowVolumeExpansion}'
# Should return: true
Solution:
kubectl patch storageclass truenas-nfs -p '{"allowVolumeExpansion":true}'
Diagnostic Commands
This section provides diagnostic commands to resolve issues in the areas specified.
Check Driver Health
# All driver pods running?
kubectl get pods -n truenas-csi
# Controller healthy?
kubectl get pod -n truenas-csi -l app=truenas-csi-controller -o jsonpath='{.items[0].status.conditions[?(@.type=="Ready")].status}'
# Should return: True
# Check authentication
kubectl logs -n truenas-csi -l app=truenas-csi-controller -c csi-controller | grep -i "auth\|pool"
Check Volume Status
# List all PVCs
kubectl get pvc --all-namespaces
# Check specific PVC
kubectl describe pvc <name> -n <namespace>
# Check corresponding PV
PV=$(kubectl get pvc <name> -n <namespace> -o jsonpath='{.spec.volumeName}')
kubectl describe pv $PV
# Check in TrueNAS (via logs)
kubectl logs -n truenas-csi -l app=truenas-csi-controller -c csi-controller | grep -i "CreateVolume"
Check Network Connectivity
# From a pod
kubectl run nettest --image=busybox --rm -it --restart=Never -- \
sh -c "ping -c 3 TRUENAS_IP && nc -zv TRUENAS_IP 443 && nc -zv TRUENAS_IP 3260"
Monitoring and Alerting
Monitoring the CSI driver integration requires watching both the Kubernetes cluster and TrueNAS. Kubernetes tracks driver health and storage operations, while TrueNAS monitors pool capacity and service availability.
For information on alerts in Kubernetes and TrueNAS see:
- Kubernetes
- TrueNAS Alert articles:
Metrics to Monitor
- Driver pod health and restarts
- PVC binding success rate
- Volume creation time
- TrueNAS pool capacity
- Network latency between K8s and TrueNAS
- iSCSI session health (for iSCSI volumes)
Recommended Alerts
- Driver pod not running
- PVC stuck in Pending > 5 minutes
- TrueNAS pool > 80% full
- Authentication failures
- Volume creation failures
API References
CSI Standard Methods Implemented
Identity Service
GetPluginInfo- Returns driver name and versionGetPluginCapabilities- Returns capabilities (CONTROLLER_SERVICE, VOLUME_ACCESSIBILITY_CONSTRAINTS)Probe- Health check endpoint
Controller Service
CreateVolume- Creates dataset/ZVOL and shares on TrueNASDeleteVolume- Removes dataset/ZVOL and associated resourcesControllerPublishVolume- Returns volume connection info (NFS path or iSCSI IQN)ControllerUnpublishVolume- Cleanup on detachValidateVolumeCapabilities- Validates requested capabilitiesListVolumes- Lists all volumes managed by driverGetCapacity- Returns available space in poolControllerExpandVolume- Expands volume sizeCreateSnapshot- Creates ZFS snapshotDeleteSnapshot- Deletes ZFS snapshotListSnapshots- Lists snapshots for a volume
Node Service
NodeStageVolume- Discovers and logs into iSCSI targetsNodeUnstageVolume- Logs out of iSCSI targetsNodePublishVolume- Mounts volume into pod directoryNodeUnpublishVolume- Unmounts volume from pod directoryNodeGetCapabilities- Returns node capabilitiesNodeGetInfo- Returns node ID and topology infoNodeGetVolumeStats- Returns volume usage statistics
TrueNAS API Methods Used
Dataset Management
pool.dataset.create- Create ZFS dataset or ZVOLpool.dataset.get_instance- Get dataset detailspool.dataset.update- Update dataset properties (for expansion)pool.dataset.delete- Delete dataset
NFS Share Management
sharing.nfs.create- Create NFS sharesharing.nfs.query- Query NFS sharessharing.nfs.delete- Delete NFS share
iSCSI Management
iscsi.target.create- Create iSCSI targetiscsi.extent.create- Create extent (links to ZVOL)iscsi.targetextent.create- Associate target with extentiscsi.target.delete- Delete target (and associations)iscsi.extent.delete- Delete extent
Snapshot Management
pool.snapshot.create- Create ZFS snapshotpool.snapshot.delete- Delete snapshotpool.snapshot.clone- Clone dataset from snapshotpool.snapshot.query- List snapshots
Pool Management
pool.query- Query pool information (for capacity reporting)
CSI Driver and Kubernetes Architecture Diagrams
High-Level Component Interaction
┌────────────────────────────────────────────────────────────┐
│ Developer/User │
│ │ │
│ │ kubectl apply -f pvc.yaml │
│ ▼ │
│ ┌──────────────────────┐ │
│ │ Kubernetes API │ │
│ │ (PVC Created) │ │
│ └──────────┬───────────┘ │
│ │ │
│ ┌────────────────┴────────────────┐ │
│ │ PVC stored in etcd │ │
│ └────────────────┬────────────────┘ │
│ │ │
│ │ Watch for new PVCs │
│ ▼ │
│ ┌──────────────────────┐ │
│ │ CSI Provisioner │ │
│ │ (Sidecar) │ │
│ └──────────┬───────────┘ │
│ │ │
│ │ gRPC: CreateVolume() │
│ ▼ │
│ ┌──────────────────────┐ │
│ │ TrueNAS CSI Driver │ │
│ │ (Controller) │ │
│ └──────────┬───────────┘ │
│ │ WebSocket API │
│ │ (wss://truenas/api/current) │
└─────────────────────────┼──────────────────────────────────┘
│
▼
┌──────────────────────┐
│ TrueNAS Middleware │
│ (API Server) │
└──────────┬───────────┘
│ Creates resources:
│ • pool.dataset.create
│ • sharing.nfs.create
▼
┌──────────────────────┐
│ ZFS Storage │
│ • Datasets created │
│ • Shares configured │
└──────────────────────┘
NFS Volume Mount Flow
Pod Scheduled Pod → Node (Kubernetes scheduler assigns pod to node)
Kubelet Calls CSI Node Plugin Kubelet → NodePublishVolume(volumeId, targetPath)
CSI Node Plugin Mounts NFS Node Plugin executes:
mount -t nfs TRUENAS_IP:/mnt/pool/dataset /var/lib/kubelet/pods/.../volumes/.../mountBind Mount to Pod /var/lib/kubelet/pods/…/volumes/…/mount → bind mounted to /var/lib/kubelet/pods/…/volumes/…/data
Container Starts Container sees volume at /data (or specified mountPath)
iSCSI Volume Mount Flow
Pod Scheduled Pod → Node
CSI Attacher Creates VolumeAttachment Attacher → ControllerPublishVolume(volumeId, nodeId) Driver returns: targetPortal, targetIQN, LUN
Kubelet Calls NodeStageVolume Node Plugin: a. Discover iSCSI target
iscsiadm -m discovery -t sendtargets -p TRUENAS_IP:3260b. Log in to iSCSI target
iscsiadm -m node -T <IQN> -p TRUENAS_IP:3260 --loginc. Wait for block device /dev/sdX appears
d. Create filesystem if needed mkfs.ext4 /dev/sdX
e. Mount to staging path mount /dev/sdX /var/lib/kubelet/plugins/…/globalmount
Kubelet Calls NodePublishVolume Bind mount staging path to pod volume path
Container Starts Container sees volume at /data
Integration with Prometheus
The TrueNAS CSI driver does not currently expose a Prometheus metrics endpoint. The example below is provided for future reference when metrics support is added.
# ServiceMonitor for driver metrics (if driver exposes metrics)
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: truenas-csi-metrics
namespace: truenas-csi
spec:
selector:
matchLabels:
app: truenas-csi-controller
endpoints:
- port: metrics
Backup and Disaster Recovery
Volume Snapshots:
- Create daily snapshots via CronJob.
- Retain seven daily, four weekly snapshots.
- Document restore procedures.
TrueNAS Snapshots:
- Use TrueNAS snapshot tasks as an additional backup layer.
- Replicate to a secondary TrueNAS system.
Metadata Backup: Export PVC/PV definitions regularly.
kubectl get pvc --all-namespaces -o yaml > pvc-backup.yaml
kubectl get pv -o yaml > pv-backup.yaml
Upgrade Strategy
Driver Upgrade:
- Test new version in dev/staging cluster.
- Create snapshots of critical volumes.
- Update driver image in deployment.
- Rolling update automatically replaces pods.
- Verify existing volumes are still accessible.
- Test creating new volumes.
TrueNAS Upgrade:
- Check the CSI driver compatibility with a new TrueNAS version.
- Perform TrueNAS upgrade during maintenance window.
- Verify API connectivity post-upgrade.
- Test volume operations.
Kubernetes Upgrade:
- Check CSI specification compatibility.
- Might need to update sidecar container versions.
- Test in staging first.
Glossary
For definitions of Kubernetes terms (Pod, Persistent Volume, PersistentVolumeClaim, StorageClass, Container Storage Interface), see Kubernetes Fundamentals .
ZFS: Advanced filesystem with features like snapshots, clones, compression, and data integrity.
ZVOL: ZFS Volume - a block device created from a ZFS pool.
Dataset: ZFS filesystem entity that can store files or act as a volume.
NFS (Network File System): Protocol for sharing files over a network.
iSCSI (Internet Small Computer Systems Interface): Protocol for block-level storage over a network.
IQN (iSCSI Qualified Name): Unique identifier for iSCSI targets.
LUN (Logical Unit Number): Identifier for iSCSI storage units.
Extent: iSCSI term for the actual storage backing an iSCSI target.
WebSocket: Communication protocol for persistent, bi-directional connection.
Snapshot: Read-only point-in-time copy of data (instant with ZFS).
Clone: Writable copy of data created from a snapshot.
Copy-on-Write (CoW): ZFS technique where clones share data with the source until modified.
Appendix A: Sample Deployment for Common Applications
Appendix B: Network Requirements Reference
| Service | Protocol | Port | Source | Destination | Purpose |
|---|---|---|---|---|---|
| TrueNAS API | TCP | 443 | K8s Pods | TrueNAS | WebSocket management API |
| NFS | TCP/UDP | 2049 | K8s Nodes | TrueNAS | Mount NFS shares |
| RPC Bind | TCP/UDP | 111 | K8s Nodes | TrueNAS | NFS RPC services |
| iSCSI | TCP | 3260 | K8s Nodes | TrueNAS | iSCSI target access |
Firewall Configuration:
- Allow Kubernetes pod CIDR (e.g., 10.244.0.0/16) to TrueNAS IP
- Allow Kubernetes node IPs to TrueNAS IP
- For iptables/Docker environments: Configure DOCKER-USER chain
Appendix C: Comparison with Other Storage Solutions
| Feature | TrueNAS CSI | NFS Subdir | Local Path | Cloud Provider CSI |
|---|---|---|---|---|
| Dynamic Provisioning | ✓ | ✓ | ✓ | ✓ |
| ReadWriteMany | ✓ (NFS) | ✓ | ✗ | ✗ (usually) |
| Volume Expansion | ✓ | ✗ | ✗ | ✓ |
| Snapshots | ✓ | ✗ | ✗ | ✓ |
| Cloning | ✓ | ✗ | ✗ | ✓ |
| Block Storage | ✓ (iSCSI) | ✗ | ✓ | ✓ |
| Enterprise Features | ✓ (ZFS) | ✗ | ✗ | ✓ |
| Cost | Infrastructure only | Infrastructure only | Infrastructure only | Per-use cloud billing |
| On-Premises | ✓ | ✓ | ✓ | ✗ |
Nextcloud
Nextcloud in TrueNAS
Nextcloud is a suite of client-server software for creating and using file hosting services.
TrueNAS offers one deployment option for setting up Nextcloud, a Linux Debian-based TrueNAS version application available in TrueNAS releases 24.10 and later. For the Linux Debian-based app instructions, see Nextcloud .
TrueNAS offered a FreeBSD-based TrueNAS Nextcloud plugin in releases 13.0 and earlier, and 13.3, but it is no longer available in TrueNAS 13.0 because of changes in FreeBSD, and it is soon to be unavailable in 13.3. Refer to release notes for more information on upcoming and current changes.
This article provides instructions for the FreeBSD-based Nextcloud plugin.
Plugin Catalogs
To see the plugin catalog, go to the Plugins screen.
TrueNAS organizes plugins into two Collections:
- TrueNAS maintained plugins
- Open source plugins created and maintained by TrueNAS users.
By default, TrueNAS shows the iXsystems-supported plugins. To see the community plugins, open Browse a Collection and select Community.
Installing a Plugin
You have two plugin installation options:
Refer to the Nextcloud documentation for details about using the Nextcloud platform:
OpenStack Cinder Driver
There is an unsupported, open source driver for Cinder available for TrueNAS, available at https://github.com/iXsystems/cinder . This is a simple driver that uses several scripts to allow block/iSCSI interactions between OpenStack Cinder and TrueNAS systems. To review the driver documentation, including minimum hardware requirements, install instructions, and basic usage, see https://github.com/iXsystems/cinder/blob/master/README.md .
Proxmox VE Storage Plugin
The TrueNAS Proxmox VE Storage Plugin lets you use TrueNAS as high-performance block storage for Proxmox VE clusters, accessible via iSCSI or NVMe/TCP. Unlike standard iSCSI, the plugin automates zvol creation, iSCSI extent mapping, and target association through the TrueNAS API. You provision storage directly from Proxmox without manual setup on the TrueNAS side. It uses ZFS to provide instant, space-efficient snapshots, including live VM state with RAM. It supports CHAP authentication, thin provisioning, ZFS compression, and multipath I/O. It works with Proxmox cluster deployments that use shared storage.
The TrueNAS Proxmox VE Storage Plugin is developed and maintained by TrueNAS. Proxmox VE is a third-party virtualization platform not affiliated with TrueNAS. TrueNAS support covers plugin functionality only. For Proxmox VE issues, consult the Proxmox documentation and Proxmox support . To report a plugin bug or follow development progress, see the truenas-proxmox-plugin GitHub repository .
Requirements
This plugin requires Proxmox VE 8.x or later (9.x recommended) and TrueNAS 25.10 or later. NVMe/TCP mode requires Proxmox VE 9.x or later.
Proxmox nodes must be able to reach TrueNAS on port 3260 (iSCSI) and port 443 (WebSocket API).
For NVMe/TCP mode, install nvme-cli on each Proxmox node.
You must also have a TrueNAS API key with sufficient privileges to create and manage datasets and iSCSI or NVMe/TCP resources.
Before You Begin
Before installing the plugin, complete these steps on TrueNAS:
- Create a ZFS dataset to use for Proxmox storage (for example, tank/proxmox). Set Dataset Preset to Generic.
- Enable the iSCSI service in System > Services and set it to start automatically.
- Create an iSCSI portal in Shares > iSCSI > Portals. Set the IP address to your TrueNAS IP and the port to 3260.
- Create an iSCSI initiator group in Shares > iSCSI > Initiators. Leave the defaults to allow all initiators.
- Create an iSCSI target in Shares > iSCSI > Targets. After saving, edit the target and add a group. Set the Portal Group ID to the portal you created in step 3. Set the Initiator Group ID to the initiator you created in step 4.
- Generate a TrueNAS API key in Credentials > Users. Select your user, then click Add API Key on the Access widget to open the Add API Key screen. For a user that already has a key, click View API Keys on the Access widget instead, then click Add on the User API Keys screen. Enter a name for the key and click Save. Save the key securely. TrueNAS does not show the key again after you close the screen.
- For NVMe/TCP mode, enable the NVMe-oF service in System > Services.
Granting the built-in SHARING_ADMIN role to the user account for the API key covers the steps above. For a narrower, least-privilege role set instead, see Minimum API Permissions
in Additional Resources.
See the Installation Guide for detailed TrueNAS setup steps.
Installation
The plugin is installed on each Proxmox VE node, not on TrueNAS.
Option 1: APT Repository (Recommended)
The APT repository method provides automatic version detection and updates. Run the following command on each Proxmox node. The installer automatically detects your Proxmox VE version and selects the correct APT suite.
This command installs from the alpha branch. The plugin team currently publishes its latest fixes there ahead of main.
bash <(curl -sSL https://raw.githubusercontent.com/truenas/truenas-proxmox-plugin/alpha/install.sh) --non-interactive --apt-install
| Proxmox VE Version | APT Suite |
|---|---|
| 8.x | bookworm |
| 9.x | trixie |
Option 2: Direct .deb Installation
Download a release package from the releases page
and install it directly.
Replace <RELEASE_TAG> and <DEB_VERSION> with the values from the release you want to install:
wget https://github.com/truenas/truenas-proxmox-plugin/releases/download/v<RELEASE_TAG>/truenas-proxmox-plugin_<DEB_VERSION>_all.deb
dpkg -i truenas-proxmox-plugin_<DEB_VERSION>_all.deb
apt-get -f install -y
Option 3: Interactive Installer
The interactive installer provides a menu-driven setup with a configuration wizard, health checks, and built-in validation. It supports both iSCSI and NVMe/TCP. Run the following command and follow the prompts:
bash <(curl -sSL https://raw.githubusercontent.com/truenas/truenas-proxmox-plugin/alpha/install.sh)
The interactive installer configures
Configuration
If you used the APT repository or .deb installation, manually add a storage backend entry to
nano /etc/pve/storage.cfg
iSCSI
truenasplugin: truenas-storage
tn_api_host 192.168.1.100
tn_api_key 1-your-truenas-api-key-here
tn_api_insecure 1
tn_target_iqn iqn.2005-10.org.freenas.ctl:proxmox
tn_dataset tank/proxmox
tn_discovery_portal 192.168.1.100:3260
content images
shared 1
NVMe/TCP
truenasplugin: truenas-nvme
tn_api_host 192.168.1.100
tn_api_key 1-your-truenas-api-key-here
tn_api_insecure 1
tn_transport_mode nvme-tcp
tn_subsystem_nqn nqn.2005-10.org.freenas.ctl:proxmox-nvme
tn_dataset tank/proxmox
tn_discovery_portal 192.168.1.100:4420
content images
shared 1
In both examples, replace 192.168.1.100 with your TrueNAS IP address.
Replace the API key value with your generated key, and tank/proxmox with your ZFS dataset path.
tn_api_insecure 1 disables SSL certificate verification. Include this parameter when TrueNAS uses a self-signed certificate, which is the default.
Remove this line only if TrueNAS uses a valid signed certificate.
Every plugin-specific storage.cfg parameter uses a tn_ prefix (tn_api_host, tn_dataset, and so on). The content and shared parameters are standard Proxmox storage options and keep their unprefixed names.
For all available configuration parameters, see the Configuration Reference .
Additional Resources
The plugin team maintains an extensive wiki covering setup, configuration, and operation in more depth than this overview.
Setup and Configuration
- Installation Guide : Full installation walkthrough, including cluster-wide deployment and update procedures.
- Configuration Reference
: Every
storage.cfgparameter, with example configurations for single-node, cluster, HA, and IPv6 deployments. - NVMe/TCP Setup Guide : Detailed NVMe/TCP setup, including DH-CHAP authentication and multipath configuration.
- Minimum API Permissions : A least-privilege role set for the plugin API user, as an alternative to a broad admin role.
Operations
- Troubleshooting Guide : Common error messages and diagnostic steps for installation, connection, and volume issues.
- Known Limitations : Restrictions and workarounds to review before deploying to production.
- Changelog : Version history for the plugin.
Advanced Topics
- Advanced Features : Performance tuning, cluster and HA configuration, and security hardening.
- Multi-Tenancy : Guidance for safely sharing one TrueNAS system across multiple Proxmox clusters.
- API Reference : Technical detail on the TrueNAS API integration used by the plugin, intended for integrators and contributors.
Testing and Diagnostics
- Testing Guide : Covers the plugin development test suite. The built-in installer already covers day-to-day health checks. This suite is for plugin development and debugging, not production systems.
- Tools and Utilities : Reference for the installer diagnostics menu and other included tooling.
Veeam
TrueNAS Unified Storage appliances are qualified Veeam-ready and can be used to handle demanding file and VM backup requirements. These qualification tests measure the speed and effectiveness of the data storage repository using a testing methodology defined by Veeam for full backups, full restores, synthetic full backups, and instant VM recovery from within the Veeam Backup & Replication environment. With the ability to seamlessly scale to petabytes of raw capacity, high-performance networking and cache, and all-flash options, TrueNAS appliances are ideal for large and small Veeam Backup & Replication repositories.
This article discusses some of the best practices when deploying TrueNAS with Veeam, the specific considerations users must be aware of, and some tips to help with performance. The focus is on capabilities native to TrueNAS. For more information on using and optimizing Veeam deployments, users can review relevant Veeam documentation, such as the Veeam help center and Veeam best practices articles.
Necessary Prerequisites
When deploying TrueNAS with Veeam, prepare the following:
- Veeam Backup & Replication dedicated server - either physical or VM
- Windows Server for Veeam
- TrueNAS appliance with users pre-configured as determined by the admin
- Networking - 1/10/40/100GbE infrastructure and cables
- Veeam connected to the Hypervisor or other clients to pull the data to TrueNAS
- All appropriate licenses
- Backup proxies as defined by Veeam - these can be virtual or physical machines or the backup server itself for low workloads
- TrueNAS appliance configured with an S3 credential to use Veeam immutability and harden the server.
Veeam appliances, software, and infrastructure only works with TrueNAS 25.10 or later releases.
Update your TrueNAS to 25.10 or later before deployment. Updating the TrueNAS release ensures the appliance has the latest bug fixes, security updates, and software enhancements to ensure maximum performance and security. If deploying on a closed network (LAN) without access to the Internet, users can also obtain and apply an update manually. For assistance, please contact TrueNAS support.
Sizing Considerations
When planning sizing, you must consider the TrueNAS storage appliances range from entry-level to high-end, and the user system current usage scenario and backup demands.
Defining Your Storage Usage
While this guide focuses on Veeam, the unified design of TrueNAS allows it to multitask. If TrueNAS is handling more than backup jobs, other usage needs should be taken into account. For example, if the storage appliance has one LUN (dataset or zvol) set as a VMware datastore for hosting VMs, and another LUN set to use for backups, you must consider both capacities.
Estimating Capacity
The first step when estimating required capacity is to understand how much capacity is currently used by existing VMs and by files that users need to back up. Veeam and the TrueNAS appliance apply data compression though different file types and data structures in those files can affect the achieved compression levels. Some tools for capacity estimation are listed at the end of this section, but it is always good to err on the side of caution, and three times (3x) the current storage used is not unreasonable. ZFS performs best with utilization below 80%. Snapshots, full backups, and incremental backups all require more storage than the primary storage used today.
Estimating Network Bandwidth
Bandwidth is harder to estimate and must account for backup timeframes, backup sizes, and available network resources. Typically, backups run during off-hours when IT equipment is under a lighter load. This timeframe can be set but if each backup is several terabytes you need more time and bandwidth. TrueNAS tests Veeam backups using a 10 GbE mixed network with the datastore storage, hypervisor hosts, and backup repository (the TrueNAS) on the same network. However, shorter backup windows, heavy network usage, and dozens of VMs being backed up simultaneously can require 40 or 100 GbE networking and multiple Veeam backup proxies used in tandem.
For example, consider backing up 1000 VMs (each 100 GB in size) with a backup window of eight hours. This requires around five virtual proxy servers with eight vCores (16 GB memory each) and about 3.7 GB/s throughput. In such a scenario, we recommend 100 GbE interconnect and TrueNAS appliances with over 100+ hard drives. However, bandwidth can be greatly reduced if users accept incremental and staggered backups. For example, run an incremental backup on all VMs each day, and a full backup on 100 VMs per night, rotating a different VM of the 100 VMs each night. This strategy provides a 5X increase to the maximum number of VMs and reduces costs by 75%.
Choosing a TrueNAS Model
TrueNAS systems are excellent for backup and archiving, but must be correctly sized. Recommended sizing:
| Model | Backup Only? | Number of VMs Backed Up | Network Max | Usable Capacity |
|---|---|---|---|---|
| TrueNAS M40 | No | 47,600 | 40 GbE | 2.68 PB |
| TrueNAS M50 | No | 204,000 | 100 GbE | 10.23 PB |
| TrueNAS M60 | No | 299,200 | 100 GbE | 15.1 PB |
| TrueNAS H10 | No | 13,600 | 25 GbE | 873 TB |
| TrueNAS H20 | No | 20,400 | 100 GbE | 1.34 PB |
| TrueNAS H30 | No | 20,400 | 100 GbE | 1.34 PB |
| TrueNAS F60 | No | 47,600 | 100 GbE | 2.6 PB |
| TrueNAS F100 | No | 115,600 | 100 GbE | 6.1 PB |
Backup Only? assumes only using the storage as a backup repository. This can be understood as a recommendation, not a rule. The number of VMs is based upon conservative throughput estimates, with an average VM size set to 100GB and a backup window of eight hours running full backups. All other requirements for the number of Veeam backup proxies and networking dependencies also apply.
Number of VMs backed up. Numbers are based on max capacity and estimate 100GB per VM and a 2:1 optimal compression ratio. Compression and deduplication settings can radically change the estimates, and Veeam allows for fine-tuning.
Configuring the Pools, Datasets, and Zvols
For high-capacity deployments, TrueNAS recommends 9+2+1 RAID groups (called virtual devices or vdevs by ZFS terminology). This configuration consists of a RAIDZ2 (similar to RAID 6 with two drive parity, so two drives can fail without data loss) with one to two global hot spares added to the pool. Pools can include several of these RAID groups, so the capacity can be expanded as needed. For example, 390 TB of usable space with 12 TB drives requires four groups and 48 drives. Detailed configurations can be discussed with TrueNAS sales representatives and engineers.
Configuring Veeam Agent with SMB on TrueNAS
Veeam Agent for Microsoft Windows supports backing up to SMB shares hosted on TrueNAS. This procedure details configuring a standard SMB share and dataset in TrueNAS. To use block or fast cloning, see Configuring Veeam with SMB and Fast Clone for the correct procedure.
Creating the SMB Share
- Go to Datasets, create a dataset (example: veeam-backups), and set the Dataset Preset to SMB.
- Accept the option to create the share with the dataset.
- Create a TrueNAS user (example: veeam) and assign full access to the dataset ACL.
- Enable the SMB service.
Use the Virtual IP (VIP) for high availability.
Setting Up Veeam Agent
- Open Veeam Agent for Microsoft Windows.
- Click Configure Backup.
- Select Entire Computer, then Shared Folder as the destination.
- Enter the SMB path and TrueNAS local user credentials.
- Adjust backup schedule and retention if desired.
- Click Finish. You can now begin a backup.
Configuring Veeam for SMB with Fast Clone
TrueNAS Enterprise
To configure a TrueNAS SMB share for a Veeam repository with fast (block) cloning you must have an enterprise-licensed TrueNAS system.
First set up the TrueNAS system storage and SMB share before adding the Veeam repository. Fast cloning fails if you add the Veeam repository before you configure TrueNAS. You cannot use an existing Veeam repository for SMB and fast cloning. There is no supported mechanism to convert an existing Veeam repository into one that a TrueNAS SMB share with fast cloning can use.
TrueNAS properly aligns the TrueNAS ZFS record size and SMB share block size with the Veeam repository requirements when using these instructions.
If not already created, go to Credentials > User and add a TrueNAS administrative user to serve as the share user. Refer to the basic SMB Share instructions for information on creating a share user. You can assign this admin user full control or a sharing admin role. Add this user to the ACL for the dataset created for Veeam SMB with fast cloning.
Configuring TrueNAS Storage
First, think about how you want to organize your data storage. We recommend creating the parent dataset structure before creating the dataset and share for Veeam SMB fast cloning. For example, organizing all datasets for shares (SMB, NFS, etc.) under one common parent dataset (shares) with datasets for each share type nested under it.
If you have other Veeam data storage set up in the system and you want to nest the fast cloning dataset under the existing Veeam dataset, skip adding the dataset organization instructions below and go to the instructions for verifying the record size for the Veeam dataset at the bottom of this section.
To create and organize datasets in a hierarchical structure for shares, for example, shares/smb/veeam, go to the Datasets screen, select the parent dataset row in the table, and click Add Dataset. Add the dataset for the next level in the organization, for example, the dataset named shares or if it exists, add one named smb, etc.
Enter a name for the dataset, then select the SMB option under Dataset Preset. Clear the option to create the share. Clear the checkbox in Create SMB Share for these organizational datasets unless you plan to use them for other SMB share purposes.
Next, verify the record size. Click Advanced Options, and scroll down to the Record Size field. If not set to 128 KiB, select it on the dropdown list.
Click Save to create the dataset.
Grant full access to the user created as the share admin in the dataset ACLs.
If a parent datasets exist and you only need to create the dataset and SMB share for the Veeam repository, verify the record size for the parent dataset. Select the parent dataset row in the table, click Edit, and then Advanced Options. Scroll down to Record Size. Verify it is set to 128 KiB. Click Save if you make any changes.
You are ready to create the share.
Creating the SMB Share
With the data structure organization in place and the correct record size set, go to Shares, and click Add on the Windows SMB Shares widget.
Browse to select the parent dataset. Click on each dataset in the path to the parent dataset, for example: /tank/shares/smb/, and then click Create Dataset. Enter the name for the Veeam SMB dataset in the Create Dataset dialog, then click Create Dataset. The dialog closes and the Path on the Add SMB screen populates with the path to the new dataset.
Select Veeam repository with Fast Clone on the Purpose dropdown list. Click Advanced Options and scroll down to Additional Parameters String. It should show block size = 131072. Select other SMB share settings you want to enable. For example, select Enable under Audit Logging to include SMB activities in audit logging.
Click Save to create the share. Enable or restart the SMB service when prompted.
Adding the Veeam Repository for SMB with Fast Cloning
With the TrueNAS storage and share properly configured, you can now add the repository in Veeam. Follow the instructions in Setting Up Veeam Agent to add the repository.
Planning Storage Lifecycle
TrueNAS storage pools can be expanded online to the maximum size supported by a particular TrueNAS system. Storage pools can be expanded one vdev (RAID group) at a time, so long as each vdev shares the same type. When deploying an iSCSI share requiring a zvol (LUN), users should consider thin provisioning using the sparse option during setup.
Other Considerations
In addition to the above considerations, you can use the many tools, forums, and other discussion groups to help verify the amount of storage you need for Veeam backup. In many sites, Veeam compression or deduplication is around 1.5x to 2x, which is more of a reference than a rule. Backup types, applications, and the diversity of VMs can all factor into the amount of storage you need. You must also consider capacity alongside desired performance, as a smaller quantity of large drives often does not yield the same performance as a larger number of small drives. The resources listed below provide rough calculations available to determine the sizes and numbers of drives needed:
- Veeam Backup Capacity Calculator
- Sizing from Veeam Best Practices
- Veeam Size Estimation Tool
- 3rd Party Bandwidth Calculator
Advantages
TrueNAS is a robust, unified storage system well-suited for nearly any environment. For backups, the platform takes advantage of the data integrity offered by ZFS, which includes features such as copy-on-write, snapshots, and checksums that prevent bit-rot. You can expand TrueNAS Enterprise appliances at any time by simply adding more drives, allowing datasets to grow and keeping pace with your data storage needs. Here are additional key features that are offered out-of-the-box at no extra cost to the Enterprise user:
- Self-healing file system - ZFS places data integrity first with data scrubs and checksums, ensuring files are saved correctly and preserved.
- Native replication to TrueNAS systems - TrueNAS native replication is perfect for disaster recovery and compliance.
- High-availability (HA) architecture with 99.999% availability - High Availability (HA) ensures the system is always ready to receive the latest backups.
- Triple-parity - RAID groups (vdevs) can be configured with mirror, single-parity (RAIDZ), dual-parity (RAIDZ2), or triple-parity (RAIDZ3) levels, while copy-on-write, checksums, and data scrubbing help protect long-term data integrity.
- Unrivaled scalability in a single dataset - TrueNAS allows scaling the backup repository from terabytes to petabytes of usable capacity. No LUN limits, clustering, or licenses needed.
Setting Up TrueNAS as a Veeam Repository
Veeam Backup & Replication runs on a Windows operating system, typically Windows Server 2012 or newer, and can connect to a variety of storage systems. TrueNAS recommends using iSCSI on TrueNAS with a Veeam scale-out repository architecture. Users can also directly mount the volume to the backup server using SMB. Refer to the SMB tutorial section for your version for more information. With support for SMB/CIFS, NFS, AFP, iSCSI, and FC, TrueNAS offers many ways to connect to Veeam backup servers.
Veeam Backup & Replication provides three tiers of immutability to temporarily prohibit deleting data from extents. To use this immutability :
- Enable S3 on the bucket you create. You can use Amazon S3 storage or another S3-compatible storage provider.
- Configure Azure storage immutability policies for the blob version, and when you create the storage account, enable blob versioning for the storage account.
Using a Veeam Backup & Replication hardened repository protects backup files from loss due to malware or unplanned actions. A hardened repository supports immutability and single-use credentials.
Veeam Software Appliance
Veeam version 13 includes a new Linux Software Appliance image that integrates with TrueNAS as a virtual machine deployment. The goal for this appliance image is smoother, more secure, and easily accessible deployments of Veeam Backup & Replication.
Installation Instructions
Veeam Infrastructure Appliance
Veeam version 13 includes a new Veeam Infrastructure Appliance image that integrates with TrueNAS as a virtual machine deployment. The goal for this infrastructure appliance with TrueNAS is to integrate with an existing Veeam Backup & Replication deployment as a hardened backup repository for use in Veeam Jobs.
Installation Instructions
Veeam Immutability
TrueNAS can act as S3-compatible object storage for immutable backups in Veeam Backup & Replication.
Immutability is a feature of Veeam Backup & Replication. When configured with storage solutions such as TrueNAS, it prevents modifying or deleting data for a specified period of time. Set the immutability period based on your needs. After this period expires, backed up data can be modified or deleted again.
The immutability feature increases data security, protects data from losses incurred through malware, attacks, or other harmful actions by bad actors, and can protect configuration backups. Veeam makes this feature available to work with a number of storage options such as S3 or S3-compatible object repositories.
How Does Veeam Immutability Work?
Veeam protects a backup chain and all the restore points of this chain for the specified immutability period. The immutability period is the number of days you have to respond to malicious actions. During this period you can roll back to the earlier state of your backup chain. Rolling back requires running Veeam PowerShell. See Rolling Back Immutable Data for more information.
With S3 object storage, Veeam uses the S3 object lock feature to make backups immutable. Veeam sets a compliance mode retention period on each object it writes. No S3 client can delete or modify an object in compliance mode before its retention period ends, including a client that uses Veeam administrator credentials.
Choose the immutability period carefully. You cannot shorten the retention period or delete immutable backups before the period ends, even if you need to free storage space or must delete specific data.
Because Veeam protects the whole backup chain, it extends the immutability of earlier restore points as it adds new ones. Immutable backups often use more storage than the number of immutable days suggests. Plan storage capacity with this in mind.
For more detailed information on Veeam Immutability, see How Immutability Works .
What is Required to Configure Veeam Immutability?
- A TrueNAS system license that includes S3 versioning. Object lock requires versioning, which is a licensed feature. See Licensed S3 Features .
- A dataset on TrueNAS to hold the bucket dataset, for example tank/s3.
- Veeam Backup & Replication installed on a Windows server. The Veeam Software Appliance does not support the object storage repository type. See Veeam Software Appliance for more information.
Configuring TrueNAS S3 Object Storage for Veeam
Configure the S3 service, create an access key for Veeam, and add an object-locked bucket for the backup repository. See Configuring S3 Object Storage for detailed instructions on each task.
Configure the S3 service. Go to Shares, click the icon on the Object Storage (S3) Buckets card, and then select Config Service.
a. (Optional) Add a listen address with TLS selected to encrypt backup traffic between Veeam and TrueNAS.
b. Select the Certificate for the TLS listen address, or keep Use UI certificate.
c. Click Save.
Create an access key for Veeam. Go to Credentials > S3 Access Keys, and then click Add.
a. Enter a Name, and then select or create the user account for Veeam in User.
b. Select Non-expiring. An expired access key stops Veeam from writing backups.
c. Click Save, and then copy the Access Key ID and Secret Access Key from the S3 Access Key dialog. The web UI does not show the secret access key again.
Add the bucket for the backup repository. Go to Shares, and then click Add on the Object Storage (S3) Buckets card.
a. Enter a Name, select the Parent Dataset, and select the Veeam user account as the Owner.
b. Select Enable Object Lock. Versioning changes to Enabled and Default Retention Mode shows.
c. Select No default rule in Default Retention Mode. Selecting Enable Object Lock changes Default Retention Mode to Compliance. Veeam requires a bucket without a default retention rule because it sets the retention for each object.
d. Click Save. If the Start S3 Service dialog opens, select Enable this service to start automatically, and then click Start.
Object lock is permanent. After you save the bucket, you cannot disable object lock or versioning on the bucket. Do not change the bucket settings after you add the bucket to Veeam.
TrueNAS reports a recommended storage block size to Veeam based on the record size of the bucket dataset. The default 128 KiB record size reports no recommendation.
Configuring Veeam for Immutability
Add the TrueNAS bucket to Veeam as an S3-compatible object storage repository. See Adding S3 Compatible Object Storage for detailed instructions.
Open the Veeam Backup & Replication Console, go to Backup Infrastructure, and click Backup Repositories.
Click Object Storage, and choose S3 Compatible. The New Object Storage Repository wizard opens.
Configure the Account screen.
a. Enter the TrueNAS IP address and S3 listen port in Service Point, as IP address:port number, for example 192.168.1.10:9000.
b. Enter a Region. If the Region setting on the TrueNAS S3 service is empty, TrueNAS accepts any region, such as us-east-1.
c. Add the TrueNAS S3 access key in Credentials, using the Access Key ID and Secret Access Key.
d. Select the connection type in Connection Mode. Select Direct to move data of processed VMs directly to object storage repositories. This requires specifying access permissions. Select Through gateway server to have Veeam Backup & Replication use a gateway server to transfer data from processed VMs or file shares to object storage repositories. This is the default setting.
e. Click Next. If TrueNAS uses a self-signed certificate, a certificate security alert dialog opens. Click Continue to close the dialog.
Configure the Bucket screen.
a. Select the TrueNAS bucket for the repository.
b. Add a folder to the bucket. You must add at least one folder.
c. Select Make recent backups immutable for x days, and enter the number of days.
d. (Optional) Select Limit object storage consumption to x TB, and enter the limit.
e. Click Next.
Configure the mount server. Veeam uses the mount server during restore operations to mount VM disks directly from objects in the object storage repository.
a. Select the mount server. If not listed, click Add New. See Adding Windows Servers for instructions.
b. Select the folder for the cache created during mount operations from the Instant recovery write cache folder dropdown list.
c. (Optional) Enter the NFS service settings and the ports Veeam uses for the NFS service. See Specifying Mount Server Settings for more information.
Click Next, review the configuration, and then click Finish. Veeam automatically installs additional components if needed.
Create a new backup job in Veeam if desired. See Creating Immutable Configuration Backups for more information.
Amazon S3 is a trademark of Amazon.com, Inc. or its affiliates.
VMware
There are several configuration recommendations and troubleshooting tips when using TrueNAS with a VMware hypervisor.
iSCSI IQN is an acronym that stands for “iSCSI Qualified Name”. It is comprised of the following naming schema with a preamble, node name and unique identifier:
VMware requires using an IQN in their software iSCSI implementation.
A VMware datastore backed by iSCSI-based storage will consist of at least three distinct pieces: the storage host, the switching infrastructure, and the VMware host itself. In order to maximize service availability, each of these elements needs to be able to tolerate some level of failure without significantly disrupting iSCSI traffic.
TrueNAS systems support high-availability (HA) through dual-controllers running in active/standby mode. A properly-configured HA TrueNAS system can offer up to 5x 9’s of system availability. TrueNAS also fully supports asymmetric logical unit access (ALUA) on iSCSI to significantly reduce failover time.
Network switching infrastructure can be made redundant and fault-tolerant through a number of methods, but multipathing is recommended as the best practice for iSCSI networks.
VMware’s official documentation details several ways the virtualization host(s) can be made redundant, so that is not covered here.
For a VMware ESXi host to communicate with an iSCSI capable storage array, the iSCSI protocol must be configured to provide: Discovery, Authentication, and Access Control (DAAC).
Discovery
iSCSI offers two methods of target discovery: dynamic and static. Dynamic discovery lets the storage array respond automatically to the host initiator’s “SendTargets” request. Static discovery requires an administrator to manually add a list of the iSCSI targets to the initiator. Either method of discovery is fine, but dynamic discovery can make the iSCSI setup process easier.
Authentication
iSCSI authentication is handled via the Challenge Handshake Authentication Protocol, or CHAP. CHAP uses a shared secret between targets and initiators to let them validate each other’s authenticity. By default, no CHAP-based authentication is performed by the VMware iSCSI initiator. If you do decide to use CHAP, authentication can either be unidirectional (where only the target authenticates the initiator) or bidirectional (where both the iSCSI initiator and the iSCSI target are required to authenticate to each other prior to transmitting iSCSI data).
VMware iSCSI initiators operating with unidirectional CHAP can be configured in two behavior modes. In “Required” mode, an iSCSI adapter will give precedence to non-CHAP connections, but if the iSCSI target requires it, the connection will use CHAP instead. Required mode is only supported by Software iSCSI and Dependent Hardware iSCSI adapters. Alternatively, initiators can run in “Prohibited” mode, where an iSCSI adapter will give precedence to CHAP connections, but if the iSCSI target does not support CHAP, the initiator can still connect.
Bidirectional CHAP (called “mutual CHAP” in TrueNAS) offers greater security by ensuring that both sides of the iSCSI connection authenticate against each other. Unidirectional CHAP does not let the iSCSI initiator authenticate the target, and running without CHAP obviously disables all authentication. For this reason, bidirectional CHAP is usually recommended but requires additional configuration and comes with greater administrative overhead when troubleshooting iSCSI connections.
Access Control
Access control policies are set up within a storage array to ensure only certain initiators can connect to the target (even if they possess the correct CHAP password). Access control can be performed using the initiator’s name (IQN), its IP address, or its CHAP username.
VMware and TrueNAS iSCSI Setup
The setup of vCenter iSCSI to TrueNAS requires that ESXi hosts be set up as initiators and TrueNAS storage arrays are set up as targets. To configure ESXi hosts with vCenter, see the VMware vCenter documentation .
To configure TrueNAS Enterprise storage arrays with vCenter, the TrueNAS team has developed a vCenter plugin . The plugin uses TrueNAS REST APIs to automate LUN creation and assignment. When an VMFS (iSCSI) datastore is created using the plugin, the TrueNAS systems automatically activate their iSCSI system services.
Hosting VMware Storage with TrueNAS
When using TrueNAS as a VMware datastore:
Make sure guest VMs have the latest version of vmware-tools installed. VMware provides instructions to install VMware Tools on different guest operating systems.
Increase the VM disk timeouts to better survive long restarts or other delayed disk operations. Set the timeout to a minimum of 300 seconds. VMware provides instructions for setting disk timeouts on the Windows guest operating systems: https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere/6-7/set-guest-operating-system-timeout.html
NOTE: Restarts or failovers typically complete much faster than 300 seconds and Disk IO resumes automatically when finished.
VMware Snapshots on TrueNAS
When TrueNAS is used as a VMware datastore, you can coordinate creating and using ZFS and VMware snapshots. See VMware Snapshots for details.
vStorage APIs for Array Integration (VAAI) for iSCSI
VMware’s VAAI allows storage tasks such as large data moves to be offloaded from the virtualization hardware to the storage array. These operations are performed locally on the NAS without transferring bulk data over the network.
VAAI for iSCSI supports these operations:
unmap command.TrueNAS Virtualized with ESXi
This article describes deploying a TrueNAS virtual machine (VM) in a VMWare ESXi environment. ESXi version 8 is shown in this article.
Before You Begin
Before starting configuration work in VMWare:
Allocate a drive or a few drives in your server cluster for the TrueNAS virtual machine. The anticipated storage needs for your deployment determines the size and number of drives you need.
Download the
.iso file from the TrueNAS.com downloads page .Visit the TrueNAS hardware guide and take note of the minimum system requirements. Note the information in the Memory and Storage Device Sizing sections.
The hardware guide provides guidance on how much memory, the number of CPUs, and drive size you need to configure.
Determine your data storage requirements. Consider the number of storage pools and the type of storage you need for your deployment or how you plan to use the TrueNAS. See Setting Up Storage for information on pool layouts.
Determine the number of virtual hard drives (vmdks) you want to create when setting up your virtual machine. For example, if you want a mirror layout you need to add a minimum of three drives, one for the boot drive and two for the mirrored storage. If you want a mirror with a hot spare, you need to add a minimum of four drives, one for the boot drive, two for the mirrored storage and one for the hot spare.
Configure your network per your system requirements. Have the information ready when you configure your TrueNAS global network settings in the web interface.
Deploying TrueNAS in VMWare ESXi
Launch your VMware ESXi interface using your login credentials.
Setting Up Storage
Set up the storage needed for the new VM. First click on Storage and then the drive allocated for TrueNAS. Create the datastore directories for the ISO media and the TrueNAS virtual machine.
Uploading the TrueNAS ISO
After creating the ISO directory, upload the TrueNAS
Select the directory created for the
Creating the Virtual Machine
After setting up the storage needs, create the new virtual machine. Select Virtual Machines on the navigation panel on the left side of the screen.
Select the storage drive for the TrueNAS VM and then click Create/Register VM. The New virtual machine creation wizard displays. Use these settings:
On the Select a name and guest OS wizard screen, select Linux for Guest OS family and then Debian GNU/Linux 6 (64-bit) on the Guest OS Version dropdown list.
On the Customize settings wizard screen set CPU to 2, set Memory to 16 GB, and Hard disk 1 to 16 GB.
You need a minimum of two drives set to at least 16 GB. To add a drive, click Add hard disk.
You can add more hard drive now or use the Edit option to add drives later after saving the new virtual machine. To create a mirror layout you need at least three hard drives, one for boot and two to create the mirrored storage. Add as many hard drives as you need to create your desired storage layout. You can add more drives later after you install TrueNAS.
Reviewing the New TrueNAS VM
To view the VM details screen click on the VM name.
You can now edit your TrueNAS VM to change any setting or add more hard drives to support your deployment, or you can proceed to installing TrueNAS.
Installing TrueNAS
Click Power on and then click Console to display the dropdown list of console options. When the console opens, it displays the TrueNAS Console Setup screen.
Follow the installation instructions to complete the installation of TrueNAS.
Editing the Virtual Machine
You can edit your VM settings after you complete the initial setup. You can add new hard drives to your VM using the edit option found on the VM details screen. Click Edit to display the Editing Settings screen.
Click Add hard disk and select the option you want to use. For a new drive select New standard hard disk. A New Hard disk row displays and is highlighted.
To edit the hard disk details click on the row to expand it and display the drive settings you can configure.
TrueNAS vCenter Plugin
TrueNAS Enterprise
vCenter Server provides a web interface to manage physical and virtual machines. The TrueNAS vCenter Plugin activates management options for TrueNAS hardware attached to vCenter Server. This enables limited TrueNAS system management from a single interface.
The TrueNAS vCenter plugin is currently compatible with VMware vCenter Server versions 8.0 and 7.0 .
The vCenter plugin supports many different TrueNAS software versions installed on TrueNAS Enterprise licensed hardware:
| Version | Supported |
|---|---|
| 12.0 | Yes |
| 13.0 | Yes |
| 22.12 | Yes (exception) |
| 23.10 | Yes (exception) |
| 24.04 | Yes (exception) |
| 24.10 | Yes (exception) |
| 25.04 | Yes |
| 25.10 | Yes |
Exceptions
- TrueNAS 22.12, 23.10, 24.04, and 24.10 do not support Fibre Channel for VMFS datastores.
Plugin Release Notes
TrueNAS vCenter Plugin 3.7.0
January 6, 2026
TrueNAS is pleased to release TrueNAS vCenter Plugin version 3.7.0! This release expands TrueNAS compatibility to 25.10 and include these changes:
- Use the TrueNAS WebSocket API instead of the deprecated REST method.
- More accurate space capacity reporting.
- Remove read-only datasets for NFS datastore creation.
- Fix Fibre Channel port selection.
Previous Versions Release Notes
Using the Plugin
After being assisted with plugin deployment, using the plugin involves connecting TrueNAS hosts and configuring the various features to your use case. The interface suspends after several minutes of inactivity and displays a warning that the interface is suspended and must be refreshed.
Connecting TrueNAS Hosts
In a browser, go to your vCenter Server web interface, log in, and click Menu > Global Inventory Lists > Manage TrueNAS > + Add host to add TrueNAS hosts to vCenter.
Fill in the required information. A hostname or IP address can be used for the TrueNAS system. Using an API key with TrueNAS releases 25.04 and newer also requires configuring an HTTPS connection. For High Availability systems, use the VIP address or hostname to ensure the plugin remains connected in the event of a system failover. Click Add Host and the TrueNAS hostname or IP address appears in the list of connected systems.
Right-click a list entry to see options to edit the host user credentials or remove that host from vCenter. Click a hostname to see the system management options. Clicking a system entry opens the management interface.
System Management
The system management screen shows a summary and options to modify the system.
To modify the TrueNAS system, click Configure.
Each submenu has a row of buttons to add or make changes to any items in the list.
vCenter works in the background when resolving change requests.
Refresh updates the list to see any items that might have finished being created or modified.
Tasks in progress display in the collapsible Recent Tasks area across the bottom of the screen.
Naming objects in the plugin follow a standard convention.
Names can contain spaces, alphanumeric, -, and . characters.
Click Summary to view basic information about this system. The IP address, installed version of TrueNAS, storage availability, and system service status are shown.
The vCenter plugin can create two different kinds of datastores on a TrueNAS host:
- Virtual Machine File System (VMFS) for iSCSI block-level access
- Network File System (NFS) for file-level access
List
vCenter has a default limit of eight NFS datastores per ESX host. See this VMware article about maximum supported volumes for more details.
The list shows Datastores that have been created and are managed by the plugin. The list does not display other types of shares created and managed through the TrueNAS web interface.
Add Datastore
Click + (Add) to create a new datastore.
Choose an ESXi host for the datastore or an ESXi cluster to spread the reserved space across multiple systems. Clusters can be used as long as a single member of the cluster supports the datastore features. Click Next.
Choose the datastore type. VMFS datastores provide block-level (iSCSI) storage for virtual machines. NFS datastores provide file-level storage access. Click Next to view specific options for each datastore type
Review Datastore Configuration
After configuring the VMFS or NFS datastore, vCenter shows a summary of the new datastore. To begin creating the datastore, review the settings and click Finish. The interface shows a warning when the datastore contains more than 80% of the available space. Click Refresh to see the new datastore after creating it.
Extending a Datastore
Users needing additional space can increase the total size of a VMFS datastore. Highlight a VMFS datastore from the list and click Edit to extend it.
The new size must be larger than the current size and less than the total available capacity. For best performance, we recommend using less than 80% of the total available size. Using decimal notation rounds down the size to the nearest 1024 bytes (or whatever the configured default block size for the volume is). Click Extend Datastore. Datastores reserve some available space for internal use and set the available capacity to slightly less than the chosen amount.
Cloning Datastores
Cloning an NFS or VMFS datastore duplicates that datastore. Select a datastore from the list and click Clone. Choose an ESXi host to store the new datastore and click Next. Enter a name for the clone and click Clone Datastore.
vCenter starts the cloning process and continues the task in the background. Click Refresh after some time to see the cloned datastore.
An administrator can grant vCenter users specific role-based access to the TrueNAS systems managed by this plugin. New vCenter users must be created in Menu > Administration > Single Sign On > Users and Groups before RBAC roles can be created.
| Role Name | User is allowed to: |
|---|---|
| Discovery | Add TrueNAS systems to vCenter |
| Create Clones | Copy existing datastores |
| Create Storage | Create new datastores |
| Modify Storage | Edit existing datastores |
| Destroy Storage | Delete datastores |
Each role gives the user the ability to perform the functions in that role and all of the roles that precede it in the list. For example, a user with a Create Storage role can create a new datastore and clone existing datastores. The vCenter administrator account always has all permissions.
Add a Role to an Existing vCenter User
Click + to open the Add Role Based Access Control window.
Type a user name in the form DOMAIN.NAME\username, where DOMAIN.NAME is the user domain found in the vCenter Menu > Administration > Single Sign On > Users and Groups page.
Open the Assign Role dropdown list and choose a role for the user.
Click Add to add the role.
If the entry does not appear in the list immediately, click Refresh.
Hyper-V
Hyper-V Best Practices
Hyper-V hosts that use TrueNAS iSCSI storage need adjusted storage timeouts before they enter production.
TrueNAS Enterprise systems provide high availability (HA) through dual controllers in active/standby mode. Only the active controller serves I/O. A failover transfers that role to the other controller, which imports the pool and starts the iSCSI targets. No controller serves I/O on the affected LUNs until the transfer completes.
Windows storage defaults are shorter than this window. Multipath I/O (MPIO) removes a disk after 20 seconds without a path, and I/O does not resume on its own after Windows removes it. Recovery then requires an initiator restart, a storage rescan, or a reboot. The settings on this page raise those timers so disk objects survive the failover.
These settings affect all iSCSI and MPIO traffic on the host. Review them with your storage and virtualization team before you apply them.
Before You Begin
Apply these settings to every Hyper-V host that mounts TrueNAS iSCSI LUNs. Open PowerShell as an administrator on each host.
Some values require a restart, so plan a maintenance window that allows a restart of each host and a test failover.
These values use the same 300-second envelope TrueNAS recommends for VMware . The new controller must finish the pool import and target startup before any host timer expires.
Multipath I/O Timers
Use the Set-MPIOSetting cmdlet for these values.
Most take effect without a restart.
| Parameter | Default | Recommended | Description |
|---|---|---|---|
-NewPDORemovePeriod | 20 | 300 | Seconds MPIO keeps a lost device before it removes the disk from Windows. The most important value to size correctly. |
-CustomPathRecovery | Disabled | Enabled | Lets MPIO probe a failed path instead of waiting for a session to reconnect. |
-NewPathRecoveryInterval | 40 | 25 | Seconds between probes of a failed path. |
-NewRetryCount | 3 | 60 | Retries for an I/O that returns a SCSI error. |
-NewRetryInterval | 1 | 1 | Seconds between retries. Leave at the default. |
Per-Disk SCSI Timeout
TimeOutValue sets the longest time a single SCSI command stays outstanding before Windows abandons it.
It must exceed the failover window so queued I/O is held rather than failed.
Raise it from the default of 60 seconds to 300.
The value is under HKLM:\SYSTEM\CurrentControlSet\Services\disk.
A restart is required.
iSCSI Initiator Timers
These values control initiator behavior while a session reconnects.
All are under HKLM:\SYSTEM\CurrentControlSet\Services\iScsiPrt\Parameters, and a restart is required.
| Registry value | Default | Recommended | Description |
|---|---|---|---|
LinkDownTime | 15 | 60 | Seconds the initiator tolerates a disconnect before it declares the session dead. |
MaxRequestHoldTime | 60 | 300 | Seconds the initiator queues I/O while a session reconnects. Sized to match the MPIO and disk timeouts. |
DelayBetweenReconnect | 5 | 5 | Seconds between reconnection attempts. Leave at the default. |
Failover Cluster Heartbeat Settings
If the Hyper-V hosts belong to a failover cluster, raise the heartbeat thresholds so the cluster does not evict a node while storage is mid-failover. These settings are cluster-wide, so run them one time on any cluster node. On Windows Server 2019 and later, some defaults already match these values.
| Property | Recommended |
|---|---|
SameSubnetThreshold | 20 |
CrossSubnetThreshold | 30 |
RouteHistoryLength | 30 |
Applying the Settings
Run the following on every Hyper-V host as an administrator.
# MPIO timers
Set-MPIOSetting -NewPDORemovePeriod 300 `
-CustomPathRecovery Enabled `
-NewPathRecoveryInterval 25 `
-NewRetryCount 60 `
-NewRetryInterval 1
# Per-disk SCSI timeout (restart required)
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Services\disk' `
-Name TimeOutValue -Value 300 -Type DWord
# iSCSI initiator timers (restart required)
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Services\iScsiPrt\Parameters' `
-Name LinkDownTime -Value 60 -Type DWord
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Services\iScsiPrt\Parameters' `
-Name MaxRequestHoldTime -Value 300 -Type DWord
Run the cluster settings one time on any cluster node.
(Get-Cluster).SameSubnetThreshold = 20
(Get-Cluster).CrossSubnetThreshold = 30
(Get-Cluster).RouteHistoryLength = 30
Restart each host after you apply the settings.
Verifying the Settings
Confirm the values after each host restarts. Windows accepts a registry write to an incorrect location without an error, so verify the values rather than assume they applied.
Get-MPIOSetting
Get-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Services\disk' TimeOutValue
Get-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Services\iScsiPrt\Parameters' `
LinkDownTime, MaxRequestHoldTime
Get-Cluster | Select-Object SameSubnetThreshold, CrossSubnetThreshold, RouteHistoryLength
In Get-MPIOSetting output, the path recovery settings appear as UseCustomPathRecoveryTime and CustomPathRecoveryTime.
Validating in a Maintenance Window
Test the configuration after all hosts restart.
First, click Initiate Failover on the TrueNAS web interface for the active controller.
Confirm that virtual machines continue to run and that Get-ClusterSharedVolume reports the Cluster Shared Volumes online throughout.
Next, issue a power reset to the active controller from the out-of-band management interface. Expect a longer pause than the controlled test, but confirm that virtual machines do not crash and the Cluster Shared Volumes stay online.
Finally, fail back through the web interface and confirm the same results.
Notes and Caveats
These values trade fast detection of a genuine path failure for tolerance during a failover. They do not suit environments where rapid path-failure detection matters more than continuity.
A large pool with many datasets, large deduplication tables, or slow drives can take longer to import than the 300-second envelope.
Measure the worst-case failover time for your own system, then size PDORemovePeriod, TimeOutValue, and MaxRequestHoldTime together to exceed it by at least 50 percent.
These settings do not remove the I/O pause during a failover.
They reduce the chance that Hyper-V treats the pause as a permanent loss of the path.
If a failover occurs before you apply them and virtual machines pause, recovery might require a storage rescan on each host with Update-HostStorageCache or a restart of the affected host.
Entra Domain Services (Azure DS)
Organizations can use Microsoft Entra Domain Services (formerly Azure Active Directory Domain Services) to manage users and groups by connecting TrueNAS to an Azure domain and joining the managed directory.
Recommended best practice for increased security and flexible administration is to synchronize Entra ID with an on-premises active directory domain . However, some organizations prefer to use cloud-only domain services. This tutorial outlines how to join TrueNAS to an Entra ID without an on-premises domain.
When you integrate third-party software or services, data can go to a third-party commercial vendor not directly affiliated with TrueNAS. You configure and maintain third-party services. TrueNAS does not provide support for them. Consult third-party vendor documentation, support, and/or bug reporting procedures for any functionality issues in third-party software.
Microsoft Entra Domain Services pricing is based on SKU tier, which is selected based on auth load and object counts. These are guidelines for selecting a SKU, not hard limits. Pricing can be obtained through the Azure Pricing Calculator or a sales representative. The following links offer general pricing information:
Please refer to Microsoft web resources or contact a Microsoft sales representative to discuss the best option for your use case before deploying this in your TrueNAS system.
Preparing Entra Domain Services
To join TrueNAS to Entra ID domain services, you need an active Azure account with Entra ID and Entra Domain Services enabled and configured as described in Microsoft documentation .
After initial configuration of the domain:
In the Entra admin center, go to the Microsoft Entra Domain Services Overview tab for your managed domain.
Record the domain name. Click Properties under Settings and record the IP Address on virtual network addresses. Save these for later.
Go to Security Settings and configure as shown.
Create a site-to-site VPN gateway.
Entra ID domain services uses hard-coded network addresses and a bundled DNS server, so a VPN is needed to ensure proper DNS resolution. There are numerous possible solutions for this purpose. The TrueNAS team does not suggest or support a specific third-party VPN service. For one option, see Tutorial: Create a site-to-site VPN connection in the Azure portal from Microsoft.
Configuring TrueNAS
Edit network configuration to enable TrueNAS to reach the Entra ID domain services instance and then join the domain.
Configure network connections. Go to Network and click Settings on the Global Configuration widget to open the Edit Global Configuration screen.
Enter the domain name from Entra ID domain services in Domain.
Enter the Entra IP Address on virtual network, recorded above, as a nameserver to route connections to the Entra domain services DNS server.
Confirm connectivity. Connect to a local TrueNAS shell or SSH session and enter the
ping EntraDomaincommand, where EntraDomain is the domain name entered above. Verify the ping is successful.Join the domain.
a. Go to Credentials > Directory Services and click Configure Active Directory to open the Active Directory screen.
b. Enter the Entra domain name in Domain Name and the administrator account credentials in Domain Account Name and Domain Account Password.
c. Select Enable to attempt to join the domain immediately after saving the configuration.
d. Click Save.
TrueNAS can take a few minutes to populate directory information after configuration. To check the join progress, open the assignment Task Manager in the upper-right corner. TrueNAS displays any errors during the join process in the Task Manager.
Verify domain users and groups are available.
Go to Datasets and select any existing non-root dataset from the dataset tree table. Click Edit on the Permissions widget to open the permissions edit screen for the dataset.
Use the User and Group dropdown menus to ensure domain accounts are present.
































































































