My Raspberry Pi, on which I host a Minecraft server, suddenly froze. I cannot not SSH in, nor can I join the Minecraft server. I ran the Minecraft server in Docker, via itzg/docker-minecraft-server. I turned off the Raspberry Pi, took out its microsd and plugged it into my PC, to at least attempt to run the Minecraft server from my PC to see if I still have the data. I tried to copy it with cp, but I got an input-output error. Could this be the filesystem’s fault? And how can I fix this? If you need any additional info about this crash, please do not hesitate to ask.

  • Possibly linux@lemmy.zip
    link
    fedilink
    English
    arrow-up
    7
    ·
    5 days ago

    “He’s dead Jim”

    MicroSD cards aren’t designed for a lot of writes. Your card it probably dead. If you must use a RPI with a SD card you should get an enterprise grade MicroSD

    • rotopenguin@infosec.pub
      link
      fedilink
      English
      arrow-up
      1
      ·
      4 days ago

      I think “endurance” cards are where you get something reasonably non-self-destructive, for a modest premium.

        • GregorOPA
          link
          fedilink
          English
          arrow-up
          1
          ·
          5 days ago

          SSDs are crazy cheap, what are you talking about? I think the added reliability and speed is absolutely worth it

            • GregorOPA
              link
              fedilink
              arrow-up
              1
              ·
              edit-2
              5 days ago

              100€ for such a performant device (for the price) seems like a good deal to me

              • Possibly linux@lemmy.zip
                link
                fedilink
                English
                arrow-up
                3
                ·
                edit-2
                5 days ago

                You can get more from a old PC for around the same cost. If it works for you that’s good. I want to point out there are other options

    • schizo@forum.uncomfortable.business
      link
      fedilink
      English
      arrow-up
      11
      ·
      6 days ago

      I’ll second that: every single issue I’ve had with any of the Pis that are around here have all been bad sd cards.

      They’re useful if you’re using an OS that doesn’t ever write to them, but as soon as you’re using a full Linux distro or running software that is writing logs or data, they’re going to fail and probably sooner than later and, of course, at the most annoying time possible because it’s a computer and that’s their thing.

  • the_crotch@sh.itjust.works
    link
    fedilink
    arrow-up
    7
    arrow-down
    1
    ·
    6 days ago

    If you think it’s the filesystem try running fsck. It sounds like a failing storage device to me but there’s not nearly enough information to say for sure

    • GregorOPA
      link
      fedilink
      arrow-up
      4
      ·
      6 days ago

      Could this possibly result in the loss of data? If so, what’s a simple way to do a backup of an entire disk?

      • explore_broaden@midwest.social
        link
        fedilink
        arrow-up
        7
        ·
        6 days ago

        fsck almost certainly isn’t going to cause loss of data, but it will likely inform you about a loss that already occurred if that is the issue you are having.

      • mvirts@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        edit-2
        6 days ago

        ddrescue is probably your best bet

        dd is the simplest: dd if=/path/to/disk/device of=/path/to/backup/file but it may fail with a broken device. ddrescue is similar but handles io errors appropriately and can retry bad reads.

      • the_crotch@sh.itjust.works
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        6 days ago

        If the disk is failing anything you do that reads or writes it could cause data loss. Even having it plugged in and powered potentially could. It depends on what component of it is failing.

        That being said, fsck is pretty safe. It’s the equivalent of chkdsk in windows, it looks specifically at the filesystem for things that may have gotten screwy.

        ddrescue/gddrescue is your best bet for recovery. It can detect bad blocks and skip them, and it has some p robust resuming capabilities if your disk locks up while.its running. I usually use it to clone entire physical disks to another disk or an image file that can be mounted. I don’t know if it can be used to grab specific files, I’ve never tried.

        If it was me, I’d take the disk out and let it cool to room temperature. Then I’d ddrescue the whole thing, with resume turned on, to an image file. Then I’d run fsck. If fsck finds and recovers filesystem issues, I’d put it back in the pi, continue using it, and start doing regular backups of important files via a cron task.

        • GregorOPA
          link
          fedilink
          arrow-up
          4
          ·
          5 days ago

          I managed to get it working. fscked the microsd and copied the files over to my pc. I’m going to be running MC on my pc until I get the Raspberry Pi M.2 HAT and an SSD

    • GregorOPA
      link
      fedilink
      English
      arrow-up
      4
      ·
      6 days ago

      I am aware of that, going to order one soon

  • BigDotNet@lemmy.ml
    link
    fedilink
    Español
    arrow-up
    3
    arrow-down
    1
    ·
    6 days ago

    I believe your SD it’s fried, you should try using a variant of SBC with eMMC support. Like for example a Banana Pi M4 Berry or a Orange Pi 3B with eMMC module.