Logs written during a disk outage can disappear when the disk returns. Keep the files intact. The logger may have written to the underlying directory. Mounting another filesystem hides those files, and an open descriptor can still receive writes there.
Find the filesystem behind the path
For OpenWrt file logging, run these checks over SSH. Replace /data with your mount point. If the first command prints nothing, check the file output setting under System in LuCI.
uci -q get 'system.@system[0].log_file'
awk '$2=="/data" {print $1,$2,$3,$4}' /proc/mounts
df -h /data
command -v block >/dev/null && block info
Read the result
Without a matching mount entry, the directory alone proves nothing about the disk. Compare the device shown by df. If mounted, check its identity and the rw or ro flag. The OpenWrt 25.12.6 startup script can defer file logging during boot, yet a manual service restart may still create the directory.

SSH on an isolated OpenWrt 25.12.6 VM using tmpfs as the second filesystem. We wrote before, mounted it, restarted logging and wrote after. Stopping writes and unmounting revealed before again. No physical disk was tested. Never unmount a busy disk to repeat this.
Restore logging and verify a fresh entry
Save logread output on your computer. If the disk is absent or read-only, note and temporarily clear the file path, apply and verify memory logging. To recover hidden files, schedule downtime, stop all users of the disk and unmount normally. Never force it. Restore the disk, verify its UUID, mount point and write access, then restore the log path. Restarting below may clear memory logs. Adapt the filename and marker. Expect the new entry in both places. If only memory has it, disable file output again and check space and permissions.
/etc/init.d/log restart
logger -t gmcheck mounted-test-42
logread -e gmcheck
tail /data/logs/system.log
How to identify SquashFS, the writable layer and /rom on OpenWrt
Comments