• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

SD Card corruption again, again

Scheduled Pinned Locked Moved
General Discussion
10
33
1.3k
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.
  • undefined
    gnydick @Phaedrux
    last edited by 7 Mar 2021, 07:44

    @Phaedrux it's not that much writing, really. the cards have write leveling. considering it's a 32GB card, it will take a VERY long time to wear down the card.

    1 Reply Last reply Reply Quote 0
    • undefined
      gloomyandy
      last edited by gloomyandy 3 Jul 2021, 09:13 7 Mar 2021, 09:12

      How corrupt are the cards? Can they be reformatted and reused or are they unusable once they fail?

      1 Reply Last reply Reply Quote 0
      • undefined
        Dr_Ju_Ju
        last edited by 7 Mar 2021, 10:35

        Silly question, but where are you buying them ?? I've had a couple permanently fail, and even though they were supposedly 'branded' items, I doubt they were as they were a lot cheaper than others.

        Also try connecting them to a PC, whether Windows or Linux, & re-formatting them, I've resurrected a few that way....

        Julian,

        Old goat, learning new things….

        1 Reply Last reply Reply Quote 0
        • undefined
          arhi @Veti
          last edited by 7 Mar 2021, 15:18

          @Veti said in SD Card corruption again, again:

          @arhi

          what does an ups have to do with logging?

          I don't see any other reason to have logging "always-on" except if you want to have data to continue after power loss. This is better solved by UPS. For any other reason, it would make sense to log from time to time to check issues if you have them, but not always.

          32G is a big card, you are probably writing over and over the same place if they are getting worn out quickly (many will lock the card for writing into read-only mode when they encounter write issues and cant remap the blocks any more, many will not fail on writes but silently ignore them). Possible solution would be to either never delete log files and only create new ones or always append to a log file and not truncate it ever. I have no clue how M929 actually work, never had a need for it, I have enough issues with crappy SD cards to force them to take the logging data too... tried many years ago with marling and gave up after few dead cards

          undefined 1 Reply Last reply 7 Mar 2021, 15:57 Reply Quote 0
          • undefined
            Veti @arhi
            last edited by 7 Mar 2021, 15:57

            @arhi

            powerloss recovery is M911 and not debugging.
            those are two different things.

            undefined 1 Reply Last reply 7 Mar 2021, 16:52 Reply Quote 0
            • undefined
              arhi @Veti
              last edited by 7 Mar 2021, 16:52

              @Veti yes, my mistake, you are only logging basic stuff (Start, stop ..) that should not eat up the SD card, not enough "traffic" ..

              1 Reply Last reply Reply Quote 0
              • undefined
                Veti
                last edited by 7 Mar 2021, 17:44

                i think it logs every move. so its a lot

                undefined 1 Reply Last reply 7 Mar 2021, 18:24 Reply Quote 0
                • undefined
                  gnydick @Veti
                  last edited by 7 Mar 2021, 18:24

                  @Veti it does not log every move. that would be silly.

                  1 Reply Last reply Reply Quote 0
                  • undefined
                    Phaedrux Moderator
                    last edited by 7 Mar 2021, 19:39

                    What level of logging are you using? What is the command used?

                    Z-Bot CoreXY Build | Thingiverse Profile

                    undefined 1 Reply Last reply 8 Mar 2021, 04:46 Reply Quote 0
                    • undefined
                      gnydick @Phaedrux
                      last edited by 8 Mar 2021, 04:46

                      @Phaedrux
                      M929 P"eventlog.txt" S1

                      1 Reply Last reply Reply Quote 0
                      • undefined
                        jrockland
                        last edited by 8 Mar 2021, 04:52

                        The problem doesnt come from the boards.
                        I use multiple duet3d boards with all kind of sd cards and never had that issue.
                        You might have fakes from amazon/ebay: They look 100% like the real one but are 8g instead of 32g, and as the board think they are 32g it keep writing and destroy the card.

                        I even once bough a fake from walmart. No joke. It is hard to find good stuff now.

                        undefined 1 Reply Last reply 8 Mar 2021, 04:53 Reply Quote 0
                        • undefined
                          gnydick @jrockland
                          last edited by 8 Mar 2021, 04:53

                          @jrockland i don't think < 1GB would do that.

                          undefined 1 Reply Last reply 8 Mar 2021, 05:10 Reply Quote 0
                          • undefined
                            jrockland @gnydick
                            last edited by 8 Mar 2021, 05:10

                            @gnydick depend how many projects you have on those cards.. my cards usually run around 12+ g when I back them up. But im running a ton of high def projects..

                            undefined undefined 2 Replies Last reply 8 Mar 2021, 05:13 Reply Quote 0
                            • undefined
                              jrockland @jrockland
                              last edited by 8 Mar 2021, 05:13

                              @jrockland **those where from when I was running with attach rasp boards..
                              Probably much smaller now.

                              1 Reply Last reply Reply Quote 0
                              • undefined
                                gnydick @jrockland
                                last edited by 8 Mar 2021, 05:17

                                @jrockland exactly, i had just emptied my card recently.

                                undefined 1 Reply Last reply 8 Mar 2021, 05:20 Reply Quote 0
                                • undefined
                                  jrockland @gnydick
                                  last edited by 8 Mar 2021, 05:20

                                  @gnydick I creat/test/bench printers parts, so when I want them to go trough a 72hrs+ hardcore run you should see the size of the gcode files..... even just a "circle" with 4096 sides is impressive.

                                  undefined 1 Reply Last reply 8 Mar 2021, 07:26 Reply Quote 0
                                  • undefined
                                    gnydick @jrockland
                                    last edited by 8 Mar 2021, 07:26

                                    @jrockland believe me, I understand. I regularly delete my files because it's too much to scroll through on the paneldue.

                                    1 Reply Last reply Reply Quote 0
                                    • undefined
                                      o_lampe
                                      last edited by o_lampe 3 Aug 2021, 09:48 8 Mar 2021, 09:33

                                      I can add my findings about counterfeit SanDisk SD-cards. Not related to size (8GB vs. 32GB) but related to write speed. Some of the cheaper cards I wrote (Linux) images to with Balena Etcher showed a much slower write speed.

                                      There is another thing, I saw in Linux world, which might come handy for Duet3D too:
                                      Most SSD-drives have a write-wear protection that randomly uses different areas in the memory-address room. Someone in the RasPi-world has implemented that feature for SD-Cards, too.
                                      @chrishamm (hint, hint) sorry to bother you again 🙂

                                      Especially when you regularly delete files, that would be helpful, since otherwise, the logging would take place at the same memory-addresses over and over again.

                                      undefined 1 Reply Last reply 8 Mar 2021, 09:45 Reply Quote 1
                                      • undefined
                                        chrishamm administrators @o_lampe
                                        last edited by 8 Mar 2021, 09:45

                                        @o_lampe Newer SD cards have an embedded controller that ensures data isn't always written to the same physical location (like modern SSDs). For IO-intense purposes it's probably a good idea to replace the standard SD cards with A1/A2-certified cards. I generally use a SanDisk A2 card for DuetPi tests, especially because of the speed advantage compared to other cards.

                                        For quite some time ext4 (the FS used by Raspberry Pi OS and DuetPi) has enabled trim support automatically on supported platforms but I must admit I am not 100% sure if that particular feature is available with SD cards.

                                        Duet software engineer

                                        undefined undefined 2 Replies Last reply 8 Mar 2021, 09:50 Reply Quote 0
                                        • undefined
                                          o_lampe @chrishamm
                                          last edited by 8 Mar 2021, 09:50

                                          @chrishamm said in SD Card corruption again, again:

                                          trim support

                                          That was the term, I was looking for. IIRC someone implemented it for SD-cards, too. Now with the right term to look for, I'll find it back. Although it might not be needed for newer cards.

                                          Thanks again Chris

                                          1 Reply Last reply Reply Quote 0
                                          18 out of 33
                                          • First post
                                            18/33
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA