xfs
[Top] [All Lists]

Re: XFS Use% mismatch!

To: "Tim Shimmin" <tes@xxxxxxx>
Subject: Re: XFS Use% mismatch!
From: "Jacky Kim" <jcy_2008@xxxxxxx>
Date: Mon, 6 Jun 2005 13:10:01 +0800
Cc: "linux-xfs" <linux-xfs@xxxxxxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
>> 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     
                               ~~~        ~~~
>> 
>
>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>