Agree.   I have a couple pi that I run most things in ramdisk on but I 
don't care about logs on those pi.

Here's a snippet from /etc/fstab for the box I use to shoot weathercam 
snaps and timelapse into /mnt/ramdisk, with cron jobs on other systems to 
pull the results back onto something the weewx system that runs off 
spinning disk.

#---- run motion in ramdisk ---
# obviously do 'mkdir -p /mnt/ramdisk' before this can work
#
tmpfs /mnt/ramdisk tmpfs size=260M 0 0
#
#---- put logs and tmp in ramdisk ---
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

Here's a similar one for a pi that used to run just nginx to serve up a 
webpage for my weewx system to grab via a custom extension.  I later 
switched to just publishing to MQTT but left the pi fstab alone since it 
was great for uptime.

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/log/nginx  tmpfs   
defaults,nosuid,mode=0755,nodev,noatime   0       0
tmpfs           /var/tmp        tmpfs   
defaults,nosuid,mode=0755,nodev,noatime   0       0
tmpfs           /var/www/html   tmpfs   
defaults,nosuid,mode=0755,nodev,noatime   0       0

Note - these are model-B that are particularly sensitive to power issues. 
 I've never had to do this on any pi that uses the micro SD card from the 
original zero all the way up to a current pi4.

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" 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-user/668ff2a9-71f6-4c31-96af-4ab2d9b8ca56n%40googlegroups.com.

Reply via email to