Ext4 Default Reserve Space: How I was losing 5% of drive space for no reason

FYI if you’re using ext4 as the format of your destination drives, or even tmp drives that get close to 100% capacity, If you used the defaults when formatting the drive it will reserve 5% of the capacity of the partition for root process purposes.

If you aren’t using the partition for your Linux root/home directory you can bump this reserved space down to 0 and shouldn’t run into issues, adding 5% capacity for storing more plots.

To check if you have reserved blocks on a plot drive, these were the commands I found useful:

Get the list of partitions:
df -h

For each partition that’s ext4 run this to check if there are reserved blocks:
tune2fs -l /dev/partition | grep 'Reserved'

Finally, use tune2fs to set the reserve blocks to 0:
tune2fs -r 0 /dev/partition

As far as I can tell this is safe to run and will not reformat the drive (I did it without problems AFAIK).

If you’re starting from an empty drive, you can use the -m parameter to set the % of blocks reserved to 0.

9 Likes

3 posts were merged into an existing topic: Ext4 users - remember to reduce reserved blocks!