Return to BSD News archive
Newsgroups: comp.unix.bsd.freebsd.misc Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!news.sdsmt.edu!news.mid.net!mr.net!nntp04.primenet.com!nntp.primenet.com!newspump.sol.net!spool.mu.edu!howland.erols.net!newsfeed.internetmci.com!docws001!ottnews!tomqnx.tomqnx.com!tom From: tom@tomqnx.tomqnx.com (Tom Torrance at home) Subject: Re: How to determine fd's owner? X-Nntp-Posting-Host: 159.249.8.221 Message-ID: <DwBqvF.Bt3@ottnews.shl.com> Sender: usenet@ottnews.shl.com (News Administrator) Organization: SHL Systemhouse Inc. (Ottawa) X-Newsreader: TIN [version 1.2 PL2] References: <4v1fj3$8pm@itchy.serv.net> Date: Sun, 18 Aug 1996 08:14:02 GMT Lines: 45 Could it be something as simple as 'rm file1' before renameing file1.n to file1? Sean T. Lamont (zeno@serv.net) wrote: : I have a bit of a connundrum. : For system reasons, on an NFS-mounted partition, : I'm doing the equivalent of the following: : open "file", read contents, close file1. : open "file1.n" for write, write contents of file1.n, close file1.n. : rename "file1.n" to "file1". : Now everything works spiffy except the fact that I'm leaking disk memory. : each time the operation is executed, the remote disk loses a half meg or : so, which eventually fills up the disk, rendering the operation useless. : I originally thought that this was a problem of the nfs client renaming : an open file descriptor, so I was trying to figure out which process on : the server side was still "locking" it. (unix does not de-allocate disk : space until the last file descriptor referencing the file is closed.) : I kill off a couple of local processes. No help. I kill off a couple more. : Still no help. Ok, maybe it's the NFSD processes? NFS is no longer working : from the remote site, but still no luck. Inetd? syslogd? I killed off : nearly EVERY process on the system, and the disk space was still not freed. : the ONLY way that I can seemingly return this disk space is by re-booting : the system. Is init or pagedaemon doing this? Why would it? : What the heck is going on here? Is there some way that I can view the : active open file descriptors and who's locking them? I'm at a bit of a loss : here. : -- : Sean T. Lamont, President / Chief NetNerd, Abstract Software, Inc. (ServNet) : - Internet access * WWW hosting * TCP/IP * UNIX * NEXTSTEP * WWW Development - : email: lamont@abstractsoft.com WWW: http://www.serv.net : "...There's no moral, it's just a lot of stuff that happens". - H. Simpson