Burning out SD cards

The stats page shows you have 5 sites. Do you have them all running at one time? Can your script do multiple feeds from 1 RPi?

I’m planning on redoing both of my Pi’s and your script is a lifesaver for a noob.

I have 2 regular sites and 1 intermittent for testing/experimenting i.e. total 3.

The 4th & 5th sites were created recently when I ran the script for “One Pi two Receivers” and to test it, I went to claims page and claimed two new sites. Good that you reminded me. I will now delete these surplus sites generated during testing.

When you do it, please post success/failure/issues.
Feedback helps in improving/debugging.

NOTE:
Are you going to do it on Pi4?
If yes then expect trouble due to dongle malfunction.

I’ve fired up a zero with an sd card in a USB reader and am running this now. It seems as though it’s as simple as running rpi-clone sda, hitting enter at the two prompts and letting it go. I have no idea how long it’ll take but I suppose if I automate this via cron in the early hours of the morning, it doesn’t really matter.

Oh wow. It took less than five minutes. Now the test, to shut it down, swap the cards and reboot.

/edit - Bingo! It worked perfectly :smiley: Thank you. Now just to work out the command format for this to work without any need for user input and then cron it. It will take longer if there’s more on the card but it’s unimportant. Perhaps a trick is to do a full one manually to start and then use the -s option to only copy modified files.

Yeah. Do the first one manually, just to be sure, and then sudo rpi-clone sda -U, for no prompts.
A bonus point, is that the two cards don’t have to be the same size. As long as the image fits in the clone…

1 Like

I can confirm it works on Buster as well, btw. Excellent stuff, this is more useful than you’d think. None of my Pis are backed up and that’s always made me a little nervous.

I plan move the print server functions to a Pi 4 then install Buster on my 3B and 3B+. Feeder software will include 1090-fa plus whatever feeds I can get going - currently fr24 and pi aware. I’d like to add more feeds. Both Pi’s are setup to handle 3 dongles if necessary. Otherwise, one Pi is a single and the other is a double. I use the multiples to experiment with homemade antennas. I currently have 2 ground planes - an 8 and a 4 - along with a whip.

Pi 4 is not currently available on Amazon USA.

A couple of lines you might find useful. This one adds an additional range circle, taking it up to 250.

sudo sed -i.original 's/SiteCirclesDistances = new Array(100,150,200);/SiteCirclesDistances = new Array(100,150,200,250);/g' /usr/share/dump1090-fa/html/config.js

This one changes the terrain limit ring to blue, increases the thickness and makes it dashed rather than solid:

sudo perl -0777 -i.original -pe "s/var\s*ringStyle{1}\s*=\s*new\s*ol\.style\.Style{1}\(\{\n\s*fill:\s*null,\n\s*stroke:\s*new\s*ol\.style\.Stroke{1}\(\{\n\s*color{1}:\s*'#000000',\n\s*width{1}:\s*1\n\s*\}\)\n\s*\}\);{1}/var ringStyle = new ol.style.Style\(\{\nfill: null,\nstroke: new ol.style.Stroke\(\{\n color: '#0000DD',\n lineDash:[4,4],\nwidth: 2\n\}\)\n\}\);\n/igs" /usr/share/dump1090-fa/html/script.js
2 Likes

Thank you for the useful additions.

I used to copy the adapted files into the boot directory after burning an image and had a script copy them in the corresponding folders, but inserting the changes via sed is so much easier and more flexible!

True, sed is a very powerful and useful tool.
I have used sed for modifying the install script from FR24 (to block un-needede, rather nuisance AUTO_SIGNUP).

In my script, I originally used following bash script recommended by FR24, which started signup at the end:

sudo bash -c "$(wget -O - http://repo.feed.flightradar24.com/install_fr24_rpi.sh)"

.

Recently I replaced above bash script by following code. Now no un-necessary signup is started.

