Hi all, been a while since I have posted here but still running a receiver, it just keeps running EXCEPT…
It seems every 6 months or so I have a power event and the PiAware reboots and fails, further investigation reveals it the SD card giving up (it did fail outright once as well).
Each time a new SD card with a clean image sorts the issue out.
I wasn’t aware there was enough write activity to wear a card out, however that seems to be the case.
So my question is, is there a way of making the SD cards more reliable? I don’t expand the file system after firing it up as 2GB seems to be plenty of space. Would having more accessible capacity reduce the wear?
With the RaspberryPi 4 around the corner I was considering moving to a USB SSD, however I am not convinced the Pi 4’s extra resources will be of much benefit.
I have 2 Pis and I always expand file system . Both microSD cards are running 24/7, one for 4 yers now, other for over 3 years now, without fail. Both are 8 Gb, class 10. Both have undergone re-imaging several times.
What cards are you using? It’s possible some are more susceptible than others to power blips.
Regarding expanding the file system, if you build from scratch then Raspbian does it automatically anyway but I don’t think the Piaware image does (at least, it didn’t on earlier versions). When I was using the Piaware image, I always expanded it because there’s no reason to leave that space there unavailable.
If the sd-card has wear leveling it will use the non-expanded part of the sd-card as well.
Don’t think expanding the file system helps in any scenario.
As written above multiple options:
sd-card killing power supply
sd-card killing RPi
low quality sd-cards
strange power spikes
For the power spikes you could get a surge protector and hope it helps.
A good quality power supply should already protect from that but most USB power supplies aren’t that good quality.
That’s really good to know, thanks. Are they a more fuller version of the OS now because from what I remember, the last one I used seemed very cut down, for example it didn’t even have the ifconfig command.
Sometimes after installing dump1090 (fa or mutab), piaware, planefinder, fr24, I make a backup copy of image. To keep the backup image small, I do not expand file system unless I have created the backup.
Is there a way to prevent Raspbian from automatically expanding file system at first boot?
My experience with white / private label SD cards is worse than with genuine / branded SD cards, both in Raspberry Pi’s as in camera’s. I personally prefer SanDisk, which has a good value for money IMHO. Currently in the Pi is the 16 GB SanDisk Ultra C10 (98MB/s) microSD.
On the Pi I use for ADS-B flight tracking, I try to write as little as possible, so I won’t install something like MySQL. I also disabled extensive logging to disk.
With those bigger, faster sd-cards which are meant for digital video cameras as well, writing some log files or even database data will usually be nowhere near enough to cause problems due to excessive amount of writes.
It seems they improved the reliability massively.
With action cameras writing ever increasing amounts of data they probably had to improve the reliability for extended use at hot temperatures and lots of writes.
Samsung now also has an “Endurance” micro sd-card in its offers.
Might just be marketing though
I exclusively use Sandisk and haven’t had a failure. Of course, now I’ve said that, you can guarantee that one will break in the next few days. Unless I make a backup of them all, that will guarantee they’ll work for years!
As mentioned above you can tweak the init= arg before first boot.
It may be simpler to just deal with it after the fact though: take the image file, use kpartx to create partition loop devices pointing at the image, run zerofree on the root filesystem, and then compress the resulting image - the extra space on the expanded filesystem will be almost entirely zeros and will compress excellently. This is essentially the same process run as part of building the original image.
Might be simpler for most people to just reduce the partition size with gparted on the sd-card, do a backup and then re-expand it as needed.
Also avoids first writing a 32 GB image file to disk.