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

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



On Thu, Mar 09, 2000 at 09:24:41AM +0900, Olaf Meeuwissen wrote:
> Hi all,
> 
> Yesterday I got an I/O error telling me that the /home file system was
> full.  Bummer!  Checked with df and sure 0% free in /home.  Looked all
> over /home to find disk hogs and removed a really big .xsession-errors
> file---still have to find out what caused that---and thought all would
> be well again.  Unfortunately, nope!  I'v since removed some more gunk
> and can work again, but ...
> 
> 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?
> 
> Thanks in advance.

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.

you can adjust this with tune2fs.

-- 
Ethan Benson


Reply to: