Rpi4 microsd worries

Playing with AR750 and Rpi4 computer with a dual Ethernet shield. AR750 works perfectly.

About to start with Rpi4 but concerned with the booting and use of Sdcard as I've had a few RPi where the SD goes off after a time and becomes unusable.

Apart from an SSD, what are the alternatives to having a simple router (no WiFi required) with iptables?

Concern is I don't want to deploy a load, only for them to only last a year before a rebuild or new SD. It's not the cost, it's the downtime and logistics.

Thanks all.

i'm guessing the pi foundation has 100+ threads about sdcard failure...

touching wood... i'm not sure I remember a single one when it comes to OpenWrt and we are looking at 1-1.5years across 50+users

mine has been flashed 500+ times over 1.5years...

get a good card... clone it as a failsafe once setup... and sleep easy...

No suggestions to replace the SD card entirely but will share my perspective:

  1. Backup your SD card once you get it setup to your liking
  2. SD cards last a long LONG time

AHH thanks! Was hoping the failures were due to being overworked due to being used as a desktop computer.

My rpi4 will be the most simplest router with nat, wireguard and iptables. Cannot imagine much will read/write from the card apart from bootup.

I'll spend that extra £3 on a better quality card!

Also make sure you have excellent power supply conditions, i.e.

  • PSU with sufficient amps and with fixed cable (not USB A connector like on USB power supplies).
  • UPS if you want to be on the safe side.

My SD card crashes on raspi were always due to power issues, either due to connector issues, low quality / high resistance cables, or power outages.
Only recently, 2 days after a short power outage, the SD in my raspi died.
The UPS I had for these cases died 2 weeks before, of course... :frowning:

1 Like

If you use the squashfs-combined version, OpenWRT will run as it does on embedded devices, entirely in memory, only writing when you save configuration changes.

But even with the ext4 version, OpenWRT puts VERY little wear on the card. Logging, for example is still done to memory. You really don't have anything to worry about.

I used a Pi with OpenWRT as my router for about 6 months, and because its storage size and performance demands are so slight I felt comfortable using an ancient 1GB card from the mid-2000s that I'd originally bought for an old flip phone; so old they were still calling it "transflash" instead of microSD. No problems whatsoever, no noticeable effect on boot time and since writes are tiny and rare, no affect on performance.

Another option with the PI4 is to netboot -- I.E. run with no card at all, if you have a fileserver that can do tftp and nfs. I do this with several Pis but not with the router, because a router should have as few dependencies on other systems as possible; if only to avoid circular dependencies. (I did however power it with a PoE hat, which is a very stable and reliable power source if you already have a PoE switch.)

Eh it's going to be fine, OpenWrt runs from RAM so it's best case for SD card. Most of the issues are with desktop-like OSes that write stuff constantly.

I second tmomas advice about getting a good quality PSU because you will be looking at 24/7 usage, which will wear out cheap PSUs, a failing PSU can and will damage your devices, or cause instability.

I usually go for the ones that are rated for fast charging (and from brands I kind of know at least a little from other products like Anker or Ugreen, if you can't find better).

Yes the raspberry isn't going to use any of the fast charging capabilities, but fast charging ability is a way to filter out a lot of the garbage PSUs.

USB A connector is fine imho as long as you get also a decent USB cable, that is at least rated for high current charging, and does not feel flimsy

SD cards can be READ from almost unlimited amount of times, it's the WRITES that wear them out. I have a RPI4B too and looked into this. As someone else up there said the default config is a file system which is read only, and with the exception of saving changes, nearly all the logs and temp files are written to a type of ram drive, not the SD card. So it gets very little writes to it and pretty much any old cheap card will work and work fine. I don't think the RPI4B can read or write to a SD card faster then 50MBps so You don't need one of those high buck top cards unless you want it. Here is some more reading, but note that a lot of pi benchmark sites are basing their tests off the raspbian os (custom debian blend tailored to the pi) and are very concerned with write speed and esp random small file writes, for us this is not important. None the less benchmarking numbers are probably similar for us.