[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [bug?] df and du -s output inconsistent?



Ethan Benson <erbenson@alaska.net> writes:

> On Thu, Mar 09, 2000 at 09:24:41AM +0900, Olaf Meeuwissen wrote:
> 
> > There is something funny about the output of df and du -s.  Just take
> > a look at the typescript below:
> > 
> >   bash-2.03$ df /home
> >   Filesystem           1k-blocks      Used Available Use% Mounted on
> >   /dev/hda7              2058900   1652232    300239  85% /home
> >   bash-2.03$ du -s /home
> >   661643	/home
> > 
> > According to df about 1.6Gb of the /home partition are used whereas du
> > -s says it about 1Gb less.  Who's wrong?  Or am I missing something?
> 
> im too lazy to do the math but remember that ext2 filessytems reserve
> by default 5% of the filesystem for the superuser, you can see this
> descrepency in df on an empty filesystem where is says only 100K or
> such is used and yet available is 5% less then 1k-blocks.

Uhm, the figures concerned are 0.6, 1, 1.6 and 2 gigabytes.  I see no
(sensible) way of getting 5% out of those even without doing any math.
Closest I come is 20% ;-)

Your 5% for the superuser is 0.1 gigabytes.  It's not even close :-)

Any other suggestions?

-- 
Olaf Meeuwissen       Epson Kowa Corporation, Research and Development


Reply to: