Log #2: 400GB reserved? In this economy?
I recently added an 8TB HDD to my homelab. The disk had exFAT filesystem by default with 7.3TiB[0] available space. After I formatted it to ext4, the available space went down from 7.3TiB to 6.9TiB.
400GiB gone? That’s Rs. 2000 worth of storage these days. I found out with a little googling that ext4 reserves 5% of storage for root user[1] and to avoid filesystem fragmentation[2] .
Fortunately, this is configurable with tune2fs command-line utility, and safe
to do for data drives. Even on system drives, this can be safely changed to 1%.
The 5% figure was set a long time ago when drives were small and 5% was a few
MBs at best. Since my drives are solely for storage, I set it to 0%.
$ sudo tune2fs -m 0 /dev/sdb1
tune2fs 1.47.0 (5-Feb-2023)
Setting reserved blocks percentage to 0% (0 blocks)
I reclaimed 400GiB on this drive plus 200GiB on another. This space will now be utilised to hoard some Linux ISOs[3].
[0]: https://www.reddit.com/r/techsupport/comments/3jn35q/comment/cuqma8n/
[1]: https://unix.stackexchange.com/questions/7950/reserved-space-for-root-on-a-filesystem-why
[2]: https://en.wikipedia.org/wiki/File_system_fragmentation
[3]: https://www.reddit.com/r/DataHoarder/comments/79axoj/comment/dp0i4e3/