SUMMARY: .nfs files ????

From: Arjun Dontamsetti (adontamsetti@hotmail.com)
Date: Tue Apr 07 1998 - 12:35:52 CDT


Hi,

Thanks for all the replies. My concept on .nfs files were cleared now.
Many thanks for all those who responded. All the replies are enclosed
below.

Thanks

Arjun

Original Question:
----------------------------------------------------------------------
Hi Gurus,
 
Does anybody know what .nfs files are?. On my workstation they are
created (Sparc 5). If I look into it they have history similar to
.sh_history. Even if I delete them they are created again.
 
But they will vanish once I reboot the m/c. I am not sure what is wrong
on my workstation (ostrich) or on Server (pajaro). My home
directory is mounted from pajaro to ostrich and we are using NIS+.
The problem is appearing since last two days. The only major change
is that I am saving my PC files on SUN (I donot know what our
Administrators using for this may be samba or something else).
 
I am curious to know the reason, and will summarise.
 

Thanks,
 
Arjun
----------------------------------------------------------------------

These files are created by nfs server. If you have a NFS mounted
directory, it
would create these files. These files contain temp. data.
 
...Sanjaya
 
 
If you look at sunsolve, there is a bug and patch listed. Has to do
with
removing links to a file while the file is open. Basically, you can
ignore
this, not a serious problem in my mind.
 
Tom
 
Hi.
 
I believe .nfs files are placekeepers for files opened over NFS.
If you on ostrich open a file on pajaro, your home directory
will get a .nfs file. They usually delete when you exit the file.
There should be a root cron job to clean off .nfs files after seven
days.
 
john reynolds

Nothiong wrong. .nfs* files are seen when you remove files on NFS client
while they are still open by one of the processes. Use fuser <file name>
to see which pid is still keep the file open. Since reboot of you
machine helps, the process resides on your host.
 
 
HTH
 
Eugene.
 
.nfs files are normal on a NFS server. They are files that have been
deleted
yet a client system still has the file open. Once the client application
closes the file, the .nfs file will go away.
 
Basically, the server can't really remove the file until all processes
that have the file open closes the file.
 
Craig

Hi,
 
from the man page nfs(4P) (SunOS 4.1.3, but it is the same in Solaris
2.x):
 
     When a file that is opened by a client is unlinked (by the
     server), a file with a name of the form .nfsXXX (where XXX
     is a number) is created by the client. When the open file
     is closed, the .nfsXXX file is removed. If the client
     crashes before the file can be closed, the .nfsXXX file is
     not removed.
 
 
                        Stefan

Hi,
 From the 'nfsd' man page:
 
.nfsXXX client machine pointer to an open-but-unlinked file
 
 
The .nfs files get created when you remove a file on the server while it
is
being kept open by any process on the NFS client. And they'll vanish
once
this
process dies - a reboot is not necessary.
 
-Hope this helps,
 Ravi.

.nfs files are created when another machine deletes a file still open
by the client. Since the file cannot be unlinked by the OS (since
then the file no longer exists, and this would break the UNIX
semantics of files), the server needs to move it to the side so that
the inode is still there.
 
At least this is my understanding. YMMV.
 

Brian

On 02/13/98 Ju-Lein Lim posted a good summarry on .nfs files. I know
cause it helped me. The summary can be found at
www.latech.edu/sunman.html
 
Ralph Dell

This is NFS's attempt to maintain Unix-like file semantics, particularly
in the case of deleting an open file. With a local (disk) file system
under most/all Unices, when you unlink a file that is open (still has
references), the file's directory entry is removed from the directory,
but the inode is not cleared. When the references are released, the
inode is freed and the file disappears. BUT, NFS is stateless, so if a
NFS file-delete request were sent, the file would disappear on the
server,
since it would not know that a client had it open. So, if someone (on
the
same machine) is trying to simultaneously use and delete a file, NFS
moves
the file to a temporary name (.nfs????). Thus, its original directory
entry is gone, but it is still accessible (any open NFS file handles
on that client point to the new temp name). Once the open references
are released, the temp. file goes away.
 
See if you have lsof anywhere and find all the processes that access the
file on the client.
 
/Nikos

Arjun --
 
.nfs* files are "leftovers" when a file is removed from an nfs-mounted
partition but is still in use somewhere else. Since the machine can't
just clear the inode as it can on a non-nfs drive, it renames it to an
nfs placeholder, which is later deleted.
 
You can safely ignore them; they will go away by themselves.
 
 
:-D

--
David Thorburn-Gundlach
 
 
Arjun,
 
    They are temporary nfs cache files and on some sunos systems there 
is a
cron job to delete them. They can be safely deleted and if nfs needs 
them it
will
make them again.
 
Mike (Mehran) Salehi mrs@cadem.mc.xerox.com (716)422-2725

.nfs files are created when something asked the nfs server to delete the file and something else had the file open. For example, less(1) a file and in another window delete it. -- Rob

______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:36 CDT