35

I want to mount the NFS share of a Zyxel NSA310s NAS. Showmount, called on the client machine, shows the share:

$ showmount 10.0.0.100 -e
Export list for 10.0.0.100:
/i-data/7fd943bf/nfs/zyxelNFS *

The client's /etc/fstab contains the line:

10.0.0.100:/i-data/7fd943bf/nfs/zyxelNFS /media/nasNFS nfs rw  0 0

But mounting does not work:

sudo mount /media/nasNFS/ -v
mount.nfs: timeout set for Mon May 25 17:34:46 2015
mount.nfs: trying text-based options 'vers=4,addr=10.0.0.100,clientaddr=10.0.0.2'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'addr=10.0.0.100'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 10.0.0.100 prog 100003 vers 3 prot TCP port 2049
mount.nfs: portmap query retrying: RPC: Program/version mismatch
mount.nfs: prog 100003, trying vers=3, prot=17
mount.nfs: trying 10.0.0.100 prog 100003 vers 3 prot UDP port 2049
mount.nfs: portmap query failed: RPC: Program/version mismatch
mount.nfs: Protocol not supported

nfs-common is installed. What else can be missing?

9
  • What version of the NFS protocol is provided by the NSA310s? It looks like your client only supports version 3 and maybe the server is only version 4 (or 2)
    – Anthon
    May 25, 2015 at 16:24
  • I don't know the NFS version that the NSA310s uses internally. The client runs a current Ubuntu 15.04 distribution, is it necessary to explicitly allow NFS v4 ?
    – Geom
    May 25, 2015 at 16:44
  • 1
    what does rpcinfo 10.0.0.100 tell you? It should mention the supported versions. It looks like the NFS server does not like UDP. You can force TCP using the mount option tcp but it will probably does not help you directly since TCP is already tried according to line 7 in your output. Is there a firewall in between which is blocking the mount to succeed? And sometimes mounts will succeed by just restarting the NFS server.
    – Lambert
    May 25, 2015 at 17:53
  • 2
    In that case your NFS server only supports version 2. Try to mount using option vers=2
    – Lambert
    May 26, 2015 at 9:35
  • 1
    Lambert, you had the right answer. After hours of searching it finally works. Thank you very much!
    – Geom
    May 26, 2015 at 14:12

7 Answers 7

31

To summarize the steps taken to get to the answer:

According to the output given the NFS server does not like NFSv4 nor UDP. To see the capabilities of the NFS server you can use rpcinfo 10.0.0.100 (you might extend the command to filter for nfs by: |egrep "service|nfs")

Apparently the only version supported by the server is version 2:

rpcinfo 10.0.0.100 |egrep "service|nfs"
program version netid     address                service    owner
100003  2       udp       0.0.0.0.8.1            nfs        unknown
100003  2       tcp       0.0.0.0.8.1            nfs        unknown

Solution to mount the export is to use mount option vers=2 either on the commandline:

mount -o rw,vers=2 10.0.0.100:/i-data/7fd943bf/nfs/zyxelNFS /media/nasNFS

or by editing the /etc/fstab:

10.0.0.100:/i-data/7fd943bf/nfs/zyxelNFS /media/nasNFS nfs rw,vers=2  0 0

Another approach may be to change the NFS server to support version 3 (or even 4).

1
  • 7
    Useful pointer to rpcinfo for troubleshooting, thanks,
    – RichVel
    Mar 10, 2016 at 14:54
6

I'm getting this error on Fedora 31. It turns out the drive is already mounted...

2
  • What, "Protocol not supported"? Are you sure it's because the drive is already mounted? I don't get that error when repeating an NFS mount request for a share that's already mounted. (In fact, I don't get any error at all.) I only get the error when there's a protocol mismatch
    – roaima
    Jul 24, 2020 at 16:50
  • 2
    Yep, I dismounted. Remounted and no error. Then remounted again while mounted and again got the error. I have other projects so I can't look into it now but I thought I'd throw this cause up as it apparently happens under some conditions even I have no idea why and agree it doesn't make sense. Jul 24, 2020 at 17:47
1

I ran into the "Protocol not supported" error as well. In my case the root cause turned out to be a subtle issue with a DNS reverse entry.

Background: I was using NFSv4 and had the following entries in /etc/exports:

/srv/nfs      *.example.com(ro,fsid=root,insecure,no_subtree_check,async,root_squash)
/srv/nfs/data myhost.example.com(rw,sync,no_subtree_check)

Instead of the FQDN, running host 1.2.3.4 returned pointers to both "myhost." and "myhost.example.com.". My NFS server seemed to look at the first PTR entry in the DNS response only which didn't match the wildcard in /etc/exports and as a consequence it blocked NFSv4 from this host. So if you use rules based on host names in /etc/exports double-check that DNS reverse lookups work correctly for your clients.

0
[root@sousvide mnt]# mount projects/
mount.nfs: Protocol not supported

The solution to this error in my case was adjusting the Freenas (BSD) settings "Authorized Hosts and IP Addresses" to allow the target machine in question access...

/etc/fstab had an entry like

x.x.x.x:/mnt/media/projects /mnt/projects nfs defaults,timeo=900,retrans=5,_netdev,noauto 0 0 
0

So I was getting that same error (protocol not supported) although my issue was a result of the NFS server not allowing my IP to mount (hbac rules). Had to login to the NFS Server and allow my IP.

When attempting to mount with -vvv, I saw various denied prior to the final "protocol not supported" that appeared without running the verbose options. .

0

Hola estaba usando cento v7 y tb me tiraba ese error del protcolo. lo solucione ejecutando estos comandos: [root@server ~]# yum install nfs-utils y luego systemctl start nfs y volvi a montar la carpeta. Era al parecer que las versiones que usa el protocolo nfs eran viejas y al actualizar se soluciono.

New contributor
mary is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
1
  • Welcome to the site, and thank you for your contribution. Please note, however, that the communication language on this site is english, in order to reach as wide an audience as possible. So, please take the time to translate your post to english.
    – AdminBee
    Sep 29 at 10:37
-5

try to use this option

....   nfs    rsize=8192,wsize=8192,timeo=14,intr 0 0
2
  • please explain why Apr 6, 2020 at 18:27
  • 2
    In some cases these parameters can help improving performance but they aren't related to the connection issues the OP described. May 3, 2020 at 0:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.