1752775 Members
6276 Online
108789 Solutions
New Discussion юеВ

Re: .nfs files

 
Carl Zabel
Occasional Advisor

.nfs files

My software engineers are trying to install a new version of Mentor Graphics. When they do
".nfs_" executable files are being generated in the install directory.

Anyone know what they are and why the are being created?
Indecsion is the key to flexibility
3 REPLIES 3
Dave Olker
HPE Pro

Re: .nfs files

Hi Carl,

If you're referring to .nfs##### files, then I can tell you what these are. They are files that were being accessed by multiple NFS client processes at the time that one process tried to remove the file.

Here is a typical scenario:

Two processes, procA and procB, are running on an NFS client. procA begins accessing fileX. Then procB starts accessing fileX as well.

Now procA decides that it wants to delete fileX, so it issues a remove command. The kernel on the NFS client is smart enough to realize that it should not remove fileX in this case because procB still has references to it. Instead of sending a REMOVE call to the server, the client sends a RENAME call to change the name of the file to ".nfs#####".

The result of this RENAME call is that the file still exists on the server, so procB can continue accessing it, but any new process that comes along, say procC, will not find the original file in the directory.

Finally, when procB gives up all of its references to the .nfs##### file, the client's kernel sends a REMOVE to the server to delete this file.

That's how the files get created, and how they are supposed to be deleted. If you're finding .nfs##### files on your server after all of the client processes are gone then you may be seeing a known buffer cache problem that has been fixed.

PHKL_20335 has a fix for a problem:

( SR: 8606106466 DTS: JAGab75600)
Unlinked files within NFS filesystems sometimes leave behind .nfsXXX files which are unremovable until after the system is rebooted.

Bottom line, I would not go around deleting any .nfs##### files on the server willy nilly because you might be deleting a file that a remote NFS client process is still accessing, and that would cause the client to receive a STALE file handle error.

However, if you know that the .nfs##### files on the server are not being accessed by the client then and are remaining around, then I recommend you look into getting the latest NFS and VM/PM kernel patches installed on your system to address any known problems that result in .nfs##### files being mistakenly left around.

I hope this helps,

Dave
I work for HPE

[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Carl Zabel
Occasional Advisor

Re: .nfs files

Thanks, that is precisely what was happening.

Appreciate the quick response.
Indecsion is the key to flexibility
Dave Olker
HPE Pro

Re: .nfs files

Hi Carl,

I'm glad I was able to help you.

One thing you might consider is marking my previous response as a "correct" answer so that other ITRC forum members experiencing this same .nfs##### file issue will know that this thread contains useful information that may help them resolve the same problem.

I know from years of supporting NFS that seeing .nfs##### files is a common issue, so this question will likely come up again in the future.

Just a thought...

Dave
I work for HPE

[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo