Convert NFS file handle (hex) to pathname
On a Solaris 9 machine which is NFS-mounting filesystems on a Linux server, we have /var/adm/messages errors such as:
/var/adm/messages:Sep 25 13:10:56 ls0005 nfs: [ID 626546 kern.notice] NFS write error on host netapp: Stale NFS file handle.
/var/adm/messages:Sep 25 13:10:56 ls0005 nfs: [ID 702911 kern.notice] (file handle: 1000001 fd0000 2802a00 c601ec01 fabc62d3)
From the hex info, how I can I determine which file and filesystem had the problem?
Thanks!
[493 byte] By [
DRooks] at [2007-11-26 10:23:32]

# 1
You have a linux machine that is called 'netapp'? Seems odd.
If you had a clue about what process was doing it, you might be able to run lsof on the machine and see what open files it has. but that's just a shot in the dark.
Otherwise, only the server is able to map from a filehandle to a file. For instance on solaris, part of the filehandle refers to the filesystem device and the rest of the filehandle refers to the inode. Perhaps the NFS server has a utility to show you the mapping.
--
Darren
# 2
Much obliged Darren, I'll check the Linux forums on how to interpret the handle. Since my post we think we found the cause (NFS server not always updating directory timestamps when it should, combined with NFS client directory caching on Solaris; workaround is to disable the latter).
I got a chuckle from you sharp-eyed notice of the server's nodename. It is historical from when, before the big Linux RAID box, we did indeed have a Netapp filer performing the same function... the alias has stuck around in people's minds, under their fingers, and in our DNS tables.
Dennis