No Read-Only File-System in WPSD
Most users are accustomed to the “other sftware” having a forced Read-Only file system by default. While this can be useful, it’s unnecessary in WPSD and in fact, is a pain in the ass sometimes.
WPSD’s filesystem is not read-only…
Rationale for enabling a persistent Read-Write file-system
The dashboard and underlying software only writes significant data to log files,
which are used/parsed by the dashboard software to display meaningful data.
However, these log files aren’t even written to/read from disk; they are
actually stored to memory using
tempfs
.
Other than that, there is very little else for write activity, and most of it is also written to memory, vs. disk (see ASCII figure below).
And when a user needs to make configuration changes, setups, etc., the file system in Read-Only mode often creates issues where settings may not be saved properly. A huge pain in the ass!
Frankly, I feel a Read-Only file system in WPSD is a false sense of security, does not do much in prolonging SD card life1 since most data is in memory, and it honestly introduces needless complexity.
ASCII table of most tempfs-enabled (memory) mountpoints in WPSD
tmpfs /run
tmpfs /run/lock
tmpfs /sys/fs/cgroup
tmpfs /tmp
tmpfs /var/log
tmpfs /var/lib/sudo
tmpfs /var/lib/dhcpcd
tmpfs /var/lib/logrotate
tmpfs /var/lib/nginx/body
tmpfs /var/lib/php/sessions
tmpfs /var/lib/samba/private
tmpfs /var/lib/vnstat
-
Here’s an example of SD card longevity provided by my colleague, Tom. He’s been running read/write-heavy software on this instance for over 8 years without issue. Get a decent SD card and you’ll be just fine: http://www.threefools.org/weewx/status/index.html . I also run the same software as Tom, and my instance has been running non-stop on the same good-quality SD card since 2015. ⤴