This will be a long post, so find a summary of what works/doesn’t work at the bottom.
The setup:
-
TrueNAS server (24.10)
- Interface 1:
- 1gbps
- default gateway
- connection to LAN/WAN
- Interface 2:
- 10gpbs and jumbo frames
- dedicated direct link with xcp-ng server
- No routing
- IP: 10.0.0.1/25
- Interface 1:
-
XCP-NG server (8.2.1)
- Interface 1:
- 10gbps
- default gateway
- connection to LAN/WAN
- Interface 2:
- 10gpbs and jumbo frames
- dedicated direct link with TrueNAS
- No routing
- IP: 10.0.0.2/25
- Has TrueNAS NFS share mounted as SR for VM storage
- Interface 1:
-
Ubuntu 24.04 server
- Running as VM on XCP-NG server
- Interface 1 - enX0 (via XCP-NG):
- 10gpbs
- default gateway
- connection to LAN/WAN
- Interface 2 - enX1 (via XCP-NG):
- 10gpbs and jumbo frames
- dedicated direct link with TrueNAS
- No routing
- IP: 10.0.0.5/25
I’m encountering a very strange issue when mounting a nfs v4 share through systemd mount AND through the dedicated/direct link (enX1). Mounting it through enX0 works fine.
With NFS v3, it works flawless no matters the interface, but the moment I want to use NFS v4 through the direct uplink (enX1), I can’t seem to make it work.
On TrueNAS I have disabled nfs version 3, and only enabled version 4 (when v3 is enabled, it works only when I specify to not use v4).
Doing it directly through the CLI on Ubuntu server works perfectly fine (no matter the interface or version):
mount -t nfs4 10.0.0.1:/mnt/data-dock/storage/minio /mnt/data -o defaults,_netdev
My systemd mount file looks as following:
[Unit]
Description=Mount the NFS share for data storage
After=network.target
[Mount]
What=10.0.0.1:/mnt/data-dock/storage/minio
Where=/mnt/data
Type=nfs4*
Options=defaults,_netdev
[Install]
WantedBy=multi-user.target
* NFS when v3 support is enabled
The logs on the Ubuntu server give me a bit more information:
mount.nfs: access denied by server while mounting 10.0.0.1:/mnt/data-dock/storage/minio
From this I assume that systemd mount for some reason falls back to version 3 (even when v4 is specified) on the enX1 interface and thus is getting the access denied. Even when v3 support is enabled on TrueNAS, but the systemd mount specifies v4, it will not work.
I have tried it with Ubuntu, Rocky linux 9, Debian bookworm and all have the same issue.
I have set the permissions on the NFS share as wide as possible and all clients can connect to it to narrow down possible causes.
TL;DR:
What Works:
- NFS v3 (if v3 support is enabled on TrueNAS):
- Systemd mount (on both interfaces)
- Mounting NFS via CLI works (on both interfaces)
- NFS v4 Mount:
- Mounting NFS v4 manually via the CLI (on both interfaces)
- Systemd mount (on both interfaces)
What Does Not Work:
- NFS v4 (through systemd):
- Systemd mount via direct uplink (enX1). Fails with the error:
mount.nfs: access denied by server while mounting 10.0.0.1:/mnt/data-dock/storage/minio
- Systemd mount via direct uplink (enX1). Fails with the error:
Thank you for reading through everything