Just setup my new Rocky server and after adding NFS exports I cannot mount them from a client that happily mounted these exports on the previous server.
# mount -t nfs4 rocky.soho.lan:/disk3/stuff /mnt
mount.nfs4: No route to host
# ping rocky.soho.lan
PING rocky.soho.lan (10.11.12.13) 56(84) bytes of data.
64 bytes from rocky.soho.lan (10.11.12.13): icmp_seq=1 ttl=64 time=0.372 ms
64 bytes from rocky.soho.lan (10.11.12.13): icmp_seq=2 ttl=64 time=0.335 ms
Is there an NFS log file?
How does one go about debugging NFS?
Got a WireShark capture and it shows the client requests are going completely unanswered. This might suggest a firewall is involved but the RedHat 8 documentation section 4.8 Installing NFS doesn’t say anything about a firewall. There is discussion about firewalls but in ways that seem to be unrelated to NFSv4 (such as wrt rpcbind which I get the impression is specific to NFSv3).
I’m guessing there is some command that I have to run to add firewall rules for NFSv4 but I’m struggling to find something about it in the RedHat docs.
Ideas?
Mike
UPDATE:
For posterity, this appears to be the basic minimal NFSv4-only procedure:
I seem to have the same problem on Rocky 8.7,
attempting to implement a NFSv4/tcp only server.
Problem: it will never connect, if the initial attempt after a {NFS-client host | NFS-server host | nfs-service restart} is done as NFSv4.
Instead it gets stuck at the second line of the mount output (“mount.nfs4: trying text-based options …”) - waiting forever.
No logging, no activity, nothing…
But: NFSv3 works.
My debugging attempts:
disabling SELinux,
switching off firewall,
relaxing permissions on share and in exports conf to the max
but nothing of this helped.
The strange thing here:
pings always worked at the same time, and
telnet to 2048 also worked perfectly fine as well!
So definitely not a network issue for me.
After one day of debugging it turned out for me that the following ALWAYS works:
Start the initial (after NFS client host or NFS server host had rebooted) NFS connection using NFSv3.
Then disconnect NFSv3 and reconnect as NFSv4 (4.0-4.2 are all fine in the same way).
Works always for me.
This procedure only has to be repeated if one of both the servers (or the nfs-server daemon) has been restarted.
Unfortunately, logging in NFS is a night…ly thing.
Toggling the “debug” flag in nfs.conf always causes “Invalid debug facility: 1” for me, but no logging still… If i am right, it takes tracing and tcpdump to dig deeper.
Does my observation rings a bell for anyone, which would help to track down the actual problem?
I would highly appreciate this!
Because i have to implement this for nodes which have to be mass deployed in an automatic fashion.
And locking down to 2049 and tcp is one of the major benefits for me, but also performance.
ammending my previous post: in the meantime i found out that no matter how restrictive i attempt to lock NFS to v4, the mount client will apparentl ALWAYS keep starting the server conenction via rpc.
This keeps stalling, with the following logs: