Saturday, June 6, 2009

Reclaim Linux Disk Space by Reducing Reserved Blocks

Reclaim linux disk space by reducing reserved blocks
In a default install Linux reserves 5% of the disk space for previleged processes. It is a precationary measure on part of Linux to keep up even after the filesystem is filled up, and about 5% reserved space was good idea when the hard drive were less than 40GB. Now, when the hdd have gone beyond 100 GB of capacity (hard drives with 1TB capacity have also reached the shelves).

In a 1 TB hard drive, the default 5% reserved blocks would mean 50 GB. So, it's better to reduce the reserved blocks to a reasonable count. 1% reserved block count is enough for home desktops with disk capacity more than 100GB.

You can use tune2fs utility to reduce reserved blocks in ext2, ext3 as well as ext4 filesystems. To reduce reserved blocks to 1% use the following command:

tune2fs -m1 /dev/sda1 (replace sda1 with your partition name)

In a 1 TB hard drive you can save upto 37GB of space after applying this tweak.

1 comment:

Anonymous said...

thanks alot for that, i recently installed a new tb drive. something i had not thought of :)

Share your thoughts