A filter update can fill temporary storage while a database grows on disk for months. Locate the failing directory before sizing a new image.
Find the full filesystem over SSH
grep DISTRIB_DESCRIPTION /etc/openwrt_release
cat /proc/partitions
awk '$2=="/" || $2=="/overlay" || $2=="/tmp"' /proc/mounts
df -k / /tmp
grep -E "MemAvailable|SwapFree" /proc/meminfo

Run these commands on the router. Also run df -k on the failing directory or its nearest existing parent. Check Mounted on and Available. Here /tmp uses tmpfs. If it fills, check temporary files and MemAvailable. A larger root partition will not raise that limit. Pause writes if a data disk is missing. For SquashFS check the writable layer with df -k /overlay.
Measure a normal update
while :; do date; df -k / /tmp; sleep 2; done
Start this loop in a second SSH window. Add the data directory to df. Run a normal update in the first window, including any usual overlap. Stop sampling with Ctrl+C. Count each filesystem once and divide its highest Used reading by 1024 for MiB.
Suppose usage rises from 280 to 460 MiB and you expect another 200 MiB of retained data. Start at 460 + 200 = 660 MiB. The peak already includes the original 280. Allow extra room for filesystem overhead, maintenance and spikes missed between samples. These figures are illustrative.
Test the estimate on a spare disk
OpenWrt 25.12 · make menuconfig → Target Images → Root filesystem partition size (in MiB) · CONFIG_TARGET_ROOTFS_PARTSIZE
The full source build offers this setting for applicable image layouts. Change it only if root is short of space. Keep the original disk and a configuration backup. Boot the new image on a spare disk, check df, repeat the update and reboot. Verify service and free space. If space still runs out, return to the original disk and plan a separate volume for growing data.
Use OpenWrt ImageBuilder to preinstall packages on a stock image
Comments