Running the official openwrt-21.02.0-rc4-x86-64-generic-squashfs-combined.img on Ubuntu 20.04 with KVM, the space available of the overlay seems wrong after the initial boot. df reported 58.2M of 98.1M was already used in /overlay, however du said /overlay only contains 50.5K data. A quick test with dd also verified the actual space available reported by df is correct.
So, this is the initial boot of the official image, how come 58.2M space on overlay got occupied? And the file occupying the space is invisible in the file system tree?
BusyBox v1.33.1 (2021-07-31 17:21:01 UTC) built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt 21.02.0-rc4, r16256-2d5ee43dc6
-----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:~# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 4.0M 4.0M 0 100% /rom
tmpfs 242.8M 64.0K 242.7M 0% /tmp
/dev/loop0 98.1M 58.2M 39.8M 59% /overlay
overlayfs:/overlay 98.1M 58.2M 39.8M 59% /
/dev/sda1 15.7M 4.8M 10.7M 31% /boot
/dev/sda1 15.7M 4.8M 10.7M 31% /boot
tmpfs 512.0K 0 512.0K 0% /dev
root@OpenWrt:~# du -sh /rom /tmp /overlay /boot /
12.3M /rom
64.0K /tmp
50.5K /overlay
4.7M /boot
12.3M /
root@OpenWrt:~# dd if=/dev/zero of=test bs=1024k count=100
dd: error writing 'test': No space left on device
40+0 records in
39+0 records out
Thanks!