Get some disk space back for free

December 5, 2021 - Reading time: ~1 minute

By default the file system reserves 5% of partition space to priviledged user and processes, on a 1TB disk it starts to become insanely high number. Here is the manual part of tune2fs tool explaining it:

-m reserved-blocks-percentage
             Set  the  percentage of the file system which may only be allocated by privileged processes. Reserving some number of file system blocks for use by privileged processes is done to avoid file system fragmentation, and to allow system daemons, such as syslogd(8), to continue to function  correctly after non-privileged processes are prevented from writing to the file system.  Normally, the default percentage of reserved blocks is 5%.

Using the tune2fs tool we can get it to more reasonable level, example:

$ sudo tune2fs -m 1 /dev/nvme0n1p2

tune2fs 1.46.4 (18-Aug-2021)
Setting reserved blocks percentage to 1% (2441126 blocks)

1% of my 1TB partition is still very high value, but that got me back roughly 40GB of disk space already.