I agree with Tom and Vince . . . I have never had a micro SD card fail in 
10-12 years.  And I have beat them hard with Pi's, dashcams, etc.  I also 
want to thank Vince for the idea of putting the logs into RAM.  The logs 
are not important enough to save from boot to boot in most cases.  So while 
the micro SD cards are rugged, it's an extra load removed by not writing 
the logs to them.

- Paul VE1DX

On Saturday, November 19, 2022 at 3:47:47 PM UTC-4 [email protected] wrote:

> 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/63f041f5-888c-42d0-89c7-7164fd0da81cn%40googlegroups.com.

Reply via email to