Free ext3 reserved blocks with tune2fs

3

As a security measure the ext3 file system reserves 5% of device space for administrative processes. This protects the system by allowing root processes to continue using the disk if a user process runs wild and fills it up. With today’s larger disk capacities, 5% equates into gigabytes of arguably wasted space. Thankfully with the tune2fs command you can reduce this percentage and free most if not all of the reserved space.

The tune2fs command utility operates exclusively on ext2/ext3 file systems.

To run these commands you must run the command as root or use sudo.

You can run tune2fs on the ext3 partition with the ‘-l‘ option to show you all the filesystem details. The important information to focus on are the “Reserved block count” and “Block size” lines. Multiply these lines together to see how many bytes are currently reserved on the filesystem.

That’s more than 7GB of space that is reserved.

Run the df command to see the current used space on the device before you make any changes.

Run the tune2fs command to change your reserved block percentage. The ‘-m‘ option sets the new reserved percentage.

In this example I am setting the percentage to 0 and completely removing the reserved space. This will effectively disable the security feature but free the most space. You may choose to reduce the reserved percentage instead in order to preserve the security benefit while still freeing some space.

You can confirm the changes have taken effect by viewing the filesystem details.

You can directly see the changes by looking at your system disk space usage. We now have an additional 7GB available.

Share.
  • Randolph Carter

    You ahouldn’t advise people to free ALL reserved space on ext2/3 filesistems.
    Leaving a little space at least gives you the peace of mind off knowing that the important stuff won’t crash if you get a little distracted and download too much (happened to me).
    Otherwise, great post, i’ll try it when I get some free time =)

  • Ryan

    That’s a good point. I made some clarifications to the post.

    Thanks for your input.

  • Pingback: Ext3 reserved blocks with tune2fs - Ext3 Ext4 Tutorial()