sd card discussions

Active today
Viewed 19 times

Recently I’ve had two SD Cards failing on me in a very short period. One of them was acceptable, as it ran 24/7 for almost 4 years, but the other one only worked for one week.

Both failed so bad that no data at all is recoverable.

At this point I’m wondering whether it’s better to just use a USB stick instead. Would that be more reliable?


Sometimes there are power shortages and the Pi looses power. I can’t do anything about it, and a battery backup is not an option in my case.

As a power supply I use a modular PC ATX (Corsair RM750x). The PSU cable that powers the Pi is one with 3 Molex connectors, but i only use one of them with a Molex to Micro-USB adapter and the other ones are left unused (to avoid voltage issues).

 New contributor

2 Answers


I doubt a USB stick would be any more reliable than a SD card because both store the data using flash.

Good article here explaining how to make the SD card last.

  1. Choose a good quality SD card. I prefer SanDisk. Make sure it’s authentic!!
  2. Choose a large SD card. The article says:

    Although it is not included in the SD specification, a good quality SD Card will use wear levelling algorithms. These algorithms will minimize the number of times each block is written, by arranging data so that erasures and re-writes are distributed evenly across the card. By this way, if the SD card is larger than the space needed, the wear can be spread over a much larger area of free space.

  3. Reduce read/write cycles. This can be done by logging to RAM. You can also make the SD card read-only.
  4. Use a more durable storage method Such as a hard drive or solid state drive.

 New contributor
  • Using good quality card doesn’t help much. I had a few PNY cards fail on me. – Chetan Bhargava 4 hours ago
  • All cards will eventually fail, but good cards will last for years (or even decades), instead of weeks like the OP experienced. – Botspot 4 hours ago


Both SD cards and USB stick will fail in long run as they both have the same flash core. Flash cells have certain write endurance and after number of write cycles, the cells begin to fail.

In a Raspberry pi you can reduce the wear by disabling swap. This is how I disable swap on a newly installed Raspbian OS.

sudo dphys-swapfile swapoff
sudo dphys-swapfile uninstall
sudo update-rc.d dphys-swapfile remove
sudo apt purge dphys-swapfile
sudo reboot

Time to time perform a filesystem check (fsck) on your file-system. I do this on Raspbian by:

sudo touch /forcefsck
sudo reboot

As mentioned by Botspot, the article gives a good detail on reducing wear on the SD card or other OS media for Raspberry Pi.

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: