From owner-freebsd-questions Thu Jun 29 5:43:22 2000 Delivered-To: freebsd-questions@freebsd.org Received: from dire.bris.ac.uk (dire.bris.ac.uk [137.222.10.60]) by hub.freebsd.org (Postfix) with ESMTP id 6614A37BAA7 for ; Thu, 29 Jun 2000 05:43:19 -0700 (PDT) (envelope-from Jan.Grant@bristol.ac.uk) Received: from mail.ilrt.bris.ac.uk by dire.bris.ac.uk with SMTP-PRIV with ESMTP; Thu, 29 Jun 2000 13:43:16 +0100 Received: from localhost (cmjg@localhost) by mail.ilrt.bris.ac.uk (8.8.7/8.8.8) with ESMTP id NAA09228; Thu, 29 Jun 2000 13:43:09 +0100 (BST) Date: Thu, 29 Jun 2000 13:43:09 +0100 (BST) From: Jan Grant To: Troy Settle Cc: freebsd-questions Subject: RE: Where is the disk pace? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 29 Jun 2000, Troy Settle wrote: [ Re: inodes unreferenced by the file system ] > Gods, this happens so often to so many people. I've been forced to > reboot a server a couple times because of this [bug|feature]. > > I was told that this is the way it is, and that there was no room for > discussion. > > I'd really like to know what would be so hard about having the kernel > kick back a message of "permission denied: file open by process xxx" > when someone or something tries to unlink an open file. This would make > life so much easier for so many people, and it couldn't possibly be too > difficult to implement in the same portion of code that prevents the > unlinking of files by checking the flags. There is a great deal of code that relies on the semantics that an open file doesn't go away when unlinked, but you can unlink an poen file. A lot of programs allocate temp files, for example, by opening then (create and exclusive modes on) then unlinking the file and keeping the file descriptor. When the program terminates (normally or abnormally) its resources in the filesystem are cleaned up automatically. This "bug" as you put it is 99 times out of 100 due to incorrectly written log-rotation scripts. Since freebsd supplies one that does things the way most daemons like it (newsyslog) it makes you wonder what gives. This is certainly a FAQ; but I can't find a reference to it on the freebsd.org FAQ. jan PS. You may find that other filesystem types (MSDOS? NTFS?) have the semantics you describe. I wouldn't recommend using them for your /var however :-) -- jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/ Tel +44(0)117 9287163 Fax +44 (0)117 9287112 RFC822 jan.grant@bris.ac.uk Unfortunately, I have a very good idea how fast my keys are moving. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message