Skip to content

Did you know?

ext4 reserves 5% of every disk for root by default.

On a large data disk you can lower it with tune2fs -m and get that space back.

Explained

When mkfs.ext4 creates a file system, it reserves 5% of the blocks for the root user. The reserve keeps a full disk from locking out system services and helps prevent fragmentation, which matters on the root file system. On a 4 TB data disk, though, it hides about 200 GB that regular users and applications can’t use.

See the current reserve:

sudo tune2fs -l /dev/sdb1 | grep -i 'reserved block count'

Lower it to 1% on a data partition. This works on a mounted file system and doesn’t touch your data:

sudo tune2fs -m 1 /dev/sdb1

Run df -h again and the extra space shows up under Avail. For a new disk, set the reserve when you create the file system with mkfs.ext4 -m 1.

Keep the default 5% on / and /var, where root-owned services need room to write logs when the disk fills up. XFS, the default on RHEL, doesn’t use a reserve like this.

Learn more

← All tech tips · Suggest a fix

Back to top