Freeing Reserved Space in Partitions

Aug 28, 2011·
Julio Batista Silva
Julio Batista Silva
· 1 min read
blog Tutorial

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
Authors
Senior Cloud Developer

I’m a Brazilian computer engineer based in Germany, passionate about tech, science, photography, and languages.

I’ve been programming for about two decades already, exploring everything from mobile apps and web development to machine learning. These days I focus on cloud SRE and data engineering.

I volunteer in the open source and Python communities, helping organize PyCon DE and PyData Berlin, mentoring, and contributing with code and translations.

On my blog, I share Linux tips, setup guides, and personal notes I’ve written for future reference. I hope others find them helpful as well. The content is available in multiple languages.

Browse my gallery for some of my photography.

Away from the keyboard, you’ll find me at concerts, playing clarinet, cycling, scuba diving, or exploring new places, cultures, and cuisines.

Always happy to connect! 🙂

comments powered by Disqus