Ubuntu 22.04 nfs newest version only available for exports ...?

I've updated to ubuntu 22.04 and need to file share to a client that will only respond if the export happens with NFS3. The status check says the NFS version is the newest i.e. version 4

How do I get the export to happen using version 3?

Any suggestions much appreciated, ..

Hi @novitiate,

you could try to replace the default entry RPCNFSDCOUNT=8 by RPCNFSDCOUNT="--no-nfs-version 4 8" in /etc/default/nfs-kernel-server, then systemctl restart nfs-kernel-server.

The option names and their usage by nfsd are quite confusing. The service uses $RPCNFSDARGS:

$ grep ExecStart= /etc/systemd/system/multi-user.target.wants/nfs*
ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS

, but setting that var in /etc/default/nfs-kernel-server has no effect. Instead the var is set in the env file:

$ grep RPCNFSDARGS /run/sysconfig/nfs-utils
RPCNFSDARGS=" --no-nfs-version 4 8"

which is defined in the service config:

$ grep EnvironmentFile= /etc/systemd/system/multi-user.target.wants/nfs*
EnvironmentFile=-/run/sysconfig/nfs-utils

See man rpc.nfsd also.

Many thanks, I'm really stuck here. I'll try your suggestions and see how I get on

p.s. like the screenname!

do you mean like this:

# Number of servers to start up
RPCNFSDCOUNT="--no-nfs-version 4"

# Runtime priority of server (see nice(1))
RPCNFSDPRIORITY=0

# Options for rpc.mountd.
# If you have a port-based firewall, you might want to set up
# a fixed port here using the --port option. For more information, 
# see rpc.mountd(8) or http://wiki.debian.org/SecuringNFS
# To disable NFSv4 on the server, specify '--no-nfs-version 4' here
RPCMOUNTDOPTS="--manage-gids --no-nfs-version 4"

# Do you want to start the svcgssd daemon? It is only required for Kerberos
# exports. Valid alternatives are "yes" and "no"; the default is "no".
NEED_SVCGSSD=""

# Options for rpc.svcgssd.
RPCSVCGSSDOPTS=""

you missed the 8, that number is required.

like this?

Number of servers to start up

RPCNFSDCOUNT=8"--no-nfs-version 4"

please look at my post.

Sorry, I see what you mean

Unfortunately no joy here. I was wondering if it defaults to another version of nhs 4, and if there is a way to set it to version 3?

nfs-kernel-server is already the newest version (1:2.6.1-1ubuntu1.2).
The following packages were automatically installed and are no longer required:
linux-headers-5.15.0-69 linux-headers-5.15.0-69-generic linux-image-5.15.0-69-generic linux-modules-5.15.0-69-generic linux-modules-extra-5.15.0-69-generic
Use 'sudo apt autoremove' to remove them.
0 to upgrade, 0 to newly install, 0 to remove and 24 not to upgrade.

I think you are on the wrong track now. Why should disabling nfs v4 have an impact if the client only requests nfs v3? Is there a known bug??

I think the problem is that the server's rpcinfo wrongly advertises nfs v3 over udp but in reality only serves nfs v3 over tcp (this is a bug).
This is no problem with recent Linux clients where nfs over udp is disabled.
On older Unix clients you should enforce a tcp mount with the mount option proto=tcp
Mount command:
mount -o proto=tcp ...
fstab: in the options column, replace a - with the proto=tcp, or append it with a comma to an existing option, e.g.
rw,proto=tcp

Thanks for the suggestion.

Just to clarify I would add this mount command to the client (SGI2 computer) ?

Yes.
The mount command does a mount. This is good for testing.
During system boot a "mountall" routine generates mount commands from the fstab entries.

Hi there,

Here is a screenshot of the old SGI2 computer stab. I've been warned to be very careful about what I enter here. Where would you recommend I add the option

should it be after the last rw in the last line i.e. vers=3,rw,proto=tcp, 0 0

Yes, vers=3,rw,proto=tcp in column 4 will work.
No trailing comma.

On the command line you can use an abbreviated mount command
mount /workflow
It will take the remaining things (mount from, options) from the fstab.

Oh my goodness, it works!

I can't thank you enough. I had lost hope, believing I was working with an old computer, I thought the compatibility problem was fatal, but clearly not.

Thank you!

Great!
I did a best guess, have no access to an Ubuntu currently.
In your previous post I saw that "rpcinfo -p" still advertises udp for nfs version 3. Which is a bug, because it is documented that kernel support for udp has been dropped.

As stated previously, you can add another mount option bg (again joined with a comma), so your Unix box will still boot up quickly when your Linux box is down.

Oh, thanks for this as well.

Just to confirm as all I know commas are where you insert options. In the last line of the UNIX (SGI2) fstab where I added your last instruction, I now change it to this

ver=3,rw,proto=tcp,bg 0 0

or do I need a new line?

Yep, column 4 should have vers=3,rw,proto=tcp,bg
You can read about fstab in the man pages:

man fstab