Use nfs version 3 on RHEL 7

8,876

Got it working!

I put this in the /etc/sysconfig/nfs file

RQUOTAD_PORT=875

LOCKD_TCPPORT=32803

LOCKD_UDPPORT=32769

MOUNTD_PORT=892

STATD_PORT=662

Then

systemctl restart nfs-config

Then I opened the above ports tcp/udp on azure and was able to mount it!

Thanks to everyone for their support!

Share:
8,876
david bob
Author by

david bob

Updated on September 18, 2022

Comments

  • david bob
    david bob almost 2 years

    I tested using nfs version 3 on my lab system, and it works fine.

    [root@server2 ~]# tail -1 /etc/mtab
    
    server1:/nfs /nfs nfs rw,relatime,vers=3,rsize=262144,wsize=262144,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.150.134,mountvers=3,mountport=20048,mountproto=udp,local_lock=none,addr=192.168.150.134 0 0
    
    [root@server2 ~]# cat /etc/redhat-release
    Red Hat Enterprise Linux Server release 7.4 (Maipo)
    [root@server2 ~]#
    

    However. when I do the same thing on Azure, it fails. I followed this guide

    Link to vers 3 nfs

    But when I mount it using version 3, it gives below error

    mount -vv  -t nfs -o vers=3 server1:/appl /wbr
    
    mount.nfs: timeout set for Thu Aug  1 02:38:02 2019
    mount.nfs: trying text-based options 'vers=3,addr=10.200.254.8'
    mount.nfs: prog 100003, trying vers=3, prot=6
    mount.nfs: trying 10.200.254.8 prog 100003 vers 3 prot TCP port 2049
    mount.nfs: prog 100005, trying vers=3, prot=17
    mount.nfs: trying 10.200.254.8 prog 100005 vers 3 prot UDP port 20048
    mount.nfs: portmap query retrying: RPC: Timed out
    

    Version 4 works just fine, but version 3 does not!

    Any ideas?

    • Michael Hampton
      Michael Hampton almost 5 years
      Stop using version 3, of course. It was obsolete almost 20 years ago.
    • david bob
      david bob almost 5 years
      i know, but MUST use it for our legacy app which works best on version 3
    • HBruijn
      HBruijn almost 5 years
      Does showmount -e <server> work? Are the necessary ports op in the firewalls between the systems (portmapper and whatever ports are used for the nfs services) ?
    • david bob
      david bob almost 5 years
      i can mount it using version 4, that means ports are open and does not look like firewall, i have disabled both firewalld/iptables
    • Michael Hampton
      Michael Hampton almost 5 years
      Did you check your Azure security group?
    • david bob
      david bob almost 5 years
      @Michael yeah, since version 4 works fine on 111,2049
  • david bob
    david bob almost 5 years
    1,2) nfs is working on version 4, so everything is in place, I can telnet, nmap gives below output PORT STATE SERVICE 111/udp open rpcbind 2049/udp open|filtered nfs 3)showmount does not show anything, but still can mount using version 4
  • mebius99
    mebius99 almost 5 years
    Is NFS3 support enabled in the /etc/sysconfig/nfs file? NFS3_SERVER_SUPPORT="yes"