26

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 6 points 9 hours ago
[-] KiwiTB@lemmy.world 2 points 2 hours ago

It's good, the only downside is it's a smart tool which only gives you smart data Vs actual drive health

[-] muhyb@programming.dev 2 points 42 minutes ago* (last edited 22 minutes ago)

While it's true we don't really need those old tools anymore, unless one have ancient hardware. On Linux we can use badblocks to test the hard drive. This is from Arch Wiki:

Modern HDDs and SSDs include firmware that will automatically detect, attempt to correct, and report errors. However, firmware becomes aware of a corrupted sector only upon an attempt to read or write to it. Badblocks may be used to test the entire device at once. It operates by sequentially attempting to read and optionally write to and read back every sector on a drive, and report errors. Consequently, the firmware will react to any detected failures in this process.

So, for most cases SMART data is actually sufficient. And there is badblocks if you want to check the entire disk. However we don't have manufacturer tools like Windows has.

A little warning about badblocks. Don't do a write test if you have important stuff on it because it will erase the disk.

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

Linux Questions

3710 readers
43 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