I have setup a router running OpenWrt 18.06.4 that will mainly act as a VPN server (Strongswan) and I am hoping it will run for a long time without going down.
One of my concerns is that frequent writes to the flash memory could one day render the router unusable.
Now, I don't know much, if anything at all, about how OpenWrt handles flash writes.
But I am wondering if there a way to find out if and how frequently whatever software in OpenWrt is writing data to the flash memory of the router?
openwrt is generally highly optimised to prevent excessive flash writes...
one of the advantages of having a usb extroot with LED on the usb stick is noticing the router writing to the disk... recently came across this and discovered that i'd enabled an openvpn status file.... ( should have pointed it to /tmp aka ramdisk )...
so you should be fine unless your pointing some add-on service log/status to flash ( non-tmp )
if you have space for a package... you could try this to check the system disk access....
opkg update && opkg install inotifywait
inotifywait -e modify -e attrib -e move -e create -e delete -m -r / | grep -v '/dev/pts'
Avoid creating separate logs, especially outside of tmpfs.
Beware that logging on tmpfs in a long-term may result in memory exhaustion.
The best way is to use system log which is rotated automatically.
Thank you both for your help.
inotifywait seems to be what I was looking for.
I didn't have much time the last couple of days, but a short test revealed that the router is mostly quiet while it's just sitting there. Haven't tried how it looks when there is a VPN connection to it, though.
There are some writes to /dev/null and the DDNS process writes some data to /tmp/log/ddns and /tmp/run/ddns every once in a while, but these are all in RAM anyway.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.