Skip to main content


sudo apt updatesudo apt install gitsudo apt build-dep e2fsprogs  # see to enable source package supportcd $(mktemp -d)git clone -b v1.44.2 e2fsprogscd e2fsprogs./configuremakecd resize./resize2fssudo umount /dev/mapper/target-devicesudo ./e2fsck -fn /dev/mapper/target-devicesudo ./resize2fs -fb /dev/mapper/target-devicesudo ./resize2fs -fp /dev/mapper/target-devicesudo ./e2fsck -fn /dev/mapper/target-devicesudo mount /dev/mapper/target-device

title: Resize2fs - fs 5pc lost space

category: Linux#

When a file system is created, 5% of all blocks are reserved for the super user (for writing logs etc.).If this disk is only for storing files (and e.g. doesn't contain /var/) you can set this to 0% (or you may keep 1% just in case):

tune2fs -m 0 /dev/sda5