From owner-freebsd-stable@FreeBSD.ORG Tue May 8 14:55:33 2007 Return-Path: X-Original-To: freebsd-stable@FreeBSD.ORG Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 84FD316A404 for ; Tue, 8 May 2007 14:55:33 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.freebsd.org (Postfix) with ESMTP id E48C513C44C for ; Tue, 8 May 2007 14:55:30 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (enmbcn@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id l48EtO3v089196; Tue, 8 May 2007 16:55:29 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id l48EtNVm089195; Tue, 8 May 2007 16:55:23 +0200 (CEST) (envelope-from olli) Date: Tue, 8 May 2007 16:55:23 +0200 (CEST) Message-Id: <200705081455.l48EtNVm089195@lurza.secnetix.de> From: Oliver Fromme To: freebsd-stable@FreeBSD.ORG, ntstaff@gmail.com, peterjeremy@optushome.com.au In-Reply-To: <11e9464b0705080739u4202e4d0k5dbbef1670ffc335@mail.gmail.com> X-Newsgroups: list.freebsd-stable User-Agent: tin/1.8.2-20060425 ("Shillay") (UNIX) (FreeBSD/4.11-STABLE (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Tue, 08 May 2007 16:55:29 +0200 (CEST) Cc: Subject: Re: Incorrect df -k output?? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-stable@FreeBSD.ORG, ntstaff@gmail.com, peterjeremy@optushome.com.au List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 May 2007 14:55:33 -0000 Newtunes Support wrote: > I have resolved this issue using forsed unmount (umount -f /var) Not a good idea. It breaks all sorts of things. > And after I mounted /var again df -k shows me correct value. The value was correct before, too. There probably were some files that were removed, but some processes still had them open. du(1) doesn't see those files, so they're not included in the sum. df(1) sees the allocated space, of course. It can happen on the /var file system if an error occurs during log file rotation, so the programs writing to the log files (e.g. syslogd) are not properly informed about the rotation, so they keep the old files open. A good way to view such files/processes is to use the command "lsof +L1" (lsof can be installed from the ports collection: /usr/ports/sysutils/lsof). It lists all file descriptors in use that have a link count of zero. The correct way to resolve the issue is to find those processes and tell them to close the files (usually a "kill -HUP" will do that). If everything else fails, kill the processes (use "kill -KILL" if necessary). Do not use "umount -f". > But I have new problem. > fsck -y does not fix anything. That only works when the file system is not mounted (or only mounted read-only). It's usually done in single- user mode. (However, I assume that your file system doesn't need fsck, but it certainly wouldn't hurt either.) Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "Python tricks" is a tough one, cuz the language is so clean. E.g., C makes an art of confusing pointers with arrays and strings, which leads to lotsa neat pointer tricks; APL mistakes everything for an array, leading to neat one-liners; and Perl confuses everything period, making each line a joyous adventure . -- Tim Peters