tags:

views:

874

answers:

5

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

A: 

Can't you just put the ip address of the server in question in the fstab file and no dns lookup will be required.

Tried that, the problem is not finding the storage server, but before mounting NFS wants to do a reverse DNS lookup of the machine requesting the mount, but DNS is not up yet. We didn't try making a hosts file on the storage machines, but then you create an admin headache to keep the files updated
petey
managing a hosts file is a smaller headache than having a set of systems that won't boot...
Alnitak
+1  A: 

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.

bortzmeyer
The OS is open solaris 2008.11, I'll try and get the NFS version
petey
And did you try my /etc/hosts solution? More maintenance in the long terme but it can help you to boot.
bortzmeyer
A: 

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 " )

Paul Holbrook
A: 

It's NFS v4, the problem is that all the requests for access use a reverse DNS lookup to determine the NFS domain for access/security purposes.

I think you can stop this behavior by putting a line in /etc/default/nfs containing:

NFSMAPID_DOMAIN=jrandom.dns.domain.com

This needs to match across all the systems that are sharing/using NFS from each other. See the section about Setting NFSMAPID_DOMAIN, which is to the end of the page which explains what happens when it's not set.

NFSv4 - more fun than a bag of weasels.

Petesh
A: 

I don't have enough rep to vote it up (or comment..) but Petesh's answer worked for me on RHEL5, it makes NFSv4 revert to more NFSv3-like behaviour.

James Yale