8
1
I've just noticed any of ext{2,3,4} filesystems i'm trying to create on 500G HDD don't use all available space (466G). I've also tried reiser3, xfs, jfs, btrfs and even vfat. All of them create fs of size 466G (as shown by df -h). However, ext* creates fs of 459G. Disabling reserved blocks increases space available to user, but size of fs is still 459G.
The same is for 1Tb HDD: 932G reiserfs, 917G ext4.
So, what is this 1.5% difference? Why it happens and is there the way to make ext fill whole volume?
UPD: All tests done on the same machine, on the same HDD etc. It doesn't matter how 466G differs from marketing 500G. The problem is it differs for different FS'.
About df - it shows total FS size, used size and free space. In this case I have:
for reiserfs:
/dev/sda1 466G 33M 466G 1% /mnt
for ext4:
/dev/sda1 459G 198M 435G 1% /mnt
If I turn root block reservation off, 435G changes to 459G - full size of fs (minus 198M). But fs itself is still 459G for ext4 and 466G for reiser!
UPD2: Filling volumes with real data via dd:
reiserfs:
fs:~# dd if=/dev/zero of=/mnt/1 dd: запись в «/mnt/1»: На устройстве кончилось место 975702649+0 записей считано 975702648+0 записей написано скопировано 499559755776 байт (500 GB), 8705,61 c, 57,4 MB/c
ext2 with blocks reservation turned off (mke2fs -m 0):
fs:~# dd if=/dev/zero of=/mnt/1 dd: запись в «/mnt/1»: На устройстве кончилось место 960356153+0 записей считано 960356152+0 записей написано скопировано 491702349824 байта (492 GB), 8870,01 c, 55,4 MB/c
Sorry for russian, but i've run it in default locale and repeating it is too long. It doesn't matter, dd output is obvious.
So, it turns out that mke2fs really creates smaller filesystem, than other mkfs's.
2Theres a certain amount of overhead with every FS... i dont know of one thats going to allow you to have access to all available physical space on the disk. – prodigitalson – 2010-08-15T17:07:42.143
I recommend you change your display name and put what seems to be your blog in the website field of your profile, to make it less blatantly advertising. – Hello71 – 2010-08-15T17:31:05.687
1Hello71, thanks for the advice. Website doesn't really matter, it's only for openid. – Ineu – 2010-08-15T17:35:23.743
For future note, if you quickly want a program to output in English, use
LANG=C foo
orLC_ALL=C foo
– Alan Pearce – 2010-08-19T16:00:52.157Alan, right, thank you. It could be even LANG= or LANG=POSIX. But as I said, this process takes lots of time so re-running it with different locale just for couple of lines is unreasonable :) In either case, it proves problem with FS size for ext2 :( – Ineu – 2010-08-20T08:02:47.887
If you're still paying attention here, I've added a whole ton more information to my answer. I suspect I have now answered your question. :-) – Omnifarious – 2012-11-07T20:50:15.317
Can you check it with
fdisk /dev/sda
(orcfdisk
if you have it) to get an overview, the starting and ending sector of sda1 and if there's another partition or some space left? – ott-- – 2012-11-07T21:02:47.453@ott--, unfortunately I no longer have this drive. The question is pretty old. – Ineu – 2012-11-12T19:59:22.987