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?

  • Brickfrog@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    7
    ·
    edit-2
    20 days ago

    Adding on to the earlier comments you can run tests against the drive with smarctl e.g.

    smartctl --scan (scans and lists all drives connected to your system)

    smartctl -t short /YOUR/DRIVE (short non-destructive drive test, usually takes 3 minutes or so, afterwards run smartctl -a again to view test results towards the bottom of the output)

    smartctl -t long /YOUR/DRIVE (this is a long more thorough test, non-destructive, this can easily take a few hours or even days depending on the size of your drive and whatnot)

    smartctl -a or smartctl -x will give you testing progress in its output.

    Or another option, if you can’t run smartctl for some reason, and you’re just testing a regular HDD not SSD, look into running a badblocks non-destructive scan.