Walker News

Why The Linux df Command Shows Lesser Free Disk Space?

On Linux filesystem with huge disk space, you might notice that the df command does not show available free disk space correctly. It is not a bug of the df command, but then why it shows lesser free disk space?

Take a look at this screenshot, where the available free disk space (avail) is apparently not match or tally with the total disk space (size) minus total used disk space (used), i.e. 146GB – 115GB = 31GB:

Why the Linux df command does not show free disk space correctly?

So, where is the 7GB disk space goes? How to reclaim the missing free disk space that is large enough to store at least 2 DVD ISO image files?

That missing free disk space is actually set as reserved disk space of EXT3 filesystem. By default, the installer allocates 5% of filesystem total disk space as reserved disk space.

To find that out, you can use tune2fs command to display or check the total reserved disk space, e.g.:
tune2fs -l /dev/mapper/VolGroup00-LogVol00 | grep -e "Reserved block count" -e "Block size"

As you can see (below), block size is 4096 bytes (4KB) and reserved block count is 1973043, which is about 7GB that that is missing from df command:

Uses the Linux tune2fs to optimize Linux filesystem!

Similarly, you can use “tune2fs -m” or “tune2fs -r” command to reduce this reserved block count (to reclaim missing free disk space). For more information on how to use the tune2fs command, just type man tune2fs to get reference right on Linux command prompt or previous post titled Tune2fs Command May Increase Linux Free Disk Space.

Custom Search

2016  •  Privacy Policy