Xref: utzoo comp.sys.att:6159 comp.unix.questions:12953 Path: utzoo!dptcdc!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!njin!princeton!phoenix!bernsten From: bernsten@phoenix.Princeton.EDU (Dan Bernstein) Newsgroups: comp.sys.att,u3b.misc,comp.unix.questions Subject: Re: Strange Unix file system object (Re: Missing space in root) Message-ID: <7780@phoenix.Princeton.EDU> Date: 17 Apr 89 04:01:50 GMT References: <668@mccc.UUCP> <494@cbnewsc.ATT.COM> <10016@orstcs.CS.ORST.EDU> Reply-To: bernsten@phoenix.Princeton.EDU (Dan Bernstein) Followup-To: comp.unix.questions Distribution: usa Organization: Hmph. Lines: 23 In article <10016@orstcs.CS.ORST.EDU> pvo1478@oce.orst.edu (Paul O'Neill) writes: [Starts Mail on a 1.6 MB mailbox] [df suddenly shows 1.6 MB less space in a file system] [there's no file system entry for a 1.6 MB file] > ``ofiles'' (thank god for ofiles) shows Mail has an open inode, 1788, > on the root file system. But "find / -inum 1788 -xdev -print" shows > nothing. > > So, what is this bizarre object? Ofiles and df know about it. > du, ls, and find don't know about it. The kernel won't free the filesystem space for a file until (1) it has zero hard links and (2) it is accessed by zero processes. It wouldn't be a good idea to delete an opened file just because its last directory entry disappears: what information do you give to the process reading the file? So the kernel quite naturally waits until Mail closes the file before deleting it. Probably your Mail program removes the old file after it's opened it; then it makes a new mailbox file. I'd advise using a mail reader with a more conservative approach to file handling. ---Dan Bernstein, bernsten@phoenix.princeton.edu