[Techtalk] df isn't accurate?
Telsa Gwynne
hobbit at aloss.ukuu.org.uk
Sat Oct 26 14:40:19 EST 2002
On Fri, Oct 25, 2002 at 11:09:54PM +0200 or thereabouts, Magni Onsoien wrote:
> On Fri, Oct 25, 2002 at 11:52:59AM -0700, Laurel Fan said:
> > On Fri, Oct 25, 2002 at 11:39:08AM -0700, jennyw wrote:
> > > Does df not accurately report free space information?
"man df" does not mention this, but a cross-reference in "info df"
is to "Block size", and it does mention that numbers are normally
rounded:
Some GNU programs (at least 'df', 'du', and 'ls') display file sizes
in "blocks". You can adjust the block size to make file sizes easier
to read. The block size used for display is independent of any
filesystem block size.
Normally, disk usage sizes are rounded up, disk free space sizes are
rounded down, and other sizes are rounded to the nearest value with ties
rounding to an even value.
> > At some point before the disk is completely full, only root is allowed
> > to consume space. I believe the default amount of space reserved is
> > 5%. This is configurable when creating/formatting the filesystem, but
> > I'm not sure if you can change it in an existing filesystem.
At some stage, I scribbled a note to myself that reserved blocks
were 5-10% of the filesystem, but I didn't scribble down where I
got this information. Go me :)
> There may also be a shortage of inodes, since maildir use one of them
> for each file (plus some for directories and stuff).
>
> Try df -i and if that reports IUse close to 100% you have a problem :-)
Ouch. It wasn't with Maildir, but I have been bitten by this in
the past. Once it _has_ happened to you, it's something you think
of in pretty short order when faced with it again, but I would
never have figured it out on my own had I not just been reading
about it happening to someone else :)
Telsa
More information about the Techtalk
mailing list