this post was submitted on 11 Sep 2024
24 points (100.0% liked)

Linux

48061 readers
707 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

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.

you are viewing a single comment's thread
view the rest of the comments
[–] the_crotch@sh.itjust.works 2 points 1 month ago* (last edited 1 month ago) (1 children)

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.

[–] gregor@gregtech.eu 4 points 1 month ago (1 children)

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

[–] the_crotch@sh.itjust.works 3 points 1 month ago (1 children)

That's great, glad to hear it. Start doing backups too!

[–] gregor@gregtech.eu 3 points 1 month ago

I shall, thanks