Life time of R pi SD card

I have had my Raspberry Pi running for several months now and all is great.
I keep reading warnings about the SD’s failing after accidental power loss.
How likely is this?
What is the best way to insure against SD failure?
Can I some how duplicate/copy the SD card?

4 Likes

Hi Robert, On the start menu, in accessories, there is SD card Copier. Use another SD card on an external card reader, use similar sized card and make a copy. Make sure the box is checked, I forgot what the option is.

Here is a link

Forgot to add, you can also use an USB drive to do the same. But need to have USB boot on if you need to boot from it.

Regarding the life, depends on the card. Samsung or sandisk are robust. But not immune to power off cycles. I had powered down a couple of times with my Samsung SD card as the system froze. It still works.
Better to be safe than sorry, I have a USB back up of Buster OS and a SD card back up of Bullseye OS.
I run my system from a SSD.

4 Likes

Thanks for such a speedy and useful reply.
As this pi and acting as a app server for our paddock recording software I will organise an SSD drive of course this leads to the next question what is a good brand?
Thanks
Rob

5 Likes

I am using a Samsung Evo 860 250GB in an SSK external enclosure mounted on a USB 3 port to boot.
Have to switch on USB boot:

sudo raspi-config
Advanced Options ( Option 6 )
Boot Order ( Option A6 )
Option SD Card Boot - Boot from SD Card if available, otherwise boot from USB ( Option B1 )

250GB is overkill for Raspberry Pi for my usage. But, if you’re using it as an App server, probably give you enough space eliminating worries.

I also have an external drive (HDD) as non-NAS to back up my files (Documents bookmarks etc.).

Obviously, you must be having some sort of storage for recording and already set up.

The SSK case can be used for 2242, 2260 and 2280 sized SSD. Samsung M.2 B+M key SSD comes only in 80mm, so the two middle tabs inside the case have to be bent down by pressing so the SSD lies flat without any stress. Or else the SSD will not work.

4 Likes

With respect to accidental power loss.
Recently bought a Pi Juice. The supplied battery makes for an excellent UPS system.

It will run a Pi 3B+ with 3.5" LCD for about 2 hours. Longer without LCD.
Safely shuts down the Pi if battery gets too low.
Autostart again when power comes back.
Recharge the battery when power back on. (waits till 7% battery before activating if battery fully discharged)

Highly recommend the Pi Juice for a setup that needs constant power and UPS system.

With respect to SD card corruption.
This will normally, only occur if the card is being written to when the power fails.

With respect to USB Boot.
Have recently setup a Pi 4B with M.2 SSD in an Argon One case.
Easy to setup and get running.
The SSD is 1TB allowing heaps of room to record stuff, intend to use it as a media server.

Cheers
Jim

3 Likes

Hi Robert,

Looks like @G177630 and @James46717 have covered most of your options, just to throw one last thing into the mix that isn’t for everyone, you can run a Pi in read only mode to protect against data corruption. This obviously has limitations, but we have a guide for it here if you’re ever curious.

1 Like

read /write cycles depend all on the quality of the sd-card…killing an up an running device e.g.rpi* if its writing to the card at the time the power goes out/dies/disconnects it will damage the data and or media in general…old well known fact…if you like create a backup copy of your sd-card but to replicate the image onto another card the cards must be a perfect match …make /model/size…you can look up how to use the command D D…often known as disk destroyer…via command line…all versions of linux will use it browse on how to use it …save all the images you like but your media must be an exact match…y cause its size dependant for the most part…sd-cards differ in exact size from brand to brand…

2 Likes

Hi Robert,

Thanks for posting!

With Class 10 cards in particular as James has said it is quite unusual to corrupt the cards memory unless power is cut during a write and the board doesn’t have any protection against this.

uSD and similar flash memory setups have become more and more reliable over time. They do eventually ‘wear-out’ from repeated read-write cycles and fail, but typically this is in the order of 10,000s to 100,000s of cycles depending on the quality of manufacture which would be extremely unusual in most applications with small microprocessors such as a Pi.

That being said, optical or magnetic storage backups will last much much longer offline. As G177630 said, backing up your card/s if there’s any important information or config on it may certainly save you some headaches later on.

P.S. SuperUser’s forum also had a few interesting discussions about this and similar topics which I’d also suggest taking a look at if anyone’s reading up on this :grin:

2 Likes

to dd and save your image to a usb stick for instance
mkdir images from root dir on your usb sick or media for to be stored onto…r…code belowits coded below to save on /images/ and on sdb device…
dd if=/dev/sda bs=4M conv=fsync status=progress of=/dev/sdb/images/bulleseye.img

1 Like

to flash image back to sd card via card reader of choice using usb stick storage and sd card reader with matching sd-card inserted …assuming the usb stick is sdb and the writer is sdc…

if=/dev/sdb/images/bulleseye.img of=/dev/sdc bs=4M conv=fsync status=progress

Hi Brian,

This was what I was going to suggest! Maybe stick it in a cron job at an idle time every week or so you don’t forget.

Compared to Windows, Linux tools are generally smaller and lighter, and can be chained together a lot better (comes from the Unix philosophy) meaning you can often get a one-liner of a few commands that does exactly what you want, with no 3rd-party tools needed.

-James

1 Like

arhh yes Linux is all about the ordering of commands newbies often don’t realize but it`s all about the order of command when it comes to the end of the day…

1 Like