Unexplainable disk space usage on the overlay partition on TP-Link TD-W8970 v1 with OpenWrt 22.03.0-RC4

Hi, I'm trying the new 22.03.0-RC4 build on my TP-Link TD-W8970 v1 which was running the 21.02.3. After the upgrade (for which I specified to NOT keep existing configurations), I noticed that, after the first boot, the overlay FS was reporting 42% of the overlay partition as used.

root@OpenWrt:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 4.5M      4.5M         0 100% /rom
tmpfs                    27.3M    996.0K     26.3M   4% /tmp
/dev/mtdblock4          576.0K    240.0K    336.0K  42% /overlay
overlayfs:/overlay      576.0K    240.0K    336.0K  42% /
tmpfs                   512.0K         0    512.0K   0% /dev

Trying to understand what was using such space, I manually mounted the /dev/mtdblock4 device on a directory and used the "df -s *" on it, but it reported only a couple of kb used:

root@OpenWrt:~# mount -o rw,noatime -t jffs2 /dev/mtdblock4 /mnt/rom
root@OpenWrt:~# cd /mnt/rom
root@OpenWrt:/mnt/rom# du -s *
22      upper
0       work

Can someone help me to understand what is using those 240.0K of space? Unluckly the remaining free 336.0K are not enough to install anything useful, and it is also not enough to install needed packages to enable extroot (I'm short of 20K).

Thanks

There are multiple orthogonal issues at play, filesystem overhead, erase block sizes, compression, a couple of config files being autogenerated during the first boot and overlayfs being at work.

Personally I get nervous below 1 MB free space, not necessarily for now, but with the next upgrade in mind.

Ok, so there is nothing that can be done in order to recover a bunch of KiB to install packages needed for USB extroot in the current rc4 release (I need kmod-usb-storage, block-mount and a FS kernel module, usually kmod-fs-f2fs which is ok for USB devices and also smaller than ext4 one).

Currently I rolled back to the 21.02.3, which has a base image smaller than about 300KiB, so the free overlay space is enough to enable the extroot. Anyway, also the 21.02.3 comes with those 240K of used space after the first boot.. never noticed :stuck_out_tongue: .

I hope that the final 22.03.0 will be a little smaller, at least to leave the space needed for extroot enabling packages.

Thanks :slight_smile:

Hi, I just want to share that I finally manged to enable the extroot even on 22.03 images!

I ended up using the "Customize installed packages" feature of the "Firmware Selector" online tool (https://firmware-selector.openwrt.org/?version=22.03.0-rc5&target=lantiq%2Fxrx200&id=tplink_tdw8970).
Using it I was able to build a firmware image with packages needed to enable extroot on the USB drive, removing ones that can be installed after extroot configuration (eg: luci).

I ran over it almost casually... the feature is quite hidden (or at least not highlighted), but it is very handy for these situations where the base firmware image uses too much disk space preventing the installation of needed additional packages (and also when there is needed to install additional packages in offline mode). I must say that it is extremely simpler than setup a local environment to build custom OpenWRT firmwares.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.