7

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?

Context:

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).

2 Answers 2

5

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.

0
3

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.
4
  • 2
    Using good quality card doesn't help much. I had a few PNY cards fail on me. Commented Sep 4, 2019 at 20:54
  • All cards will eventually fail, but good cards will last for years (or even decades), instead of weeks like the OP experienced.
    – Botspot
    Commented Sep 4, 2019 at 21:11
  • 2
    I must have been just unlucky then. The cards in the Pi were Adata. The old was 16g, the newer one was 32g with most still free. I'm hopping this one (I had a 16g Kingston lying around for a while) will last longer. What scared me was that both experienced hard failures, and were completely unusable afterwards. In any case, I will likely store the important bits on an HDD from now on. Commented Sep 5, 2019 at 5:48
  • Yes, a hard drive backup would be a good idea. Probably overkill, but I use rclone to sync my entire SD card to Google Drive every 4 hours! So if my card ever broke, I would lose absolutely no data.
    – Botspot
    Commented Sep 5, 2019 at 12:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.