unable to use nfs client to mount nfs in Ubuntu 22.04

Bug #1970898 reported by Albert Vilella
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
nfs-utils (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

https://askubuntu.com/questions/1405231/unable-to-mount-nfs-on-ubuntu-22-04

I've installed Ubuntu 22.04 on a machine and I am trying to mount an NFS share which has no problems mounting on an array of other Linux Ubuntu machines (21.04, 20.04, 18.04, etc.).

The command we use is:

```
sudo apt install nfs-common # Only required once for installation
sudo mount -t nfs 10.234.123.11:/bfx_share1 /bfx_share1
```

If I do a:
```
sudo showmount -e 10.234.123.11
```
It shows the list of possible mounts, so everything is kosher in that respect.

It's just stuck there, not doing anything. Any ideas? Anything I can do or add to debug the situation? Any other clients not `nfs-common`?

I've installed `nfstrace` and while trying to mount the nfs folder, I kicked it off in another terminal, to obtain the prompt below:

```
## On one terminal
(base) user@LS6-MS-7D04:~$ ping 10.234.123.11
PING 10.234.123.11 (10.234.123.11) 56(84) bytes of data.
64 bytes from 10.234.123.11: icmp_seq=1 ttl=64 time=0.202 ms
64 bytes from 10.234.123.11: icmp_seq=2 ttl=64 time=0.122 ms
64 bytes from 10.234.123.11: icmp_seq=3 ttl=64 time=0.172 ms
^C
--- 10.234.123.11 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2027ms
rtt min/avg/max/mdev = 0.122/0.165/0.202/0.033 ms
(base) user@LS6-MS-7D04:~$ sudo mount 10.234.123.11:/bfx_share1 /bfx_share1

## In the other terminal with nfstrace running

root@LS6-MS-7D04:/home/user# nfstrace -Z user
Log file: nfstrace.log
Read from interface: enp111s0
  BPF filter : port 2049 or port 445
  snapshot len: 65535 bytes
  read timeout: 100 ms
  buffer size : 20971520 bytes
  promiscuous mode: on
  capture traffic : inout
Processing packets. Press CTRL-C to quit and view results.
Detect session 10.234.123.8:902 --> 10.234.123.11:2049 [TCP]
Detect session 10.234.123.8:772 --> 10.234.123.11:2049 [TCP]
10.234.123.8:772 --> 10.234.123.11:2049 [TCP]NULL
        CALL []
        REPLY []
Detect session 10.234.123.8:947 --> 10.234.123.11:2049 [TCP]
10.234.123.8:947 --> 10.234.123.11:2049 [TCP]NULL
        CALL []
        REPLY []

```

Looking at the release notes of Ubuntu 22.04 (Jammy Jellyfish Release Notes):
https://discourse.ubuntu.com/t/jammy-jellyfish-release-notes/24668?_ga=2.137381111.630065420.1651222708-2033241278.1650531954

There is a section:
```
UDP disabled for NFS mounts
Since Ubuntu 20.10 (“Groovy Gorilla”), the kernel option CONFIG_NFS_DISABLE_UDP_SUPPORT=y is set and this disables using UDP as the transport for NFS mounts, regardless of NFS version.

In practice, if you try to use udp, you will get this error:

$ sudo mount f1:/storage /mnt -o udp
mount.nfs: an incorrect mount option was specified

###

NFS server
The NFS server and client packages have finally been updated to the latest upstream version.

All NFS services now read their configuration from /etc/nfs.conf and /etc/nfs.conf.d/*.conf, which is an INI-style configuration file, where each section is about one daemon or aspect of the NFS service. The old /etc/defaults/nfs-* configuration files are still left around, but are unused.

During upgrade, a conversion script is run if the package detects that the /etc/default/nfs-* files have been changed. This script is /usr/share/nfs-common/nfsconvert.py and it will read the options from /etc/defaults/nfs-* and generate /etc/nfs.conf.d/local.conf, which overrides the defaults in /etc/nfs.conf.

If the conversion script fails for some reason, the package installation or upgrade will fail, and the issue will have to be resolved. Please file a bug against nfs-utils in Launchpad 2 if you encounter such a scenario.

A new tool called nfsconf(8) can be used to query the configuration settings of /etc/nfs.conf and /etc/nfs.conf.d/*.conf.

##

the CTDB package was adjusted to work with the new NFS server version shipped in this Ubuntu 22.04

```

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

> It's just stuck there, not doing anything. Any ideas? Anything I can do or add to debug the
> situation? Any other clients not `nfs-common`?

Have you checked firewall rules? Please also check (and attach) /var/log/syslog, the actual output of `showmount -e <server>`, and dmesg recent output.

Changed in nfs-utils (Ubuntu):
status: New → Incomplete
Revision history for this message
John Steele Scott (toojays) wrote :

I was also unable to use NFS mounts since upgrading my client to 22.04. My server is a QNAP running version 5.0.0.1986.

Enabling NFSv4 on the server did not solve the issue.

Adding vers=3 as a mount option on the client lets NFS mounts work again for me.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

> I was also unable to use NFS mounts since upgrading my client to 22.04.

I believe even previous versions of Ubuntu defaulted to NFSv4 on the client when mounting a remote filesystem. From which ubuntu release did you upgrade? You didn't have to force vers=3 in that older release?

Revision history for this message
Jeremy Hunt (jtheh) wrote :

I was having the same issue and noticed this in the tcpdump output

16:15:46.208001 IP host2.812 > host1.nfs: Flags [P.], seq 4841:5005, ack 4301, win 501, options [nop,nop,TS val 4079397255 ecr 3402330946], length 164: NFS request xid 379063175 160 getattr fh 0,2/53
16:15:46.208248 IP host1.nfs > host2.812: Flags [P.], seq 4301:4401, ack 5005, win 189, options [nop,nop,TS val 3402346046 ecr 4079397255], length 100: NFS reply xid 379063175 reply ok 96 getattr ERROR: Request couldn't be completed in time

mounting with -o vers=4.0 worked as a temp workaround, but just updated my Qnap to 5.00.2055 and now I can mount with vers=4.2 with no issues.

Revision history for this message
Andreas Hasenack (ahasenack) wrote (last edit ):

You can also use, on the client, `rpcinfo -s <server>` to see what is supported on the server and which version and if it's via tcp, udp, or both.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for nfs-utils (Ubuntu) because there has been no activity for 60 days.]

Changed in nfs-utils (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.