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 14:50:06 +1000
Cc: linux-xfs <linux-xfs@xxxxxxxxxxx>
In-reply-to: <200506060249.j562nrXq032091@xxxxxxxxxxx>; from jcy_2008@xxxxxxx on Mon, Jun 06, 2005 at 10:48:45AM +0800
References: <200506060249.j562nrXq032091@xxxxxxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.2.5.1i
Hi Jacky,

On Mon, Jun 06, 2005 at 10:48:45AM +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      
>                              ~~~        ~~~
> # df -i
> Filesystem            Inodes   IUsed   IFree IUse% Mounted on
> /dev/md/0            732595328     487 732594841    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      
>                              ~~~        ~~~
> # df -i
> Filesystem            Inodes   IUsed   IFree IUse% Mounted on
> /dev/md/0            732595328       8 732595320    1% /vol
>                                    ~~~             ~~~
> 

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>