You are not logged in.

#1 2016-08-31 12:17:47

mir91
Banned
Registered: 2013-11-17
Posts: 143

Much reserved space on new ext4 partition - not a root-reserve

I just used gparted to create an ext4 partition over 8484 MB and gparted itself shows right after finishing up that it has 280MB used space already.

I used tune2fs to set the reserved space for root to 0%, but that didn't change anything.
I tried running mkfs.ext4 with -m 0 manually, but that would even end up with 290MB used space, hah!

Any idea why ~3.3% of the partition capacity is used and how I could possibly reduce that to <1%? I used df -i to check if it's the inodes, but those are displayed by df to only use 1M.

Other things I tried:
Making the partition 8192 MB instead - same result.
Making the partition Fat32 instead of Ext4 - works fine! Only 8MB reserved space instead of 280, but I don't want to use Fat32, it was just for testing.

Edit:
Now I was able to reduce it to 173MB used, by specifying -i 262144.
However, unfortunately larger values will not yield noticably better results, even the maximum allowed value will only save another 10MB or so, going down to about 160MB.

Last edited by mir91 (2016-08-31 12:35:16)

Offline

#2 2016-08-31 12:33:40

Awebb
Member
Registered: 2010-05-06
Posts: 6,286

Re: Much reserved space on new ext4 partition - not a root-reserve

You have read and understood this: https://wiki.archlinux.org/index.php/ex … ved_blocks ?

Offline

#3 2016-08-31 12:40:40

mir91
Banned
Registered: 2013-11-17
Posts: 143

Re: Much reserved space on new ext4 partition - not a root-reserve

Awebb wrote:

You have read and understood this: https://wiki.archlinux.org/index.php/ex … ved_blocks ?

Thank you for your reply, but please read my question carefully. I pointed out that it is not reserved blocks in both the title and the text.

Offline

#4 2016-08-31 20:18:28

Awebb
Member
Registered: 2010-05-06
Posts: 6,286

Re: Much reserved space on new ext4 partition - not a root-reserve

I just wanted to make sure you understand. Your attempt to use tune2fs to reduce it to <1% indicated otherwise. Never mind then.

Have a look at the tune2fs -r switch in the manpage instead. I suspect that -m still has some sort of safety margin or uses some weird calculation. I also suspect this to be related to the journal. Try an ext4 without a journal, like "mkfs.ext4 -O ^has_journal /dev/sdXY".

EDIT:

You should also try a smaller partition size to see, whether the wasted space grows or shrinks, as well as ext3, to see if ext4 simply "pre-allocates" some space for internal use.

Last edited by Awebb (2016-08-31 20:20:12)

Offline

#5 2016-08-31 22:02:32

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Much reserved space on new ext4 partition - not a root-reserve

If I'm not mistaken ext4 also reserves some space to allow you to later grow the filesystem, you could probably also save some space there, but not much I suppose. You might be able to save more space by tuning the bytes-per-inode tunable but you need to know very well what you are doing and have a good estimate of the size/number of file you will save on the filesystem.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

Board footer

Powered by FluxBB