## Installation of FR24 feeder
wget -O /home/pi/install_fr24_rpi.sh "https://repo-feed.flightradar24.com/install_fr24_rpi.sh"
sudo sed -i 's/AUTO_SIGNUP=1/AUTO_SIGNUP=0/'  /home/pi/install_fr24_rpi.sh
sudo sed -i 's/fr24feed --signup/#fr24feed --signup/'  /home/pi/install_fr24_rpi.sh
cd /home/pi/
sudo chmod +x  install_fr24_rpi.sh
sudo ./install_fr24_rpi.sh
sudo systemctl restart fr24feed

.
Similarly, in “two-receivers on one-pi” script, for changing device-index in config file of dump1090-fa (package install) from default 0 to 00000101:

indexnow=`sed -n 's/.*--device-index \([^ ]*\).*/\1/p' /etc/default/dump1090-fa` 
echo $indexnow 
0
sudo sed -i 's/--device-index '$indexnow'/--device-index 00000101/' /etc/default/dump1090-fa  

1 Like

I’m not really sure what’s happened but my eBay inbox exploded this morning. Looks like I’ve bought a total of 25 small USB micro SD card readers from four different suppliers. I guess gin was involved with my choice of purchases :smiley:

/edit - And Amazon have just delivered me ten SD cards sigh

5 Likes

This is a great thread! I have a number of nodes, the majority are running 32GB cards with MicroCenter branding (dont know who the OEM is, my guess is sandisk). I’ve had a few nodes up for ~2 years w/o any issue at all, and many many writes - and others fail multiple times, I cant put my finger on it yet despite collecting lots of overall performance data. (i/o, power, temp)

I always expand the filesystem and do a fair amount of read/write locally in the form of logs & metrics. I believe wiedehopf posted in his graphs thread a way to manage writes to the card to reduce wear, which I have not tried yet. Since the majority of the data is ephemeral I don’t really care if I lose a card - but I do care of I lose a card on a node half way around the world. With rpi3 nodes it would be easy to add a reader to a USB slot and constantly re-image to a backup card - but with the pi zero it’s a bit more of a challenge with both USB ports occupied.

When I have to reboot or shutdown a node I run sync a few times like the crusty unix guy I am and cross my fingers :smiley:

GitHub - wiedehopf/graphs1090: Graphs for readsb / dump1090-fa / dump1090 (based on dump1090-tools by mutability)

The above method makes running sync much more satisfying as it actually has to do a bit of work to get the backlog to the disk!

Edit: I’m 100% sure 99% of sd-card failures are NOT due to excessive amounts of data written.
Just wanted to link what @modea was talking about.

1 Like

I can’t recall ever burning out a microsd card, but I’m sure it will happen soon due to age. I recently purchased 10 SanDisk High Endurance 32GB cards on sale for $5.99 each from my local Best Buy store.

2 Likes

I am using 2 Pis for last 4 years, and only one microSD card has failed about two years ago. I then purchased 4 pieces of 8 Gb Class 10 Adata microSD cards in sale from a local store for can$6 each.

  • One I used to replace failed card.
  • As no other card has failed yet, balance 3 cards I use for experimenting with different installs. Lot of image writing and software install/uninstall/reinstall.

In addition I have purchased one 16 Gb class 10 for can$8 and one 32 Gb class 10 for can$10 both Adata, from local store…

  • On 32 Gb one I have installed Debian x64, inserted it in mini usb card reader ($0.99) and boot laptop/desktop from usb flash
  • On 16 Gb one I have installed Raspbian x86 for PC and Mac, inserted it in mini usb card reader ($0.99) and boot laptop/desktop from usb flash.

abcd567,

Thanks for the great script!
I have spent some time enhansing it and have posted the code here: Files · master · Alexander Deryugin / ADS-B receiver and feeder install script · GitLab

1 Like

You might consider in a later release to add adsbexchange and remove opensky

The project seem to be not actively maintained any longer. I gave up feeding them after several issues where nobody replied
Also the # of monitored aircraft is constantly downtrending. Seem to be that more and more feeder are leaving

1 Like