May 052011
 

tuxThe partitions that contains the ext3 and ext4 filesystems reserve the 5% of the total size of the filesystm by default. The idea here is even when you run out of disk space, the root user should still be able to log in and system services should still run. Without this option, the root user could be not able to acces and “clean up” since the system may become unstable, trying to log to in a filesytem full at 100%, for example. The other reason is to help the general optimization with less fragmentation of the filesystem.



This policy may have been appropriate in the 90s when hard disk capacities were relatively low but now one can get easily a 1TB hard drive. So 5% of that is about 50GB and those system services need only a couple of hundred megabytes.

So my suggestion is to move this value to 1% for the /home filesystem and lower also the value for the others filesystems, on a desktop systems perhaps you can have 1% on every file system without many problems.

To do this just connect as root into a terminal and give the command:

tune2fs -m 1 /dev/sdXX

Where /dev/sdXX it’s the partition you want to tune, you can see which are your partitions with the command df

To verify the correctness of the command or the current state you can use the command:

sudo  tune2fs -l /dev/sdXX

And check the value of “reserved blocks”.

Popular Posts:

Flattr this!

  4 Responses to “Free reserved space in ext3/ext4 Filesystems”

  1. Bad, bad, bad idea. The ext3/ext4 filesystems behave like hash tables. As the last few percent of the filesystem space is used the number of hash collisions that occur trying to read/store data increases drastically and filesystem performance drops to a crawl.

    • hmhm i did some research and not find anything about this, could you please give me some url/pointer ?

      Thanks !

      • This is fairly easily demonstrated by filling up a filesystem including that part which would have been reserved.

        Whether hash collisions (the explanation I found digging into the ext2 structure originally) or having to look up many places where a file is fragmented, the effect occurs. I am not certain if it is as bad as when disks were smaller and the reserved percentage was also relatively smaller.

        But I have tried this repeatedly and it never works.

  2. bad for performances: check what the author of ext4 is writing about this
    https://www.redhat.com/archives/ext3-users/2009-January/msg00026.html

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

*