From owner-freebsd-questions Mon Sep 29 01:39:08 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id BAA27789 for questions-outgoing; Mon, 29 Sep 1997 01:39:08 -0700 (PDT) Received: from gatekeeper.barcode.co.il (gatekeeper.barcode.co.il [192.116.93.17]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id BAA27769 for ; Mon, 29 Sep 1997 01:39:00 -0700 (PDT) Received: (from smap@localhost) by gatekeeper.barcode.co.il (8.8.5/8.6.12) id KAA24222; Mon, 29 Sep 1997 10:35:46 +0200 (IST) X-Authentication-Warning: gatekeeper.barcode.co.il: smap set sender to using -f Received: from localhost.barcode.co.il(127.0.0.1) by gatekeeper.barcode.co.il via smap (V1.3) id sma024219; Mon Sep 29 10:35:22 1997 Message-ID: <342F684B.7F67@barcode.co.il> Date: Mon, 29 Sep 1997 10:35:23 +0200 From: Nadav Eiron X-Mailer: Mozilla 3.0 (X11; I; SunOS 5.5.1 sun4u) MIME-Version: 1.0 To: Greg Lehey CC: Donn Miller , freebsd-questions@FreeBSD.ORG Subject: Re: "df" estimates are off References: <19970929153303.59702@lemis.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Greg Lehey wrote: > > On Mon, Sep 29, 1997 at 01:13:06AM +0000, Donn Miller wrote: > > Hello, > > > > Recently, I've noticed that the df command has been showing negative disk > > space, and was wondering how far negative it could go until the /usr > > partition was full: > > > > Filesystem 1K-blocks Used Avail Capacity Mounted on > > /dev/wd0a 48431 39551 5006 89% / > > /dev/wd0s1 423072 392984 30088 93% /dos > > /dev/wd0s4e 548911 526867 -21868 104% /usr > > procfs 4 4 0 100% /proc > > > > But then I noticed that, for /usr, it shows -21868 avail, but when doing > > the math, 22044 is actually available. For /, shows 5006, but act. free > > space is 8880. > > ufs allows users access to only 90% of the total space on disk. The > rest is reserved for root. To make it more confusing, the 90% mark > can be changed with tunefs(8), so the designers chose to refer to > whatever this mark is as 100%. Under normal circumstances, this means > that root can pump the file system up to 111% of its nominal > capacity. This is *bad*, especially on /usr, since no normal user can > write to the disk any more. And then there is the performance issue. This margin is designed to allow the filesystem to wisely place files on disk (to avoid DOS-style fragentation). By filling it up you also loose performance. > > > The disk usage for /dos is right on target. > > This suggests that /dos is not ufs. > > > Is it because df is allowing for a 'safety margin' of free space, or do I > > need to reboot or rebuild some database or something? > > You need to remove some data, or you'll run into trouble. > > Greg Nadav