This is the multi-page printable view of this section. Click here to print.
Integrations
- 1: AWS Images (Obsolete)
- 2: Asigra Plugin
- 3: Containers
- 4: CSI Driver
- 5: Nextcloud
- 6: OpenStack Cinder Driver
- 7: Proxmox VE Storage Plugin
- 8: Veeam
- 9: Veeam Software Appliance
- 10: Veeam Infrastructure Appliance
- 11: Veeam Immutability
- 12: VMware
- 13: Hyper-V
- 14: Entra Domain Services (Azure DS)
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.


























































































