TrueNAS CORETrueNAS CORE Version Documentation
This content follows the TrueNAS CORE 13.0 releases. Use the Product and Version selectors above to view content specific to different TrueNAS software or major version.

NFS Share Creation

Creating a Network File System (NFS) share on TrueNAS makes a lot of data available for anyone with share access. Depending on the share configuration, it can restrict users to read or write privileges.

NFS treats each dataset as its own file system. When creating the NFS share on the server, the specified dataset is the location that client accesses. If you choose a parent dataset as the NFS file share location, the client cannot access any nested or child datasets beneath the parent.

If you need to create shares that include child datasets, SMB sharing is an option. Note that Windows NFS Client versions currently support only NFSv2 and NFSv3.

Adding an NFS Share Dataset

Before creating an NFS share, create the dataset you want the share to use for data storage.

It is best practice to use a dataset instead of a full pool for SMB or NFS shares. Sharing an entire pool makes it more difficult to later restrict access if needed.

We recommend creating a new dataset with the Share Type set to Generic for the new NFS share.

Creating an NFS Share

Go to Sharing > Unix Shares (NFS) and click ADD.

Add NFS Share
Figure 1: Add NFS Share

Use the file browser to select the dataset to share. Enter an optional Description to help identify the share. Clicking SUBMIT creates the share. There is the option to select ENABLE SERVICE while creating the share to start the service. With this option selected, the service starts automatically after any reboots.

Enable NFS Service
Figure 2: Enable NFS Service

If you wish to create the share but not immediately enable it, select CANCEL.

NFS Enabled
Figure 3: NFS Enabled

NFS Share Settings

See Sharing NFS Screen for more information on NFS share settings.

To edit an existing NFS share, go to Sharing > Unix Shares (NFS) and click > Edit. The options available are identical to the share creation options.

Configure the NFS Service

To begin sharing the data, go to Services and click the NFS toggle. If you want NFS sharing to activate immediately after TrueNAS boots, set Start Automatically.

NFS service settings can be configured by clicking (Configure).

See Service NFS screen

Unless a specific setting is needed, it is recommended to use the default settings for the NFS service. When TrueNAS is already connected to Active Directory, setting NFSv4 and Require Kerberos for NFSv4 also requires a kerberos keytab.

Connecting to the NFS Share with a Linux/Unix OS

The NFS share connects with various operating systems. The recommendation is to use a Linux/Unix operating system. Using a Linux/Unix operating system, download the nfs-common kernel module. Do this using the package manager of the installed distribution. For example, on Ubuntu/Debian, enter sudo apt-get install nfs-common in the terminal.

After installing the module, connect to an NFS share by entering sudo mount -t nfs {IPaddressOfTrueNASsystem}:{path/to/nfsShare} {localMountPoint}, where {IPaddressOfTrueNASsystem} is the IP address of the remote TrueNAS system that contains the NFS share, {path/to/nfsShare} is the path to the NFS share on the TrueNAS system, and {localMountPoint} is a local directory on the host system configured for the mounted NFS share. For example, sudo mount -t nfs 10.239.15.110:/mnt/pool1/photoDataset /mnt mounts the NFS share photoDataset to the local directory /mnt.

By default, anyone that connects to the NFS share only has the read permission. To change the default permissions, edit the share. Go to Advanced Options and change the Access settings.

ESXI 6.7 or later is required for read/write functionality with NFSv4 shares.

Related Content