You are not logged in.

#1 2021-08-11 19:16:58

jjanderson5
Member
Registered: 2016-05-10
Posts: 118

[SOLVED]requested NFS version or transport protocol is not supported

I have 2 PCs recently upgraded to:

Description:    BunsenLabs GNU/Linux 10.5 (Lithium)
Release:        10.5
Codename:       buster

When I try to mount a file system with

mount -t nfs pc1:/mnt/mlib /mnt/mlib

I get the following error message:

mount.nfs: requested NFS version or transport protocol is not supported

My expectation is that the NFS protocol on both machines would be identical and there should not be a protocol error.

I did an internet search and did not find any similar problems to my current issue.

I did see some informaton about using nfsstat to determine the protocol being used. When I ran "nfsstat -c", I got a definitive "v4", in the response.

Unfortunately, when I ran "nfsstat -s", I got stats, but no indication of the NFS version.

Cannot anyone suggest whey there would be a protocol mismatch?

Last edited by jjanderson5 (2021-08-12 17:14:00)

Offline

#2 2021-08-11 20:30:46

twoion
一期一会
Registered: 2015-08-10
Posts: 3,318

Re: [SOLVED]requested NFS version or transport protocol is not supported

So if you're running a NFS server and client both, you need a working server and a working client configuration.

On the NFS server, you need all relevant NFS services running and exports set up. Can you confirm that the server works?

On the client as well, you need all relevant NFS services running and client tools installed.

Just going by face value, if the export is version 3 and the client wants 4, try setting nfsvers=3 as an option to the mount command. Hard to say without having your entire NFS config posted (both server and client).

Offline

#3 2021-08-11 21:28:50

rbh
Moderator
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 1,182

Re: [SOLVED]requested NFS version or transport protocol is not supported

jjanderson5 wrote:
mount.nfs: requested NFS version or transport protocol is not supported

[...]
Cannot anyone suggest whey there would be a protocol mismatch?

Probaley you have an syntax error in /etc/exports.
Check it. Also, check status for the nfs-service:

sudo systemctl status nfs-server.service

See more in post [SOLVED]cannot mount newly installed Lithium


// Regards rbh

Please read before requesting help: Guide to getting help,
Introduction to the Bunsenlabs Lithium Desktop and other help topics under "Help Resources" on the BunsenLabs menu

Online

#4 2021-08-11 22:05:44

jjanderson5
Member
Registered: 2016-05-10
Posts: 118

Re: [SOLVED]requested NFS version or transport protocol is not supported

@twoion

Can you confirm that the server works?

When I run

ps -elf | fgrep rpcbind

I get:

4 S _rpc      7277     1  0  80   0 -  1715 poll_s 13:25 ?        00:00:00 /sbin/rpcbind -f -w

From what I have read when the NFS server is running, rpcbind is the daemon that is run. So I think the server works.

Are there any other checks I should run?

Offline

#5 2021-08-11 22:15:37

jjanderson5
Member
Registered: 2016-05-10
Posts: 118

Re: [SOLVED]requested NFS version or transport protocol is not supported

@twoion

try setting nfsvers=3 as an option to the mount command

I looked at the mount man page and did not see 'nfsvers' as an option. I tried running:

mount -nfsvers=3 -t nfs pc1:/mnt/mlib /mnt/mlib

and got an error message.

Offline

#6 2021-08-11 22:17:18

rbh
Moderator
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 1,182

Re: [SOLVED]requested NFS version or transport protocol is not supported

jjanderson5 wrote:

Are there any other checks I should run?

Check syntax of /etc/exports.
Check status for the nfs-service:

sudo systemctl status nfs-server.service

See more in post [SOLVED]cannot mount newly installed Lithium

Last edited by rbh (2021-08-11 22:17:37)


// Regards rbh

Please read before requesting help: Guide to getting help,
Introduction to the Bunsenlabs Lithium Desktop and other help topics under "Help Resources" on the BunsenLabs menu

Online

#7 2021-08-12 16:13:29

twoion
一期一会
Registered: 2015-08-10
Posts: 3,318

Re: [SOLVED]requested NFS version or transport protocol is not supported

jjanderson5 wrote:

@twoion

try setting nfsvers=3 as an option to the mount command

I looked at the mount man page and did not see 'nfsvers' as an option. I tried running:

mount -nfsvers=3 -t nfs pc1:/mnt/mlib /mnt/mlib

and got an error message.

Options for file system always go under -o:

-o nfsvers=3

See man 5 nfs for more information.

Offline

#8 2021-08-12 16:53:40

jjanderson5
Member
Registered: 2016-05-10
Posts: 118

Re: [SOLVED]requested NFS version or transport protocol is not supported

@twoion

Thank you. I will check that out later today and make notes for the future.

