I am currently running OpenWrt 21.02.1 on a TP-Link Archer C7 v5. I recently noticed that any changes I made to my router weren't persisting. Today I sat down to figure out what was going on and discovered that any changes to the system I make are lost following reboot. This includes deleting old scripts, removing software packages, etc. Once the router reboots they're all back it's like the router is consistently restoring back to around a month ago.
My research indicates that this is often the result of no space but that doesn't seem to be the case here. The output of mount; df -h is:
> mount; df -h
> /dev/root on /rom type squashfs (ro,relatime)
> proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
> sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
> cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
> tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
> /dev/mtdblock9 on /overlay type jffs2 (rw,noatime)
> overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
> tmpfs on /dev type tmpfs (rw,nosuid,relatime,size=512k,mode=755)
> devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600,ptmxmode=000)
> debugfs on /sys/kernel/debug type debugfs (rw,noatime)
> none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,noatime,mode=700)
> Filesystem Size Used Available Use% Mounted on
> /dev/root 3.5M 3.5M 0 100% /rom
> tmpfs 60.3M 364.0K 59.9M 1% /tmp
> /dev/mtdblock9 9.6M 3.5M 6.0M 37% /overlay
> overlayfs:/overlay 9.6M 3.5M 6.0M 37% /
> tmpfs 512.0K 0 512.0K 0% /dev
I've tried performing a reset in LuCi, and then performing a hard factory reset in the command-line using umount /overlay && jffs2reset && reboot now. The router resets and then pops right back up with everything still intact. Interestingly the command dd if=/dev/zero of=/dev/loop0 bs=1M; reboot returned this output:
> dd if=/dev/zero of=/dev/loop0 bs=1M; reboot
> dd: error writing '/dev/loop0': No space left on device
> 1+0 records in
> 0+0 records out
So perhaps I am out of space after all? I've also tried performing a manual factory reset using the physical button but the same thing happens. I am at a loss for what caused this to happen in the first place and what I can do to fix it. Any help would be much appreciated - thanks!