How do I mount an nfs export from the command line using the info of rpcinfo

Peter Steier asked:

I cannot mount a quite old (~2002) nfs server (axel) from a new Ubuntu 14.04. (exos):

steier@exos:/home/steier> sudo mount -v -t nfs 10.0.0.10:/dataaxel /dataaxel
mount.nfs: timeout set for Fri Jan 27 00:10:00 2017
mount.nfs: trying text-based options 'vers=4,addr=10.0.0.10,clientaddr=10.0.0.13'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'addr=10.0.0.10'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 10.0.0.10 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.10 prog 100003 vers 3 prot UDP port 2049
mount.nfs: portmap query failed: RPC: Program/version mismatch
mount.nfs: Protocol not supported

This is not surprising, as the protocols offered by axel are:

steier@exos:/home/steier> rpcinfo -p axel
    program vers proto   port  service
    100000    2   tcp    111  portmapper
    100000    2   udp    111  portmapper
 545580417    1   udp    688  ugidd
 545580417    1   tcp    690  ugidd
    100003    2   udp   2049  nfs
    100003    2   tcp   2049  nfs
    100005    1   udp    802  mountd
    100005    2   udp    802  mountd
    100005    1   tcp    802  mountd
    100005    2   tcp    802  mountd

Mounting from a half-old scientific linux (~2010) works.

What do I have to enter in the command line or into fstab to succeed?

My answer:


If the NFS server is that old, it might even be using NFS version 2, which you would have to specify explicitly with -o vers=2.

sudo mount -v -t nfs -o vers=2 10.0.0.10:/dataaxel /dataaxel

Of course, anything using NFS version 3 or 2 needs to be migrated to NFS version 4 (or higher) or decommissioned and replaced. But that’s another post…


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.