Maximize the available free space on ext3fs partitions
By default, the file system Ext3 reserves a little less than 5% of the available space in the system. This space is used in particular to limit fragmentation. This howto helps you to recover this space.
Warning
This change can affect the performance of your system. Removing the reserved disk space increase the risk of the file system fragmentation.
Use this howto as last resort only.
Settings
Select the partition where to apply the space recovery :
PART="/dev/sda5"
Installation
Check the current reserved block count :
command sudo dumpe2fs ${PART} | command grep "Reserved block count"
For a 73 GB partition with 18 GB of free space, the result is :
# dumpe2fs 1.40-WIP (14-Nov-2006)
# Reserved block count: 896024
Free the reserved blocks :
command sudo tune2fs -m 0 ${PART}
Check the current reserved block count :
command sudo dumpe2fs ${PART} | command grep "Reserved block count"
You should get this result :
# dumpe2fs 1.40-WIP (14-Nov-2006)
# Reserved block count: 0
The 73 GB partition used as example show now 22 GB free space. This is a 4 GB free space gain. 5% of total partition space has been freed.
Thanks
- Thanks to Termitor for tipping me of this manipulation on IRC channel #ubuntu-fr.
- Thanks to Linux c'est cool website for leurs trucs.