Coexistence of both NFS v3 and v4 clients?

wyang

Dabbler
Joined
Jul 8, 2020
Messages
24
Greetings,

My server configuration
Type: SuperMicro SYS-6029U-E1CR25M
Processor: Intel(R) Xeon(R) Gold 6226R CPU @ 2.90GHz
Memory: 12 x 32GB Samsung M393A4K40DB2-CVF
Storage: 2 x 256GB NVMe SSD, INTEL SSDPEKKA256GB; 12 x 16TB HDD, Seagate ST16000NM001G-2KK103

TrueNAS-12.0-U7
- Boot: 1 x 2-way mirror (SSD)
- Pool: 2 x 6-wide RAIDZ2 data VDEVs

In NFS service settings, Enable NFSv4 is set. Two NFS shares are created for two clients, respectively.

Can clients mount these shares with NFS v3?

Can client1 mount its NFS share with type=nfs4 vers=4.1, while client2 mount its NFS share type=nfs vers=3?

Thank you.
 

wyang

Dabbler
Joined
Jul 8, 2020
Messages
24
In /var/log/messages, it keeps reporting

nfsrv_cache_session: no session IPaddr=<IP of client1>
nfsrv_cache_session: no session IPaddr=<IP of client2>

could this be caused by the coexistence of NFS v3 and v4 clients?
 

dipole

Cadet
Joined
Jun 13, 2016
Messages
2
I've read that it is possible to enable both in /etc/rc.conf in FreeBSD:
in Ubuntu:

I don't know about TrueNAS.

I am also seeing the same 2 successive errors in dmesg, but for the same client IP address. This occurs in both 12.0-U7 and 12.0-U8.

Code:
root@rhino[~]# dmesg | grep nfsrv_cache_session
nfsrv_cache_session: no session IPaddr=192.168.0.21
nfsrv_cache_session: no session IPaddr=192.168.0.21


Adding the -v option to the mount command on the client will show which protocols the client tests and which one it finally connects with:

Code:
$ sudo mount -vvv -t nfs4 -o proto=tcp,port=2049 rhino:/media/ /mnt/rhino/media/
mount.nfs4: timeout set for Fri Feb  4 13:00:09 2022
mount.nfs4: trying text-based options 'proto=tcp,port=2049,vers=4.2,addr=192.168.0.250,clientaddr=192.168.0.21'
mount.nfs4: mount(2): Protocol not supported
mount.nfs4: trying text-based options 'proto=tcp,port=2049,vers=4,minorversion=1,addr=192.168.0.250,clientaddr=192.168.0.21'
rhino:/media/ on /mnt/rhino/media type nfs4 (rw,proto=tcp,port=2049)


But I am struggling with the basics of NFSv4 and sec=sys authentication.

In my case, I am not able to ls the mounted directory despite aligning UID's, GID's, and domain. I have not enabled "NFSv3 ownership model for NFSv4".

Code:
$ ls -al /mnt/rhino/
total 1
drwxr-xr-x 3 root       root       19 Feb  3 09:13 .
drwxr-xr-x 5 root       root       45 Feb  3 09:13 ..
drwxr-xr-x 2 4294967294 4294967294  2 Feb  4 12:42 media
$ sudo ls -al /mnt/rhino/media/
ls: reading directory '/mnt/rhino/media/': Input/output error
total 0
$ ls -al /mnt/rhino/media/
ls: reading directory '/mnt/rhino/media/': Input/output error
total 0
 

wyang

Dabbler
Joined
Jul 8, 2020
Messages
24
Thanks @dipole for the reference links.

I don't have any experience with authentication. While creating an NFS share, it is configured Mapall User to root and Mapall Group to wheel. NFS mount works on clients.

I changed all client mounts to NFS v4 and upgraded to 12.0-U8.

In /var/log/messages, it still keeps reporting

nfsrv_cache_session: no session IPaddr=<IP of client1>
nfsrv_cache_session: no session IPaddr=<IP of client2>
 

ramib

Dabbler
Joined
Dec 31, 2019
Messages
41
In NFS service settings, Enable NFSv4 is set. Two NFS shares are created for two clients, respectively.

Can clients mount these shares with NFS v3?

Can client1 mount its NFS share with type=nfs4 vers=4.1, while client2 mount its NFS share type=nfs vers=3?
you should be able to mount both v3 and v4 using the vers= option.
works from linux and Mac
please see the attached images , maybe it helps for the settings.
I had this issue once but don't remember how I fixed it, Sorry
 

Attachments

  • Screenshot 2022-02-04 at 23.49.39.png
    Screenshot 2022-02-04 at 23.49.39.png
    189.9 KB · Views: 561
  • Screenshot 2022-02-04 at 23.49.00.png
    Screenshot 2022-02-04 at 23.49.00.png
    188.2 KB · Views: 546
  • Unable to mount nfs share getting error %22mount.nfs Protocol not supported%22 - Red Hat Custo...pdf
    83.5 KB · Views: 1,382
Last edited:
Top