Wrong Disk Usage - A Bug?

I am running Openwrt v18.06.1 on TpLink TD-W8980 v1 and there seems to be a bug in disk usage stats that display from df command. I am using external HDD 500 GB with the router, 2 partitions are on the driver, both formatted as ext4. First partition is for the root and has a capacity of 1 GB, next one is the remainder of the drive.

Everything works as expected but the command shows a little different results:

root@AhmarRouter:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 5.0M      5.0M         0 100% /rom
tmpfs                    28.9M      1.2M     27.6M   4% /tmp
/dev/sda1               951.7M     16.0E    937.9M 100% /overlay
overlayfs:/overlay      951.7M     16.0E    937.9M 100% /
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/sda2               435.6G     39.0G    373.4G   9% /data
root@AhmarRouter:~# df -m
Filesystem           1M-blocks      Used     Available Use% Mounted on
/dev/root                    5         5         0     100% /rom
tmpfs                       29         1        28      4%  /tmp
/dev/sda1                  952 17592186044375  938     100% /overlay
overlayfs:/overlay         952 17592186044375  938     100% /
tmpfs                        1         0         1      0%  /dev
/dev/sda2               446100     39933    382355      9%  /data

As it shows, the used part shows a very large number in there although that is not possible because of the size of the partition. One more thing is that the LuCI shows 993.11 MBs as free space in Software tab but the free percentage is around 104%. It is definitely inconsistent.

1 Like