mount command not working

In our network we use a NAS system for backup. on my Leap 15.1 computers mounting the system is no problem using the command

mount -t nfs 192.168.2.2:/mnt/md1/ulimnt /home/uli/ulimnt

Now I tried the same with my Tumbleweed computer and I get the following result:

linux-4skc:~ # mount -t nfs 192.168.2.2:/mnt/md1/ulimnt /home/uli/ulimnt
mount.nfs: Protocol not supported
linux-4skc:~ # mount -v 192.168.2.2:/mnt/md1/ulimnt /home/uli/ulimnt
mount.nfs: timeout set for Sun Feb  9 14:17:34 2020
mount.nfs: trying text-based options 'vers=4.2,addr=192.168.2.2,clientaddr=192.168.2.59'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'vers=4,minorversion=1,addr=192.168.2.2,clientaddr=192.168.2.59'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'vers=4,addr=192.168.2.2,clientaddr=192.168.2.59'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'addr=192.168.2.2'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 192.168.2.2 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 192.168.2.2 prog 100005 vers 3 prot UDP port 933
mount.nfs: Protocol not supported
linux-4skc:~ #

Now the set-up is identical with the mount point in the home directory. why is it working on Leap and not on Tumbleweed?

Hi
Did you see this thread and the ML links?
https://forums.opensuse.org/showthread.php/539034-NFS-share-is-not-working-anymore-polkitd-Unregistered-Authentication-Agent-for-unix-service

Thanks, malcolmlewis, I had a quick look at that link but it didn’t help me. There is the part NIS/NFS servers don’t start any more but there is no solution/work around that I can see/understand. Here I don’t use NIS only NFS to mount this NAS unit.

Hi
Seems to be complaining about the protocol… On the Leap 15.1 system can you run with the verbose option and compare to the Tumbleweed output?

on the LEAP15.1 the verbose mounting looks like this:

linux-tl1r # mount -v 192.168.2.2:/mnt/md1/ulimnt /home/uli/ulimnt
mount.nfs: timeout set for Sun Feb  9 15:52:32 2020
mount.nfs: trying text-based options 'vers=4.2,addr=192.168.2.2,clientaddr=192.168.2.24'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'vers=4.1,addr=192.168.2.2,clientaddr=192.168.2.24'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'vers=4.0,addr=192.168.2.2,clientaddr=192.168.2.24'
mount.nfs: mount(2): Protocol not supported
Created symlink /run/systemd/system/remote-fs.target.wants/rpc-statd.service → /usr/lib/systemd/system/rpc-statd.service.
mount.nfs: trying text-based options 'addr=192.168.2.2'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 192.168.2.2 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 192.168.2.2 prog 100005 vers 3 prot UDP port 933
linux-tl1r:

A quick summary:

Look for “/etc/nsswitch.conf” and “/etc/nsswitch.conf.rpmnew”.

Compare them (using “diff”), and merge as appropriate.

In my case, I have never modified “nsswitch.conf” so I just replaced

mv /etc/nsswitch.conf.rpmnew /etc/nsswitch.conf

You might have to reboot for it to take effect.

Thank you, nrickert, this is working now. I had a look previously at those files and to me it looked as if the file nsswitch.conf.rpmnew had more often nis (which I don’t use) listed. But I renamed nsswitch.conf to nsswitch.conf.old just to be sure and then renamed nsswitch.conf.rpmnew to nsswitch.conf and now mounting is no problem.
A related question - the NAS is rather old and cannot be updated and it only switched on for backups. It still has the 2.something kernel and only works with NFSv3. Is there a way to have the mount command using NFSv3 only that it does not try v 4.2, 4.1, 4.0 before mounting with the v3?
Cheers
Uli

Good to hear.

The background is that some files have been moved from “/etc” to “/usr/etc”. The “usrfiles” entry in “nsswitch.conf” tells software to look in “/usr/etc”.

A related question - the NAS is rather old and cannot be updated and it only switched on for backups. It still has the 2.something kernel and only works with NFSv3. Is there a way to have the mount command using NFSv3 only that it does not try v 4.2, 4.1, 4.0 before mounting with the v3?
Cheers

I don’t have an answer for that.

Isn’t the file system type for NFS version 4 ‘nfs4’? Thus when you use file system type ‘nfs’ it will not use version 4, but version 3 at the highest.

I am not sure about this:

uli@linux-4skc:~> man nfs4
No manual entry for nfs4

But with the next backup I will try with the verbose command. Thanks hcvv

nfs4 is the correct type to use for version 4, otherwise use nfs

https://doc.opensuse.org/documentation/leap/archive/42.1/reference/html/book.opensuse.reference/cha.nfs.html#sec.nfs.configuring-nfs-clients

Here is what happens:

linux-4skc:~ # mount -t nfs -v 192.168.2.2:/mnt/md1/ulimnt /home/uli/ulimnt
mount.nfs: timeout set for Mon Feb 10 12:52:55 2020
mount.nfs: trying text-based options 'vers=4.2,addr=192.168.2.2,clientaddr=192.168.2.59'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'vers=4,minorversion=1,addr=192.168.2.2,clientaddr=192.168.2.59'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'vers=4,addr=192.168.2.2,clientaddr=192.168.2.59'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'addr=192.168.2.2'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 192.168.2.2 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 192.168.2.2 prog 100005 vers 3 prot UDP port 933

I just use nfs and it starts trying from v4.2 downwards

Interesting. I am using autofs and used nfs for version 3 mounts. It recently stopped working so I switched to ‘nfs4’ with the NAS nfs4 mount point and everything worked.

I did come across the following document on specifying nfs in fstab and it explains what you are seeing on the command line.

https://www.systutorials.com/docs/linux/man/5-nfs/

Specifically, “The fstype field contains “nfs”. Use of the “nfs4” fstype in /etc/fstab is deprecated.” and

**nfsvers=**n
The NFS protocol version number used to contact the server’s NFS service. If the server does not support the requested version, the mount request fails. If this option is not specified, the client negotiates a suitable version with the server, trying version 4 first, version 3 second, and version 2 last.

mount -o vers=3 ...
man 5 nfs

I thought that applies only for the fstab file

OK arvidjaar, I tried it out and you are correct:

linux-4skc:~ # mount -v -t nfs -o vers=3 192.168.2.2:/mnt/md1/ulimnt /home/uli/ulimnt
mount.nfs: timeout set for Mon Feb 10 17:53:17 2020
mount.nfs: trying text-based options 'vers=3,addr=192.168.2.2'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 192.168.2.2 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 192.168.2.2 prog 100005 vers 3 prot UDP port 933
linux-4skc:~ #

Thank you.

There is a direct relation between the -o option in the mount command and the options field in the fstab. Remember that fstab is in fact only a configuration file for the mount command.

Hm, it is a bit late reaction, but nobody talked about

man nfs4

It is

man nfs

and that will inform you about the versions.

BUT, my information is outdated, as you will have found out now through the other posts here.
It is no more the type nfs vs. nfs4, but type nfs and the nfsvers= option.
Yes, things change faster then light.
But when you use YaST > Network Services > NFS Client, you will see that the version is to be filled in and I assume the correct fstab entry will be created.