Freeing Reserved Space in Partitions

When we format a partition in ext2, ext3, or ext4, 5% of the space is automatically reserved for the root user.

This policy is a legacy from a time when disks were very small. In current 2TB capacity hard drives, 5% represents 100GB, which is absurdly large since 50MB would be enough.

Here I will show how to reduce the reserved space for the root user using tune2fs.

Before using tune2fs:

julio@julio-acer ~> df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sdb3 1.7T 1.5T 155G 91% /media/externo

Using tune2fs to reserve only 20000 blocks (82MB):

julio-acer# tune2fs -r 20000 /dev/sdb3
tune2fs 1.41.14 (22-Dec-2010)
Setting reserved blocks count to 20000

After tune2fs:

julio@julio-acer ~> df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sdb3 1.7T 1.5T 243G 87% /media/externo

For disks used only for storage, it is not necessary to reserve any space. We can use tune2fs to reserve 0% of the disk with the following command:

julio-acer# tune2fs -m 0 /dev/sda7
tune2fs 1.41.14 (22-Dec-2010)
Setting reserved blocks percentage to 0% (0 blocks)
Julio Batista Silva
Julio Batista Silva
Data Engineer

I’m a computer engineer passionate about science, technology, photography, and languages. Currently working as a Data Engineer in Germany.

comments powered by Disqus