I have in the past 30 minutes resolved the problem, which I will explain in my next post.

Offline

#9 2021-08-12 17:13:27

jjanderson5
Member
Registered: 2016-05-10
Posts: 118

Re: [SOLVED]requested NFS version or transport protocol is not supported

@rbh

You were correct and the /etc/exports file was causing the mount problem. I am marking this issue as solved, but I don't really think my "error" was a real error. I will explain below and would appreciate your thoughts.

When I ran the command:

sudo systemctl status nfs-server.service

as you suggested, I got

systemctl status nfs-server.service
● nfs-server.service - NFS server and services
   Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2021-08-12 12:34:54 EDT; 6min ago
  Process: 14656 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=1/FAILURE)
  Process: 14657 ExecStopPost=/usr/sbin/exportfs -au (code=exited, status=0/SUCCESS)
  Process: 14658 ExecStopPost=/usr/sbin/exportfs -f (code=exited, status=0/SUCCESS)

Aug 12 12:34:54 snider exportfs[14656]: exportfs:         192.168.1.122:/home
Aug 12 12:34:54 snider exportfs[14656]: exportfs: duplicated export entries:
Aug 12 12:34:54 snider exportfs[14656]: exportfs:         192.168.1.123:/home
Aug 12 12:34:54 snider exportfs[14656]: exportfs: duplicated export entries:
Aug 12 12:34:54 snider exportfs[14656]: exportfs:         192.168.1.124:/home
Aug 12 12:34:54 snider exportfs[14656]: exportfs: duplicated export entries:
Aug 12 12:34:54 snider exportfs[14656]: exportfs:         192.168.1.125:/home
Aug 12 12:34:54 snider systemd[1]: nfs-server.service: Control process exited, code=exited, status=1/FAILURE
Aug 12 12:34:54 snider systemd[1]: nfs-server.service: Failed with result 'exit-code'.
Aug 12 12:34:54 snider systemd[1]: Stopped NFS server and services.

These error messages were interesting because I do NOT have any export statements for /home in the /etc/exports file. What I did have were a number of statements exporting /mnt/snider, where /mnt/snider is a symbolic link to /home. Taking the output from the systemctl command as a hint, I removed all the /mnt/snider statements from the exports file.

I stopped and restarted the nfs service and was able to mount a server file system on my client.

To me this looks like a linux bug. Apparently, /home is exported even if it is NOT in the export file. I infer this because when I include the symbolic link to /home in the exports file, I get a duplicate link message.

This all looks strange to me. In my opinion, the /mnt/snider file system, whether linked to /home or not should have been exported and /home should not be exported unless explicitly include in the /etc/exports file.

I'm not sure I wrote this clearly. Feel free to followup with questions and comments.

The bottom line is that problem is fixed and I will mark this issues as SOLVED. I thank you for your help because your suggestion directly led me to a solution!!

Jim A.

Offline

#10 2021-08-13 13:51:53

rbh
Moderator
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 1,182

Re: [SOLVED]requested NFS version or transport protocol is not supported

jjanderson5 wrote:

but I don't really think my "error" was a real error.
[...]
These error messages were interesting because I do NOT have any export statements for /home in the /etc/exports file. What I did have were a number of statements exporting /mnt/snider, where /mnt/snider is a symbolic link to /home. Taking the output from the systemctl command as a hint, I removed all the /mnt/snider statements from the exports file.

I stopped and restarted the nfs service and was able to mount a server file system on my client.

To me this looks like a linux bug. Apparently, /home is exported even if it is NOT in the export file. I infer this because when I include the symbolic link to /home in the exports file, I get a duplicate link message.

This all looks strange to me. In my opinion, the /mnt/snider file system, whether linked to /home or not should have been exported and /home should not be exported unless explicitly include in the /etc/exports file..

I have NEVER seen /home being exported wihout it being configured to be exported!
Debian and BL will NOT export /home automatically.

Have you made a /etc/exports.d/* config file? Can you paste your /etc/exports for claritys sake?
If the export is not configured in /etc/exports, you have configured it elswhere. You can search that configfile.

Is it now so, that you want to mount users home-directory from all clients from the server?
If so, you can not log in and then mount the ~/ on the server.
You have to configure the client to mount the /home on the server, before user log in.
I mentioned also that in the old thread.

Note, NFS is by default not so secure. There is secure protocols you can use for mounting network-shares.

EDIT:
Also, to list exported file systems, use command "showmount -e [ip-adress/pc-name]".

Last edited by rbh (2021-08-13 14:03:29)


// Regards rbh

Please read before requesting help: Guide to getting help,
Introduction to the Bunsenlabs Lithium Desktop and other help topics under "Help Resources" on the BunsenLabs menu

Online

Board footer

Powered by FluxBB