TrueNAS - Custom Mounts

Last verified: October 2026 against the TrueNAS Community Edition 25.10 documentation (Init/Shutdown Scripts). See Sources.

TrueNAS does not keep manual mount commands or /etc/fstab edits across reboots. To mount NFS shares from another server (for example a Synology or another NAS) every time TrueNAS starts, run a mount script as a Post Init Init/Shutdown script. Use this when apps or tasks on TrueNAS need data that lives on another NAS.

Prerequisites

1) Create the mount script

Store the script on a pool so it survives updates, for example /mnt/<POOL>/scripts/custom_mount.sh:

#!/bin/bash
# Mount NFS exports from another NAS after TrueNAS boots.

mount_nfs() {
  local src="$1" dst="$2"
  mkdir -p "$dst"
  mountpoint -q "$dst" || mount -t nfs "$src" "$dst"
}

mount_nfs <NFS_SERVER>:/<EXPORT_1> /mnt/<POOL>/<DATASET_1>
mount_nfs <NFS_SERVER>:/<EXPORT_2> /mnt/<POOL>/<DATASET_2>

Make it executable. The Init/Shutdown script must have the execute bit set:

chmod +x /mnt/<POOL>/scripts/custom_mount.sh

2) Add it as a Post Init script

  1. Go to System > Advanced Settings. On the Init/Shutdown Scripts widget, click Add.
  2. Description: for example Mount NFS shares.
  3. Type: Script, then select /mnt/<POOL>/scripts/custom_mount.sh. (Command with the script path also works.)
  4. When: Post Init.
  5. Enabled: checked.
  6. Timeout: the default is 10 seconds. Raise it (for example to 60) if you mount several shares or the remote NAS is slow to answer.
  7. Click Save.

3) Verify

Run the script once by hand, or reboot TrueNAS, then check the mounts:

sudo /mnt/<POOL>/scripts/custom_mount.sh
findmnt -t nfs,nfs4
df -h | grep <NFS_SERVER>

Each share should be listed at its /mnt/<POOL>/<DATASET> path.

Troubleshooting / notes

Sources


Revision #2
Created 12 October 2026 12:16:21 by Admin
Updated 12 October 2026 12:20:29 by Admin