xfs
[Top] [All Lists]

Re: XFS Use% mismatch!

To: Jacky Kim <jcy_2008@xxxxxxx>
Subject: Re: XFS Use% mismatch!
From: Tim Shimmin <tes@xxxxxxx>
Date: Mon, 6 Jun 2005 15:21:46 +1000
Cc: Tim Shimmin <tes@xxxxxxx>, linux-xfs <linux-xfs@xxxxxxxxxxx>
In-reply-to: <200506060511.j565B7Xq014185@xxxxxxxxxxx>; from jcy_2008@xxxxxxx on Mon, Jun 06, 2005 at 01:10:01PM +0800
References: <200506060511.j565B7Xq014185@xxxxxxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.2.5.1i
On Mon, Jun 06, 2005 at 01:10:01PM +0800, Jacky Kim wrote:
> >> After some days, I found some mismatch ploblem:
> >> 
> >> # df -h
> >> Filesystem            Size  Used Avail Use% Mounted on
> >> /dev/md/0             699G   93G  607G  14% /vol   
>                                 ~~~        ~~~
> It says that 93G(14%) is used, but actually about 1M is used:
> # du --max-depth=1 -m /vol 
> 0       /vol/backup
> 0       /vol/database
> 1       /vol
> 
> >> But when I remount it, and it seems ok:
> >> 
> >> # df -h
> >> Filesystem            Size  Used Avail Use% Mounted on
> >> /dev/md/0             699G  2.0M  699G   1% /vol   
>                                ~~~        ~~~

Sorry, I thought you were comparing the tilde underlined fields.
You're saying it looks like the counters for space and inodes
are not being properly updated until you remount.
Okay, not so good :(


> >> 
> >
> >I not 100% certain what you are saying :)
> >If you are saying that the %Used is not matching with what
> >is used/total-number then I can't quite see that.
> >This is done by df(1) code and looking at df code on IRIX (assume it's
> >pretty similar to Linux) it does value*100/total and then takes the
> >ceiling of that value (rounds up to next integer).
> >(ie. if 0 < x <= 1, now matter how small it will report 1%.)
> >e.g. 93*100/699 = 13.3%; ceil(13.3) = 14%
> >     487*100/732595328 = 0.000006; ceil(0.000006) = 1%
> >--Tim
> >


<Prev in Thread] Current Thread [Next in Thread>