God save the SD-Card


#1

Question: Is there a way to change folders where all data will be written? I dont need log for information e.g. Only fore debugging. Where can i change this? Fadump1090 will be write in run folder massiv. Can i change any where the folder in any settings of fadump1090?

I will save the life of my sd-card. Many write cycles let faster die the sd-card. If i can use a ram disk i can extent the life time of my card.

Thanks for help!


#2

run directory == RAM


#3

When logs saved to microSD card, it dies fast >> Purchase new microSD card = $10

When logs saved to ram, it dies fast >> Purchase new ram = Purchase new Pi = $45.


#4

Thanks for reply. My antention was now to stop logging of piaware. How can i stop logging?


#5

@EDVEaware:

I never turned off logging or diverted logging to ram.

I occasionally delet old logs in folder /var/log by deleting files with extension ending in .1, .2, .3, and .gz .

EDIT:
I also occassionaly delete following logs as well

sudo rm /var/log/piaware.log
sudo rm /var/log/dump1090-mutability.log
sudo rm /run/dump1090-mutability/history*.json
sudo rm /var/log/fr24feed.log
sudo rm /var/log/rbfeeder.log
sudo /var/log/pfclient/pfclient*.log

sudo reboot

I am using 2 Pi since begenning of 2015, almost 3 years now. Using Kingston 8Gb Class10 and Adata 8Gb Class 10 microSD cards. Both cards have given trouble free service during these 3 years, and still going strong.

God has saved my microSD cards up till now :smile:

.
Pi #1: RPi model2

.

Pi#2: Orange Pi


#6

There isn’t an easy way to turn off log files.

I have seen corrupted cells on SD cards and I am not sure if it is from the large number of write cycles OR from power problems (sudden loss of power or slight brownouts). Then again if log files get corrupted then you aren’t losing much.


#7

Each write cycle will make older your SD cards. I found other solutions. One of this are USB Sticks or Harddisk or SSD. run or var run are tmpfs and that is ram. The ram will never die faster as and SD card.

There are some website they will help out to prevent writing log files etc… But normally there are settings for all programs on pi. Most have setups/configs where i can make very small logs e.g. only error, warnings etc…

Thats why i ask if there is a way to setup a config that log will desabled or massiv reduce writing.

Thanks


#8

You are right about the write cycles. Standard SD cards are rated at 10,000 cycles while some SSD that are used as hard drives are rated in the 100,000+ cycles. It is quite hard to reach 10,000 cycles. Even at 3 write cycles per day (24GB on a 8GB SD card) you are looking at just under 10 years. You will probably not reach the write cycle limit with just log files.

PiAware is a debian system and the log configuration are in /etc/rsyslog

Piaware also uses the same built in OS logging system to write to piaware.log. You can find the log location set in /etc/rsyslog.d/piaware.conf

You can redirect these logs to anywhere (external USB drive) or /dev/null if you want.


#9

8GB is a good hint. Bigger SD cards will not be write often on same positions. Thank you very much for your help.


#10

Changing the root filesystem partition from ext4 to f2fs (developed specifically for SD cards to address wear issues) is another alternative (see RaspberryPi, SD cards wear, and f2fs filesytem experience and other places). Not for the faint of heart to change over, though.

Logging to RAM is another option (log2ram keyword search), mentioned by abcd567.

Or just let 'er rip as-is and replace it when it dies (maybe tomorrow, maybe years from now). This is an appliance, in my opinion.

In general, it appears to me like the Pi computers are used in a variety of environments, many harsh, and seem to survive for a long time. It is unreasonable to expect a Raspberry Pi to perform the same as aircraft black box recorders. Each of us has our own risk tolerance levels, and utlimately it is up to us to balance the installation wants of “cheap, reliable, quick” with what we actually deploy, I believe.


#11

UnionFS - http://blog.pi3g.com/2014/04/make-raspbian-system-read-only

In russian language about UnionFS, and microSD hardware and its test&diagnostics:


#12

I noticed there the FlightAware Team has a git repository for running the Pi as a read-only filesystem - check it out at readonly-pi. Like all things *nix, it is one of many ways to get things done…


#13

I’ve converted 3 Raspberry Pi 3’s to USB mSATA SSD’s, although my FlightAware Raspberry Pi 3 is not one of them. The two most recent ones were done with a Sabrent mSATA enclosure (EC-UKMS) and 32 GB Transcend SSD (TS32GMSA370), both ordered from Amazon US. No problems so far but I should note that an older Orico enclosure that I had tried apparently took too long to boot and would not work, even with program_usb_timeout=1 in config.txt. Changing to the Sabrent fixed the problem.

I’m not noticing much difference in performance, but I had a couple of corruptions in SD cards on these Pi’s that I’m using for servers and figured I’d see if the SSD is more reliable.


#14

A few years ago I switched my setup to r/w only to internal RAM.

Here a snapshot of stats from today.

I’ve been using the same SD card for years now.

I remember talking with Oliver about possible making this config an option on a new install but that never went anywhere.

I’d post the instructions but they got wiped out when the old forums were killed.