Skip to content

File Sharing NFS

gitsync edited this page Nov 17, 2026 · 3 revisions

NFS exports let Linux and macOS clients mount datasets directly over the network.

NFS Shares page

Creating an export

New NFS Export

Click + New Share and set:

Field Description
Path The dataset mountpoint to export (or a MergerFS union). The folder must exist.
Clients One row per client, each Read/write or Read-only. A client is * (any host), an IP (10.128.8.103), a subnet (10.128.8.0/24), a host name or wildcard (*.lan), or an @netgroup.
Root access Squash root (default, safest): the client's root acts as an anonymous user. No root squash: the client's root stays root (Kubernetes, CSI drivers). Squash all users: every client user becomes the anonymous user.
sync / no_subtree_check sync acknowledges writes only after they reach disk (safer; off = async, faster). no_subtree_check is recommended.
Advanced insecure (clients on ports above 1024: macOS Finder, some containers), crossmnt (also export the datasets mounted below the path), anonuid / anongid (who squashed users become, default 65534).
Comment Optional description

The portal writes /etc/exports and re-exports automatically. Individual exports can be disabled without deleting their configuration.

A share with No root squash on a * client shows a warning: any machine that can reach the server can then read, change or delete all its files as root. List your clients or their subnet instead.

Kubernetes / CSI

For csi-driver-nfs, nfs-subdir-external-provisioner, KubeVirt / CDI and similar:

  1. In the share, click Kubernetes / CSI preset (no root squash, sync, no_subtree_check) and list your nodes or their subnet as clients.
  2. Turn on Trust client groups: while it is off, the share dialog offers it when you pick the preset or No root squash (or use Server settings). Pods that get write access through fsGroup (a supplementary group, e.g. CDI disk imports) are refused without it.

The StorageClass uses the export path as its share parameter:

parameters:
  server: 192.168.1.10
  share: /mnt/tank/k8s

Server settings

Server settings on the NFS page apply to every share:

Setting Description
Trust client groups Uses the groups the client sends with each request (manage-gids = n) instead of looking the user up on the NAS. Needed for Kubernetes fsGroup. Trade-off: users in more than 16 groups have the extra ones ignored.
Server threads Number of nfsd threads (empty = the distribution's default). Raise it for many busy clients.
Serve NFSv4 only Turns NFSv3 off.

ZNAS keeps these in its own file, /etc/nfs.conf.d/zfsnas.conf (the distribution's /etc/nfs.conf is not edited), and re-applies it at every start, so they also survive reboots of the USB appliance.

USB appliance images before 26.04.1-6 cannot serve NFSv4 (clients fall back to NFSv3 on their own, so shares still work). The NFS page says so, and Serve NFSv4 only stays off until the image is upgraded.

Active sessions

The page shows currently connected NFS clients.

Mounting from a client

Linux:

sudo mount -t nfs <server-ip>:/mnt/tank/backups /mnt/nas

macOS:

sudo mount -t nfs <server-ip>:/mnt/tank/backups /Volumes/nas

fstab entry:

192.168.1.10:/mnt/tank/backups  /mnt/nas  nfs  defaults  0  0

File Browser

Every export row's ⋮ menu includes Browse Files. See File Browser.

SMB vs NFS vs iSCSI

Feature SMB NFS iSCSI
Protocol layer File-level File-level Block-level
Primary clients Windows, macOS, Linux Linux, macOS Hypervisors, databases
Authentication Username/password IP-based allow list IQN-based
Use case General file sharing Unix workloads, backups VMs, databases, raw block
ZFS object Dataset Dataset ZVol

Clone this wiki locally