Mysterious drive capacity numbers....?

Loïc Grenié loic.grenie at gmail.com
Tue Dec 14 13:33:26 UTC 2010


2010/12/14 Karl Auer <kauer at biplane.com.au>:
> On Tue, 2010-12-14 at 12:01 +0100, Loïc Grenié wrote:
>> > Filesystem           1K-blocks      Used Available Use% Mounted on
>> > /dev/sdb1            961432072  57820632 854773440   7% /media/nc1
>> >
>> > Note that the amount used is given as 57,820,632K - about 57GB.
>> >
>> > But 961 - 854 = 107. Where did the extra 50GB go?
>>
>>     That's 5% reserved "for root". Any non-root user can put data on the
>>   drive as long as used space is less than 912594072k. As soon as used
>>   space goes above 912594072k, only root can write (up to 961432072k).
>
> Makes sense, and as soon as I read your message I remembered about
> reserved space. I realised after writing my previous message that any
> formatting overhead is of course already reflected in the reported size
> of the partition. Which does mean a pretty large formatting overhead,
> but the 50GB I've "lost" are in addition to that.
>
> dumpe2fs shows a "reserved block count" of 12209500 and a block size of
> 4096. That's pretty close to 50GB :-) I think I will use tune2fs to
> lower that.
>
> Running "df -k" as root does not show different numbers, which is mildly
> irritating.

     Yes and no, "Available" always means "Available to Joe Random User".
  "Available to root" is the difference between "1K-blocks" and "Used". It'd
  be more difficult for root to know what space is available to a random user
  if "Available" were "Available to root".

     Just my opinion, of course,

         Loïc




More information about the ubuntu-users mailing list