6

I have a server with a 3TB disk attached. I want to reduce the reserved blocks using tune2fs. Reducing the default 5% to 1% allows me to get a lot of extra space.

Before applying in real server, I have tested in my test environment,

Before : /dev/sdb ext4 3.9G 8.0M 3.7G 1% /root/mount1

command: tune2fs -m.5 /dev/sdb

after: /dev/sdb ext4 3.9G 8.0M 3.7G 1% /root/mount1

As you can see, df -hT shows same size 3.9G. But reserved blocks are reduced when checked with tune2fs -l /dev/sdb. Why df is not taking new size?

2 Answers2

6

Reserved blocks are already a part of the filesystem, you shouldn't have any expectation of getting a 'lot of extra space'.

If you fill up the filesystem as a regular (non-root) user it's not actually full. The reserved blocks are still there and ready for use, but only by the root user. Reducing the reserved blocks does not increase the space one bit, it simply allows a non-root user to fill up more of the space that is already available.

0

tune2fs -m works on a mounted drive according to tune2fs -l, but is reverted on unmount. To make it persistent, unmount first. df seems to report whatever is read at the time of mounting the drive. Tested on ext4 inside a file mounted as a loop device.