Reliable sd card (or alternative) for Pi Zero 2W

Dec 01, 2026 Last reply: 7 minutes ago 16 Replies
Jump to replies (16)

My Pi Zero 2W seems to eat SD cards. Well, maybe a slight exaggeration but two seem to have failed in the last year or so. It's permanently powered up running some very lightweight monitoring via I2C.



It has hardly any customisation, it's bog standard with a couple of python scripts. I'd like to keep it that way as far as possible as it eases maintenance (I have quite a few Pi systems around the place). It writes once an hour to a sqlite3 database.



I have a similar monitoring system running on an old Pi 2B and that has just gone on working with the same SD card for several years. That actually writes to its sqlite3 database once a minute!



So why does my Zero 2W kill SD cards so quickly and how can one improve things? The ways I can think of are:-



  • Get a super reliable SD card - but how to find one of those? * Minimise writing to SD, use RAM disk - lots of customisation * Use a different sort of drive - how easy is this on a Pi Zero? * Anything else?

It hasn't been my experience with the Zero 2W, but you can find more reliable cards on e.g. Amazon with a search string like "long life micro sd cards".

Do look for software which uses RAM as much as possible. Perhaps your software uses so much RAM that it pages all the time on the Zero (0.5 GB RAM) and not on the 2B (1 GB RAM)?

Cheers, David

But do you believe an Amazon ad with "long life micro sd card" in it? They advertise 128Tb memory sticks there too! :-)

That's the trouble, a real SSD on a USB stick would do what I need but how do I actually find an "SSD USB drive" that is **really** an SSD not just a bog-standard flash drive?

I doubt it, my software comprises one python script. Yes, I know Python takes space but not **that** much and since it's just the one script it will just be sitting static in memory (or swap) and not moving about.

Look for 'high endurance' (designed for CCTV cameras which do lots of writes) and even better 'industrial' cards (designed for factories etc) from major brands - Samsung, Sandisk, etc.

Only buy 'Sold and shipped by Amazon' to avoid all the shady 'marketplace' sellers. Or buy from another major retailer that has their own stock.

Sandisk Extreme sticks are a proper SATA SSD behind a SATA-USB converter.

Or just buy a SATA or M.2 SSD and put it into a USB case.

Although the annoyance with the Zero2W is that takes your only USB port.

Theo

One designed for video capture or cameras that is designed to get rewritten a lot.

Not that much actually

My Pi zero has been running 24x7 for a couple of years with no issues, It writes almost nothing to the SD card

Just configurations that I want to survive a reboot. Everything else is either switched off or goes to a ram disk.

You can IIRC mount a USB stick on the thing, but really it's too much faff. Just do not write and pick a reliable SAD card

Thanks for the ideas. If Sandisk Extreme are really SSDs then maybe I'll try one of them.

Trouble is that I have no need at all for 'large', the system would fit on a 4Gb stick (though of course more space does make it more robust) and speed doesn't matter either.

I guess a Sandisk Extreme 128Gb is only £22, though that's still more than the Pi cost! :-)

[snip]

I just looked, top reports:-

MiB Mem : 415.0 total, 96.9 free, 195.7 used, 180.7 buff/cache MiB Swap: 415.0 total, 413.5 free, 1.5 used. 219.3 avail Mem

So I doubt it's banging away at swap.

What kills SD is writing to them especially when nearly full.

Its not your scripts, its things like eystemd and other logs that insist on splatting superfluous data into log files.

  1. If you are swapping, turn off swap. If there isn't enough memory rewrite your code in something efficient like 'C' or buy a bigger Pi
  2. make sure no atimes are added to partitions. mount noatime in /etc/fstab
  3. Stop all logging possible, and what cannot be stopped feed to a ram disk you create. Mine is /var/ramlog. There will be an irreducible residue in /var/log, but that's life

There are utilities that can be installed to monitor and track disk activity.

Your target should be zero writes at all, ever *unless* you want to preserve some moveable data between boots

Hopefully that suppresses uneccesary wear levelling as well.

Treat the SD care as a ROM that can occasionally be tweaked

here is a systemd config edit

## f*ck with shitsemd sed -i "s/#Storage=auto/Storage=volatile/" /etc/systemd/journald.conf sed -i "s/#RuntimeMaxUse=/RuntimeMaxUse=25M/" /etc/systemd/journald.conf sed -i "s/#ForwardToConsole=yes/ForwardToConsole=no/" /etc/systemd/journald.conf sed -i "s/#ForwardToWall=yes/ForwardToWall=no/" //etc/systemd/journald.conf

Remember a Pi Zero is not a full blown linux computer and there is much that can safely be uninstalled or turned off.

Use ps to see what is running and investigate why it is use find to find any files that are being modified Write it all down so you have s script to run for a fresh install

As I said, no need for that

I am running my always up pi-Z on I think a 16GB card which was the smallest I could get

Its hard to find small ones any more and prices are in silly territory.

I cant get a Pi-Z under $20 or thereabouts anywhere

Ah, oh dear. The SD card that is failing now is a Sandisk HIGH Endurance microSD Card, I bought it in August this year to replace the previous SD card that had failed.

So I'm not so sure about Sandisk now.

Any swap is bad news. Turn it off or map it to a ramdisk.

You clearly do not need it

Then that route will not work for you, You have to investigate *why* its failing. Either its just a bad card or you are writing to it all the time

Stop doing that,

I have had a zero2w running for a couple of years data logging every 10 seconds onto a 32Gbyte Samsung high endurance card without any problems. John

If it's the SanDisk ones, yes I would!

Of course, there are some fakes out there!

I don't know what OS you're using, but I'm using a Pi 1 for my heating controller, on RISC OS, and it's been running on the original SD card for some years now.

All logging is done to RAM filing system.

The only writes to the SD card are changes to the configuration of the system; clearly these have to be non-volatile in case of power cuts.

You may be able to use a NAS or an NVME drive for storage and only boot from SD.

David

Far too many. Too easy to repackage rejects

You too :-)

You too :-)

You too :-):-)

The questions is why any writing is necessary at all.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required