eyt*
Nov 08, 2004

NFS: getfh failed...

Over the weekend, one of the Linux servers that I partially administer was rebooted after its name was changed. This server NFS exports a directory, /data, and I got a call that one of the NFS clients had a problem using this mount point. Upon further investigation, it was all the clients, and the IRIX error that I would receive was a generic NFS permission denied error, like:

Permission denied
NFS version 3 mount failed, trying NFS version 2
mount: access denied for server:/data
mount: giving up on:
  /data

On the server side, the error was:

rpc.mountd: authenticated mount request from client:761 for /data (/data)
rpc.mountd: getfh failed: Operation not permitted

So this looked like a great thing to Google over, but most of the results I found were on specific versions of NFS servers, and did not deal with any of my real problems, which suggested looking at the host names in the /etc/exports file. When I did this, I noticed that there was one host that was invalid, but it still did not work after both restarting NFS and rebooting.

At this point I decided to only concentrate my efforts on a single host, and I removed everything else from the exports file. When I did this, I decided to force the reloading of the file via exportfs -va, and this is when I noticed:

exporting client:/data to kernel
client:/data: Invalid argument

That seemed strange. Upon regoogling, my problem soon became obvious. The NFS directory /data had a sub-directory, external, which was an NFS-mounted disk (it was done like this to abstract the specifics of that server from all the server's clients), however, this was the first time that this server had been rebooted since it was setup, and the external directory was not mounted automatically. Since you can only export a directory hierarchy once, the latter exporting of the external circumvented the previous directory from being exported. It would have been nice to have an error message that said this, but whatever.

Filed In

Navigation

eyt*