Go Back   The UNIX and Linux Forums > Special Forums > Hardware > Filesystems, Disks and Memory
google site



Filesystems, Disks and Memory Discuss NAS, SAN, RAID, Robotic Libraries, backup devices, RAM, DRAM, SCSI, IDE, EIDE topics here.

Closed Thread
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-14-2002
Registered User
 

Join Date: Aug 2001
Location: Bangalore
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Question Removing ".nfs" files

Hello,

I have a critical client-server application. I try to import a file from the local machine on to the server and open it (on the server). I can open it, but after this, when i try to open some other file on the server itself without saving this imported file, a .nfs file is being created.
This .nfs file will not be removed untill i close my application, but i am not supposed to close. Earlier i didn't have this problem. Now suddenly it started coming.

If anyone has come across anything like this, please help me in getting this sorted out.

I searched the web also, but nobody listed any solution nor the cause of this.

Thanks,
Jay.
Sponsored Links
  #2  
Old 04-15-2002
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,150
Thanks: 0
Thanked 8 Times in 8 Posts
In unix, it is ok to create a file, then unlink it, and continue to read and write to it. When you remove the last link to a file, it becomes a file with zero names. But the inode will not be freed until all processes close it. This is often done with temporary files. If the process aborts, the file will go with it.

It is hard to implement this in an nfs environment. If a nfs client gets a request from a local process to delete a file, it checks to see if any local processes still have that file open, if so, it renames the file to a .nfs<something> file. And after the last local process closes the file, the nfs client will actually issue the delete.

If you are running a process on a nfs client and that process attempts a unlink() system call on a open file, the above scenario plays out. But the process still has the file open. You should be glad that .nfs file is still around. You must be holding the file open in order to eventually do i/o to it. If this is not the case, the process has a bug. It should close the file if the file is no longer needed. If the process is going to run for days or weeks and it is opening files that it will never close, the file table will eventually fill.

The .nfs files should not really cause any trouble unless they are very large. Some people run a cron job on the nfs server that finds .nfs files that have not been accessed in the past two weeks and deletes them.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
"find command" to find the files in the current directories but not in the "subdir" swamymns Shell Programming and Scripting 9 07-22-2008 11:23 AM
Removing empty folders using the "find" command biot UNIX for Dummies Questions & Answers 3 03-25-2008 09:43 PM
Development Releases: Linux Mint 4.0 Beta "Fluxbox", 4.0 Alpha "Debian" Linux Bot UNIX and Linux RSS News 0 01-04-2008 02:00 PM
Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" Lokesha UNIX for Dummies Questions & Answers 4 12-20-2007 12:52 AM
No utpmx entry: you must exec "login" from lowest level "shell" peterpan UNIX for Dummies Questions & Answers 0 01-18-2006 03:15 AM



All times are GMT -4. The time now is 07:59 AM.