dereenigne.org

reverse engineered

Reducing ext2/3/4 Overhead

If you are using Ext2/3/4 as a filesystem, you might not be aware that the system reserves a certain percentage of disk for root processes by default.

While this is normally useful on boot drives, it is a major hindrance on storage drives. Debian reserves 5% by default. On a 1 TB drive, this equates to approximately 47 GB!

This can percentage can be altered using tune2fs and the -m argument, followed by the percentage of blocks you wish to reserve.

root@dns323:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2             917G  775M  870G   1% /
tmpfs                  30M     0   30M   0% /lib/init/rw
udev                   29M   44K   29M   1% /dev
tmpfs                  30M     0   30M   0% /dev/shm
/dev/sda1             228M  4.8M  211M   3% /boot
/dev/sdb1             917G  667G  204G  77% /media/storage
root@dns323:~# umount /media/storage
root@dns323:~# tune2fs -m 0 /dev/sdb1
tune2fs 1.41.12 (17-May-2010)
Setting reserved blocks percentage to 0% (0 blocks)
root@dns323:~# reboot

root@dns323:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2             917G  774M  870G   1% /
tmpfs                  30M     0   30M   0% /lib/init/rw
udev                   29M   44K   29M   1% /dev
tmpfs                  30M     0   30M   0% /dev/shm
/dev/sda1             228M  4.8M  211M   3% /boot
/dev/sdb1             917G  667G  251G  73% /media/storage
root@dns323:~#

Note the increase in available space on /dev/sdb1.


comments powered by Disqus