How to reclaim root reserved space on ext3

First off look at what you’ve got now:

[root@sql2 ~]# df -P /
Filesystem         1024-blocks      Used Available Capacity Mounted on
/dev/mapper/VolGroup00-LogVol00  81269424  66551212  10534464      87% /

Then check how much is reserved blocks for root:

[root@sql2 ~]# tune2fs -l /dev/mapper/VolGroup00-LogVol00 | egrep 'Block count|Reserved block count'
Block count:              20971520
Reserved block count:     1045937

Thats 5%, which is a pretty common default. Like a lot of old defaults its based on old hardware, we can get away with a lot less and I could use the space elsewhere (SSD is expensive). So lets tune it down to 1%:

[root@sql2 ~]# tune2fs -m 1 /dev/mapper/VolGroup00-LogVol00
tune2fs 1.39 (29-May-2006)
Setting reserved blocks percentage to 1% (209715 blocks)

Verify that:

[root@sql2 ~]# tune2fs -l /dev/mapper/VolGroup00-LogVol00 | egrep 'Block count|Reserved block count'
Block count:              20971520
Reserved block count:     209715

Looks good, lets see how much space we got:

[root@sql2 ~]# df -P /
Filesystem         1024-blocks      Used Available Capacity Mounted on
/dev/mapper/VolGroup00-LogVol00  81269424  66551756  13878808      83% /

Sweet, touch over 3GB

Leave a Reply