I have never had a 'micro' SD card fail on any model pi that uses the 
'micro' SD card size.

I had 'many' failures on various old model-B pi purchased in 2012 that took 
the big SD cards.  Those were pretty good at trashing SD cards if you had 
even slightly shaky power or power supplies.  Purchasing a very high 
quality SD card helped somewhat but after a few years they'd eventually 
fail too.  Fortunately I automated my pi builds with ansible so it was a 
10-minute annoyance if it happened :-)

But to answer - public_html is not a concern....

/var/log is where your os is doing the most writing, especially if you run 
a high debug level in weewx.

Simplest hardening change is to add three lines to fstab to mount  /tmp, 
/var/log, and /var/tmp as tmpfs mounts (essentially into ramdisk) by adding 
the following to /etc/fstab.   This gets you close enough to read-only 
without working too hard.  I have not had a failure on any pi of any model 
in many years since making the following change:

tmpfs           /tmp            tmpfs   
defaults,nosuid,mode=0755,nodev,noatime   0       0
tmpfs           /var/log        tmpfs   
defaults,nosuid,mode=0755,nodev,noatime   0       0
tmpfs           /var/tmp        tmpfs   
defaults,nosuid,mode=0755,nodev,noatime   0       0

Currently running one model-B, one pi3, and one pi4 here, all with the 
fstab modifications above.  No UPS. Works great.

Note that if you do that, weewx's logs will go poof when you reboot the 
box.  This typically is not a problem since it is almost never necessary to 
save the logs and old logs rotate out anyway.

(that said - I *would* worry about the microSD if I was running something 
like Home Assistant that writes a 'lot' to disk, but moving things 
carefully to tmpfs would also work for that setup if you worked at it a 
little)

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-development/9be2a534-08c0-4682-a60f-bf31e4ae8fedn%40googlegroups.com.

Reply via email to