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

I have a number of NFS servers on a set of commercial NAS hardware we bought. I also have about 20-30 other machines that mount each of the NFS servers. Generally the setup works well, but I've observed that occasionally after I reboot one of the clients that it will report

mount.nfs: access denied by server while mounting ...

I seem to be able to fix this by logging in to each of the NFS servers and either /etc/init.d/nfs restart or exportfs -au; exportfs -a; (or doing the equivalent from the handy-dandy web interface), but it's rather obnoxious to have to have this be part of rebooting any one of the 20-30 client nodes.

So far, server logs haven't been very helpful, partly because the NAS vendor seems to have stripped out a lot of the built-in logging stuff. :(

Ideally I'd like a fix to a server config (or client config) such that I wouldn't have to do anything special after a client reboot. Barring that, maybe there's a command I could run on the client (as opposed to on all of the servers) when the issue occurs?

share|improve this question

1 Answer 1

Permission denied on NFS means that - for some reason - the NFS export doesn't have permissions to mount. What's the export options you have configured? Any chance you've got netgroup or host-based allow lists? If so, it might be down to name resolution. If your NFS server can't resolve your client's IP (maybe it's DHCPing?) it'll refuse permission, and (may) cache the negative result.

share|improve this answer
    
Ah, you're right. I think the client IP changed, and it's in the hosts file by hostname. I guess I can google this, but if you know a good way to make the behavior less annoying (change caching parameters?) that would be great... –  arcticmac Apr 16 at 18:56
    
Not easy unfortunately - the attempt to mount (and permission denied) triggers name resolution, which'll make the mount fail. If you're DHCPing you can probably configure DHCP to auto-update DNS. Or if you can increase your DHCP lease time, to mean your clients tend to be a bit more 'sticky' on their IP addresses. (Which means it'll happen less frequently, but never entirely go away). –  Sobrique Apr 16 at 19:07

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.