Monday, February 15, 2016

How to free reserved space on ext2/3/4 partitions

Linux by default, set aside around 5% of the total space in a partition for the root user and system service. For systems partition like /, this does make sense, since you won't be able to login if your / is full, but for other partitions, it does not seems that the reserve will help in any way.

You can find how much is being set as reserved by running:
$ sudo tune2fs -l /dev/sda1 | grep 'Reserved block count'
Reserved block count:     27709

So, for ext3/4 partitions, you can reclaim that reserve space by setting the reserve count to 0:
$ sudo tune2fs -m 0 /dev/sda1

Reserved block count will be 0% after the above command
$ sudo tune2fs -l /dev/sda1 | grep -i 'Reserved block count'
Reserved block count:     0

You can now fully enjoy the maximum space available for your partition.

No comments:

Post a Comment