Cannot mount NFS share from new installation after migrating from FreeBSD

dkd6

Cadet
Joined
Sep 30, 2021
Messages
2
Hi,

First, I'm sorry if an answer if posted elsewhere - I did my best to research other threads on this forum and elsewhere and could not find a solution.

I have installed TrueNAS as a replacement to a previous FreeBSD installation on the same server. I imported the pre-existing pool and am now trying to share it.

I tried using both NFSv4 (which was working on FreeBSD) and NFSv3.


When NFSv4 is set, the clients complain about an unsupported protocol (IP's are generalized):

Code:
mount.nfs: trying text-based options 'vers=4.2,addr=10.0.0.100,clientaddr=10.0.0.101'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'vers=4.1,addr=10.0.0.100,clientaddr=10.0.0.101'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'vers=4.0,addr=10.0.0.100,clientaddr=10.0.0.101'
mount.nfs: mount(2): Protocol not supported'


NFSv4 was working previously, from the same clients that now display this message.

I also tried NFSv3, which denies access:
Code:
mount.nfs: trying text-based options 'addr=10.0.0.100
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 10.0.0.100 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 10.0.0.100 prog 100005 vers 3 prot UDP port 634
mount.nfs: mount(2): Permission denied
mount.nfs: access denied by server while mounting 10.0.0.100:/path/to/share


I'm not an expert with NFS, but I did notice some things:

  • /etc/exports is empty, even though I set the shares in the GUI. I'm not sure if this is normal
  • The sharenfs property on the dataset I'm trying to share was set to off - I enabled it but it did not help
  • Filesystem is owned by root - here are the permissions
Code:
# file: /path/to/share
# owner: root
# group: wheel
         everyone@:rwxpDdaARWcCos:fd-----:allow
            owner@:rwxpDdaARWcCos:fd-----:allow
            group@:rwxpDdaARWcCos:fd-----:allow
group:builtin_users:rwxpDdaARWc--s:fd-----:allow
         everyone@:--------------:fd-----:allow


I set it to 777 for testing

  • I had both the network and the client whitelisted in the share options - I also tried using default settings
The clients and the server are on the same network.

I must be doing obviously wrong, but I cannot figure out what it is - especially since setting it up was a breeze under FreeBSD.

Any help would be greatly apprecicated.

Thanks!
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Are you using TrueNAS Scale or Core? I'll assume the later.

1. An empty /etc/exports file is not normal .
2. DO NOT set the sharenfs property on. Truenas does not use it.

Check the NFS service is running and in your share definition you probably want to set "Maproot user" to "root" and "Maproot group" to "wheel". It looks like your shared dataset has been setup to share by SMB.
 

dkd6

Cadet
Joined
Sep 30, 2021
Messages
2
Hi,
Thank you so much for answering.
I removed the sharenfs property and rebooted, which solved the issue.

I completely forgot I set the datasets to share SMB - could you please tell me how you figured it out from the information I posted so I can prevent these errors in the future?

Thanks again!
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Top