(Foutrelis didn't see the "reply to all" button :) )
Begin forwarded message:
Date: Sun, 15 Feb 2009 02:59:52 +0200
From: Evangelos Foutras <foutrelis(a)gmail.com>
To: Dieter Plaetinck <dieter(a)plaetinck.be>
Subject: Re: SI/IEEE, MiB,MB bits (pun intended)
Dieter Plaetinck wrote:
> As far as I understand:
> SI prefixes are, and always have been multiples of 10. ( eg
> 10^3,10^6)
>
> But, many people have abused SI prefixes to denominate numbers like
> 2^10 (1024), 2^20 etc.
> Eg OS vendors and many software developers have used this definition,
> while hard disk vendors used the real meaning
>
> So, along came IEEE to introduce prefixes for these binary multiples,
> so that we can use SI prefixes only for what they are
> meant (ieee at the same time also definined some more things like
> b=bit, B=byte, etc)
>
That's pretty much my understanding too.
> But, if I create in the installer a partition of the size 10.000MiB:
>
> echo $(((2**20)*10000))
> 10485760000 <-- this is the amount of bytes I expect to see on the
> blockdevice.
>
> fdisk -l says:
> 10487232000 bytes
> Why is it not the same?
>
Perhaps rounding takes place? 10487232000 bytes is about 10001.4 MiB,
which is pretty close to the 10000 you specified.
> Also a df -m (-m is not documented? but it says "1M" blocks) of the
> filesystem (ext2) yields 9845M. If 1M means 10^6 then this is wrong
> because it would be way too few, and if it means 1MiB than it's also
> still wrong. how much space can you loose by formatting a block
> device as ext2? Even after setting reserved blocks to 0 (tune2fs -r
> 0 /dev/sda3) It still is 9845M. (the amount available is 9823M
I believe there is around one percent file system overhead (I don't
have any documentation to support my claim though). And probably this
is used to store inodes (amongst other information?):
[root@archiso ~]# tune2fs -l /dev/sda3 | grep -P '(Inode count)|(Inode
size)'
Inode count: 640848
Inode size: 256
[root@archiso ~]# echo $((640848*256/2**20))
156
So, with each inode taking up 256 bytes of space, and a total of 640848
inodes, it adds up to 156 MiB. Add that to what df -m reports (9845
MiB) and you get ~10000 MiB.
PS: If someone knows more about this stuff, please do share your
knowledge! :3