• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

dead SD-card every aprox. 6 months

Scheduled Pinned Locked Moved Hardware
19 Posts 10 Posters 7.5k Views 12 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    zdenek
    last edited by Nov 3, 2019, 7:03 AM

    hi all
    what do u do use for store MM? I’ve tried USB and it was slow. I’ve bought about 5 different micro SD cards (Kingston, …) but after 3-8 months, when I did restart, the RPi doesn’t start at all. Some “error” with mounting or something (fatal error…). For me the only solution was reinstall (recovery, reinstall Jessie and reinstall MM). What’s wrong? Too many access to SD card and cause fo that damage?
    Any recommendation?

    thanks
    Zdeněk

    1 Reply Last reply Reply Quote 0
    • B Offline
      buzzkc
      last edited by Nov 3, 2019, 7:15 AM

      Had that happen just last week, did a backup of the card using win32diskimager after it was restored.

      I’m looking at setting up a read-only os to play around with and configure myself… https://medium.com/swlh/make-your-raspberry-pi-file-system-read-only-raspbian-buster-c558694de79

      Darren

      My Build: https://forum.magicmirror.builders/topic/11153/new-non-mirror

      1 Reply Last reply Reply Quote 1
      • S Offline
        sdetweil
        last edited by Nov 3, 2019, 12:19 PM

        I have one system (physical location.) that eats sd cards too Pi or odroid hardware doesn’t matter…
        haven’t figured out the cause yet

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • M Offline
          MadScientist
          last edited by Nov 3, 2019, 2:52 PM

          I use the cheapest SSD I could get for my Pi at that time. It’s running non-stop for 2 years without any issues. You can get 120GB SSD’s for less than 20€. A SATA-USB adapter costs around 2€ from China. Maybe that’s an option for you.
          SD cards are not designed to be permanently written to. They wear out too fast.

          1 Reply Last reply Reply Quote 0
          • Z Offline
            zdenek
            last edited by Nov 4, 2019, 4:31 PM

            @MadScientist thx, sounds great, i’ll try that

            1 Reply Last reply Reply Quote 0
            • M Offline
              marvin424 Project Sponsor
              last edited by Nov 7, 2019, 7:04 AM

              Hi Zdeněk,
              SD cards have limited write cycles so it’s just a question of time when your pi will not start.

              To increase their life, all manufactures have implemented an internal algorithm which uses different physical sectors when writing data to the SD-Card, see wear leveling.

              You can help your hardware if you “oversize” the SD-Card, avoid ram discs and swap partitions.
              I am using a 16GB SD-Card even though just 4GB is used by the system. It’s running now for more than 4 years without any trouble.

              Brgds, Michael…

              Z 1 Reply Last reply Nov 7, 2019, 6:06 PM Reply Quote 0
              • Z Offline
                zdenek @marvin424
                last edited by Nov 7, 2019, 6:06 PM

                @marvin424 that’s really weird. I’m also using 16 cards, in both my mirrors (one is for testing) a in both I’ve had to replace card in about 6 months max. Maybe I’m using to many modules, maybe there is al lot of writes on card… I’ll try SSD

                1 Reply Last reply Reply Quote 0
                • A Offline
                  almliden
                  last edited by Jan 26, 2020, 7:39 PM

                  I know this is an old thread, but hope someone finds this helpful.

                  1. Use a proper power source, one reason for SD-cards to wear out fast is that the RPi doesn’t receive enough power to actually perform the writes and therefore writes bad data which corrupts the card. Depending on which model it is it might need more power. Since I switched to better power supplies I haven’t had a dead SD-card for quite a while, so it seem to have an impact.

                  2. Use RPi-images that writes to /tmpfs, or configure them to write temporary data to RAM to reduce wear on the SD-card.

                  3. Since it hasn’t been mentioned before in this thread, avoid powering off the device by removing power since this could cancel an ongoing write which potentially could corrupt the card. If you need to power it off, do it properly.

                  S 1 Reply Last reply Feb 26, 2020, 11:13 PM Reply Quote 3
                  • S Offline
                    Serge @almliden
                    last edited by Feb 26, 2020, 11:13 PM

                    @almliden said in dead SD-card every aprox. 6 months:

                    Use RPi-images that writes to /tmpfs, or configure them to write temporary data to RAM to reduce wear on the SD-card.

                    How to do that?

                    M 1 Reply Last reply Apr 19, 2020, 12:25 PM Reply Quote 0
                    • M Offline
                      MoreLinux @Serge
                      last edited by MoreLinux Apr 19, 2020, 12:26 PM Apr 19, 2020, 12:25 PM

                      @Serge said in dead SD-card every aprox. 6 months:

                      @almliden said in dead SD-card every aprox. 6 months:

                      Use RPi-images that writes to /tmpfs, or configure them to write temporary data to RAM to reduce wear on the SD-card.

                      How to do that?

                      As root user, edit the file /etc/fstab and add the following lines:

                      tmpfs    /tmp    tmpfs    defaults,noatime,nosuid,size=100m    0 0
                      tmpfs    /var/tmp    tmpfs    defaults,noatime,nosuid,size=30m    0 0
                      tmpfs    /var/log    tmpfs    defaults,noatime,nosuid,mode=0755,size=100m    0 0
                      tmpfs    /var/run    tmpfs    defaults,noatime,nosuid,mode=0755,size=2m    0 0
                      tmpfs    /var/spool/mqueue    tmpfs    defaults,noatime,nosuid,mode=0700,gid=12,size=30m    0 0
                      
                      

                      Now most of the write intensive files write to the Raspberry PI’s ram.

                      Disable the swap file, as it can be write intensive too. First check if you have swap activated with the command:

                      free -h
                      

                      If your total swap is 0B, you are good, if not, execute the following commands:

                      dphys-swapfile swapoff
                      dphys-swapfile uninstall
                      systemctl disable dphys-swapfile
                      

                      Now the command activated with the command:

                      free -h
                      

                      should tell you that you are not using the swap file anymore.

                      P 2 Replies Last reply May 19, 2020, 1:32 AM Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      • First post
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy