Can reverse DNS be turned off for NFS?

12,355

Solution 1

Put the IP address of the NFS clients in the /etc/hosts file of the NFS server with a comment like:

# 2009-04-17 Workaround a chicken and egg DNS resolution problem at boot
192.0.2.1 mynfsclient
192.0.2.2 anothernfsclient

Then, add to your runbook "When changing the IP addresses of a machine, do not forget to update the hosts file of the NFS server".

Now, to shut off this stupid DNS test in the NFS server, it depends on the server. You apparently did not indicate the OS or the server type.

Solution 2

I had a similar problem with an old Yellow Machine NAS box - I was having DNS/DHCP fights where the reverse lookups were not matching the forward lookups.

In our case, just putting dummy entries in the NAS box /etc/hosts for all the IPs solved the problem. I don't even need to have correct names for the IPs - just any name for an IP solved stopped mountd from complaining.

(Interesting side note - at least in the older version of Linux on the NAS box, there's a typo in the NFS error message: "DNS forward lookup does't match with reverse " )

Share:
12,355
ro ra
Author by

ro ra

Director of IT, mid size company, 25+ years software development. Old code is the best code

Updated on June 29, 2022

Comments

  • ro ra
    ro ra almost 2 years

    We have setup 3 Virtual Machine server machines that mount the VMs from 2 other storage machines. We mount the VMs from the storage servers to have less data to move when moving the VMs(pause on one server, mount on new server, unpause) and to facilitate snapshots and backup.

    We were in the middle of an extended power outage due to storms (the ops team forgot to check that we had fuel in the generator and the don't test it weekly tsk, tsk), so we shut everything down.

    After fueling the generator, we started to bring everything up. Big problem.

    To NFS mount the storage, NFS wants to do a reverse DNS lookup, but the DNS server is a VM that can't start until the storage is NFS mounted!

    We copied the DNS server VM to one of the VM servers locally and started it so we could then bring everything up.

    We would like to run NFS without the reverse lookup (everything is on our internal network) but can't find out how to turn off.

    Any help is appreciated