Free reserved space on ext4 partitions (or change reserved block percentage)

By default, 5% of a new ext2/3/4 partition will be reserved for important root processes and for fs performance reasons. However, there may be sound reasons to lower that percentage or even disable it completely (non-root partition, data-only storage, huge files, ext4 etc.).

Let me quote Linux filesystem guru Ted Ts’o on this:

If you set the reserved block count to zero, it won’t affect performance much except if you run for long periods of time (with lots of file creates and deletes) while the filesystem is almost full (i.e., say above 95%), at which point you’ll be subject to fragmentation problems. Ext4’s multi-block allocator is much more fragmentation resistant, because it tries much harder to find contiguous blocks, so even if you don’t enable the other ext4 features, you’ll see better results simply mounting an ext3 filesystem using ext4 before the filesystem gets completely full.

If you are just using the filesystem for long-term archive, where files aren’t changing very often (i.e., a huge mp3 or video store), it obviously won’t matter.

You can change the reserved block percentage by invoking

tune2fs -m 1 /dev/sdb1

or disable it completely:

tune2fs -m 0 /dev/sdb1

To check, how many block are reserved on a given filesystem, run

tune2fs -l /dev/sdb1 | grep "Reserved block count"

Of course, you have to adjust /dev/sdb1 to your needs.

Resources:
http://unix.stackexchange.com/questions/7950/reserved-space-for-root-on-a-filesystem-why
See also tune2fs manpage

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.