I am running Solaris 2.5 and have an application that
does file I/O, specifically it calls the following functions:
mkdirp
fopen
stat
creat
fclose
fflush
remove
I check return codes from all the functions above to
be sure they succeeded.
When other developers run my application, they see
some mysterious .nfsXXX files being auto-created in their
directories. And the strange thing is that these files cannot
be deleted. Instead it appears that they are automatically removed
the next day or so.
Does anyone know what causes .nfsxxx files to get auto-created?
We checked the sun solve site, but could not find anything
relevant.
Thanks for any clues!
Anjela Patnaik
apat...@aircom.com
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
apatnaik> When other developers run my application, they see some
apatnaik> mysterious .nfsXXX files being auto-created in their
apatnaik> directories. And the strange thing is that these files
apatnaik> cannot be deleted. Instead it appears that they are
apatnaik> automatically removed the next day or so.
apatnaik> Does anyone know what causes .nfsxxx files to get
apatnaik> auto-created?
They are created when a file on an NFS-mounted filesystem is open by a
process running on the local client, but has been unlinked while open.
On a local filesystem, such files become invisible, but on NFS the
delete command can't be propagated to the server without affecting
access to the file data (NFS doesn't keep track of whether files are
open on clients or not), so the file is renamed instead, and then
deleted as soon as it is no longer open on the client that tried to
delete it.
--
Andrew.
comp.unix.programmer FAQ: see <URL: http://www.erlenstar.demon.co.uk/unix/>
or <URL: http://www.whitefang.com/unix/>
These are created by NFS in order to handle the situation when open
NFS files are deleted. They go away automatically because a cron job
deletes them after 7 days.
Look in:
/usr/lib/fs/nfs/nfsfind
k...@sdc.cs.boeing.com (Keith Michaels) writes:
>These are created by NFS in order to handle the situation when open
>NFS files are deleted. They go away automatically because a cron job
>deletes them after 7 days.
If the client doesn't crash, the files will be removed automatically
once they're no longer open on the client.
Its' the client who creates and destroys .nfs* files.
Caspeasper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
I know they are deleted automatically, but
it's cleanest to not cause them to get auto-created
in the first place, if this is feasible.
We are using NFS so not having NFS is not an option.
Are there unix library calls on the client side that don't
cause files to get renamed, and simply forcefully remove them?
Thanks again,
apat...@aircom.com
In article <casper.9...@nl-usenet.sun.com>, Caspe...@Holland.Sun.Com
-----------== Posted via Deja News, The Discussion Network ==----------