Skip to contentSkip to conversation

Move .nfsXXXX files

DISCUSSION Trinabh Shukla 3 participants 3 messages Jan 31, 2007 – Feb 5, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

The .nfsXXXX file get created when I remove a file while it's being kept open by one of the process. Due to this I can't remove directory which hold this file. So I want to move this .nfsXXXX file on different temp directory on the same nfs file system and delete that directory. Here it's working properly.

But let me know that is it a correct solution? And removal of .nfs files does not cause the server serious integrity.

Also it will be good, if you lead some pointers about how this .nfsXXXX files handle by the NFS server.

Thanks,
-Trinabh

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

#1 lore raw
Quoted 8 lines · Trinabh Shukla

The .nfsXXXX file get created when I remove a file while it's being kept open by one of the process. Due to this I can't remove directory which hold this file. So I want to move this .nfsXXXX file on different temp directory on the same nfs file system and delete that directory. Here it's working properly.

But let me know that is it a correct solution? And removal of .nfs files does not cause the server serious integrity.

The .nfsXXX file is a sign that some process still has that file open. If you forcibly delete the file, you are very likely to screw up that process. Better then just to kill the process.

You might be able to move the file to another directory, but the problem then is that the process that tried to delete the file may not have write access to that directory. In this case, the unlink may fail, and you will be left with a dangling .nfsXXX file.

Quoted 2 lines

Also it will be good, if you lead some pointers about how this .nfsXXXX files handle by the NFS server.

As far as the NFS server is concerned, this is a file just like any other. The server attaches no special meaning to it.

Trond

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

#2 lore raw
In reply to Trinabh Shukla
Quoted 10 lines · Trinabh Shukla

The .nfsXXXX file get created when I remove a file while it's being kept open by one of the process. Due to this I can't remove directory which hold this file. So I want to move this .nfsXXXX file on different temp directory on the same nfs file system and delete that directory. Here it's working properly.

But let me know that is it a correct solution? And removal of .nfs files does not cause the server serious integrity.

If you're not bothered about the process which has that file open, better kill the process. Moving to temp dir has problems as Trond mentioned, even if sticky bit(chmod 777+t) is set for the temp dir.

Quoted 2 lines

Also it will be good, if you lead some pointers about how this .nfsXXXX files handle by the NFS server.

As the server has no clue of file opens, it cannot implement "delete on last close". Also, there is a possibility that client could crash or neglect to remove the hidden files. So server may want to cleanup these files periodically. Some servers (eg. Solaris servers) have a cron script which searches exported filesystem for these files that haven't not been accessed for a while and deletes them.

Thanks,
Suresh

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs