If you format a large hard drive in Ubuntu Linux using the standard ext4 filesystem, you may be shocked to discover that a massive chunk of your storage space is instantly missing. By default, the mkfs.ext4 utility automatically reserves exactly 5% of the total disk blocks exclusively for the root user.
This 5% reservation is a brilliant safety mechanism for your primary OS drive (/dev/sda1). If a rogue log file fills up your entire hard drive, normal users will be blocked from writing data, but the root user can still dip into the reserved 5% to log in, run administrative commands, and delete the offending files to save the system.
However, if you are formatting a massive 10 Terabyte external hard drive strictly for media storage or backups, losing 5% of your drive means you are throwing away 500 Gigabytes of usable space for absolutely no reason. You should remove this reservation on non-system drives.
How to Remove the Ext4 Reserved Blocks
You can instantly reclaim this space without reformatting the drive by using the tune2fs command.
- Open your terminal application (
Ctrl+Alt+T). - First, identify the exact partition name of your storage drive (e.g.,
/dev/sdb1) by running:
lsblk or sudo fdisk -l
- Once you are 100% sure of the partition name (do NOT do this on your main OS drive), run the following command to set the reserved blocks percentage to 0%:
sudo tune2fs -m 0 /dev/sdb1
(Replace /dev/sdb1 with your actual partition).
- The terminal will output:
Setting reserved blocks percentage to 0% (0 blocks).
You have instantly reclaimed all of your missing storage space. If you open your file manager or run the df -h command, you will see that hundreds of gigabytes of free space have magically appeared and are now available for your personal files.