this post was submitted on 25 May 2026
40 points (100.0% liked)

Linux Questions

3952 readers
18 users here now

Linux questions Rules (in addition of the Lemmy.zip rules)

Tips for giving and receiving help

Any rule violations will result in disciplinary actions

founded 2 years ago
MODERATORS
 

Probably due to a power outage, I suddenly lost access to a connected USB HDD yesterday. According to parted, I get the message “unknown partition table,” and gdisk says the GPT is corrupted. Using testdisk, I was able to copy the files to another drive and restore the partition table and mount the HDD.

Is it possible that the partition table was damaged by the power outage, or does this point to a different problem? Can I safely store data on such an HDD again, or should I replace it?

you are viewing a single comment's thread
view the rest of the comments
[–] muhyb@programming.dev 5 points 2 weeks ago (1 children)

Install smartmontools package for your distro, if it's not already installed. Then

Check your disk's name with sudo lsblk. After that, replace your_disk with your disk's name (sda, nvme0n1 etc.) in the command below.

sudo smartctl -x /dev/your_disk

If the results say PASSED, you're probably good. You can also pass the output to an LLM by the way. At least they are good at these kind of things.

[–] possiblylinux127@lemmy.zip 4 points 2 weeks ago (1 children)

I would strongly recommend not using a LLM as they are error prone

[–] muhyb@programming.dev 1 points 2 weeks ago

I agree though I use them as TLDR in this context and they're generally fine with that as far as I can tell. Otherwise it's a long output to check but I usually check the entire output anyway.