Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I can't get a client to mount an NFS share that is being exported using a wildcard domain name.

Setup: The NFS server is running DNSMasq for DHCP and DNS.

the NFS export file has

/export *.domain.com(rw)

the /etc/hosts on the NFS server (which is used by dnsmasq) has:

192.168.0.5 phobos

If I try to mount the export from phobos the server denies the request.

but nslookup on the NFS server:

>nslookup 192.168.0.5
5.0.168.192.in-addr.arpa    name = phobos.domain.com.

if I change the /etc/hosts too:

192.168.0.5 phobos phobos.domain.com

it works, but I feel like I shouldn't have to do this? Is the NFS server not using DNS?

share|improve this question
    
What's the output of getent hosts 192.168.0.5? –  mgorven Mar 1 '13 at 19:46
    
@mgorven Thanks, I think I know what you might be getting at. The /etc/hosts file was shorting DNS lookup. –  Cyclone Mar 1 '13 at 19:56

1 Answer 1

I got this to work by switching my /etc/nssswitch.conf:

hosts: dns files

from

hosts: files dns
share|improve this answer
    
You don't really want to do that, it's generally expected that /etc/hosts overrides DNS. –  mgorven Mar 1 '13 at 20:44
    
i suppose the other options is to move the list of hosts that dnsmasq uses to a file other than /etc/hosts? Seems like more work. –  Cyclone Mar 1 '13 at 21:13
    
Yup, that's probably the way to go. –  mgorven Mar 1 '13 at 21:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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