From owner-freebsd-questions@FreeBSD.ORG Thu Feb 5 12:55:10 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A7B5516A4D0 for ; Thu, 5 Feb 2004 12:55:10 -0800 (PST) Received: from delicious.cs.wisc.edu (delicious.cs.wisc.edu [128.105.167.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id EBA9343D3F for ; Thu, 5 Feb 2004 12:54:36 -0800 (PST) (envelope-from ncb@cs.wisc.edu) Received: from localhost (ncb@localhost) by delicious.cs.wisc.edu (8.9.2/8.9.2) with ESMTP id OAA17978; Thu, 5 Feb 2004 14:53:58 -0600 (CST) Date: Thu, 5 Feb 2004 14:53:58 -0600 (CST) From: "Nathan C. Burnett" To: Herbert Wolverson In-Reply-To: <20040205211207.GA25512@charizard.tsghelp.com> Message-ID: References: <20040205211207.GA25512@charizard.tsghelp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-questions@freebsd.org Subject: Re: Free space wierdness X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2004 20:55:10 -0000 I recently had a similar phenomenon happen on a Linux box, but the same could happen on BSD I believe. The problem ended up being that a process had created a bunch of huge files, then deleted them but hadn't closed them yet. The space doesn't get reclaimed until the file is deleted and has no open file descriptors. This is why the space came back after the reboot. If it happens again you can use 'lsof' (available in the ports collection) to find out what's holding the descriptors open. As for being over 100% capacity, I believe UFS (like most *nix filesystems) reserves some amount of space that only root can use. This lets you boot and repair a system is an important filesystem (e.g. /, /usr) is full. Hope this sheds some light, -Nate On Thu, 5 Feb 2004, Herbert Wolverson wrote: > I have a system running FreeBSD 4.9-RELEASE. It primarily functions as a firewall and > router, and is generally pretty lightly loaded (load averages around 0.2). It > is a low end system (P200, 64mb RAM, 2 gig hard drive), and is generally > stable as a rock. > > The system has drives setup as follows: > / 256M (UFS) > /usr 1.2gb (UFS+Softupdates) > (/var and /tmp are linked onto /usr/var and /usr/tmp respectively) > > This morning I noticed that the "/" partition was at 108% utilization, > and "df -h" looked like this (approximately): > > Filesystem Size Used Avail Capacity Mounted on > /dev/ad0s1a 252M 256M -8M 108% / > > Oddly, "du -h -d1 -x" showed only a total of 29Mb used on the partition! > The output looked like this: > > su-2.05b# du -h -d1 -x > 68K ./dev > 2.0K ./usr > 2.7M ./stand > 1.3M ./etc > 512B ./proc > 4.0M ./bin > 542K ./boot > 2.0K ./mnt > 6.4M ./modules > 30K ./root > 12M ./sbin > 4.0K ./tmp > 4.0K ./oldvar > 29M . > > When I rebooted the system (without deleting any files), "df -h" showed > the following: > > Filesystem Size Used Avail Capacity Mounted on > /dev/ad0s1a 252M 29M 203M 12% / > > This is good, since the correct amount of free space now shows, and the > server is back to running perfectly. Can anyone shed any light as to why > this discrepancy happened in the first place? I'd love to know what I can do to avoid ever having to worry > about this again! > > Thanks, > Herbert Wolverson, > The Turner Stephenson Group, Inc. > http://www.tsghelp.com/ > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" >