Pesky .nfs files showing up in my directory - what are they?

> du .nfs*
0       .nfsFCE32
0       .nfsFDE93
0       .nfsFE2E
195048  .nfsDDE4
757032  .nfsE9BC11
.nfsxxxxx files are orphaned files that were deleted from an NFS mount but are still in use by a process. Once the final process using the file releases its file handle the file will be deleted. Because of the shared nature of NFS mounts, the files can be viewed from any of the machines connected to the mount. Keep in mind the process may be running on any of the machines connected to the mount. This often happens in a shared Oracle Home scenario when an Oracle instance on one machine has a lock on a file and the file is deleted from a different machine. The file may have been deleted by operator error or by a maintenance script. If you use the fuser command on the files (fuser .nfs*) you can see what process ids are attached to them. Then us use the ps command to get detail on each of the the process ids.   But don't delete the files again until you can verify they are not attached to any processes. If they are still attached and you issue a delete then the xxxxx number part of the filename will change and they will still hang around. Here is the complicating factor: Many times NFS mounts are shared among machines. Because Machine A might have processes attached to a .nfsxxxxx file, Machine B might be able to see the .nfs files but does not have scope to the processes. Consider running the fuser program on each machine connected to the mount/directory.

Add new comment