-1

I'm new to using raspberry pis, but I do know that sd cards don't last forever. I am planning to have my pi on 24/7. The problem is, I don't know how long I can expect the sd card to last. I have a pi model b 512mb running raspbian and an 8gb sd card.

How long do sd cards typically last in a pi running 24/7?

Also, I have seen this question. Suppose I follow the things recommended to increase sd card life. In this case, how long will the sd card last?

Finally, I do know that sd cards have internal load-balancing systems. So, suppose I used a 16gb sd card instead of my 8gb one. How long would it last?

EDIT: Also, is there some way to determine when an sd card is at the end of its life?

EDIT 2: The answers and the marked duplicate don't answer my question. I'm not looking for ways to increase sd card life. I already have ways to do that (aka the linked question). What I'm looking for is how long does an 8gb sd card typically last on raspbian if I don't do much of my own IO? Is that really too hard to answer?

DankMemes
  • 123
  • 1
  • 4

3 Answers3

1

I am using a Raspberry Pi at Bloomington's Hackerspace, Bloominglabs to handle our RFID authentication system, monitoring and logging motion around the space, and serving up a web app to handle user management. Not a super-heavy load, but it's been running going on 2 years now w/out trouble.

You can get some numbers on how many reads/writes they can take so largely it depends on the I/O load of whatever you're doing.

sdcharle
  • 56
  • 3
0

There's no good response to that question.

The issue with SD cards is that they are black boxes we know nothing of. Counting only raspbian use, you SD card should last the lifetime of the Pi, even more. But there's always the risk that you either:

  • get a really bad SD card that doesn't do even basic wear leveling
  • get a bad apple, as it seems nodaways that SD cards are tested by the customer

So really, most SDs should outlive their application, but like USB flashdrives, expected usage patterns are so low that sometimes manufacturers takes shortcuts.

I once worked on the R&D for a cable modem, the device ran linux and had shitty flash we knew had not much endurance. It was standard practice then to run with a read-only root file system. There is a pointer here on how to do it.

Basically, every file that changes get symlinked to a tmpfs partition (ie: /etc/resolv.conf-> /var/resolv/resolv.conf, /var being a ramdisk), and you switch back to a RW root only to upgrade. Sometimes, it get tricky and you have to make scripts populating the tmpfs filesystems.

That way, the only writes are when you deploy an upgrade, and the SD should outlive you.

Jean
  • 141
  • 3
0

If a 2Gb card takes 10Tb of writes, then an 8Gb may take 40Tb of writes

Divide 40Tb by your data rate and you get your lifespan

Write 1Mb an hour and you will get 40000000 hours

Bear in mind that you do not have the whole disk to write to. If your drive is half full you will only get 20000000 hours

In reality that number will vary, somewhere between 1 and forever

David Sykes
  • 1,434
  • 3
  • 19
  • 28