I have tried to fix the bad sectors of an external HDD following the advice of user228505, that is, installing smartctl

sudo apt-get install smartmontools

then executing

sudo smartctl --all /dev/sdc2  

(sdc2 is where my hdd is) and then I've obtained the following error message:

Long (extended) offline self test failed [unsupported scsi opcode]

Does anyone know how I should proceed? Is this because my external hdd might be too old? Thank you!

  • 1
    I don't think smartctl can fix bad sectors, but it can detect them and in general tell you if there are problems with the hard disk drive, if the drive supports S.M.A.R.T.
    – sudodus
    Jun 19, 2018 at 18:03

1 Answer 1


Your smartctl test error is likely the result of using a USB adapter. Many external drive adapters are not supported. However, they are sometimes easy to disassemble, so if you can take the enclosure apart (without wrecking it) you could remove the HDD and plug it to a motherboard SATA port. If it looks too difficult, use the model number to find a tutorial, or simply don't bother.

badblocks -wsv is an effective way to deal with bad sectors. If successful your drive won't report the previous errors so you won't have to deal with some pesky bad-sector issues like SMART tests stopping at the first bad sector, DBAN stopping before it even starts, and the /dead.letter 24 hour repeat add-ons. As long as other sectors don't fail you should be okay and your drive will function like everything's fine. If more sectors fail look for a new drive.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .