The tool badblocks can give a list of unreadable LBA's, including logical errors I guess.

How can I differentiate between logical (soft) bad blocks and physical (hard) bad blocks?

  • List logical and physical errors seperately or marked as.
  • Indicate type of error for any given LBA.

1 Answer 1


As far as the harddisk is concerned, the LBA (logical block address) is supposed to be the "physical" address of the block.

For modern harddisks this is no longer true, there is an additional level of indirection which maps bad LBAs no blocks from a spare list. There is no way to get at this list, unless you hack the harddrive's firmware. However, SMART values will tell you how many blocks are mapped this way, and how many are left.

This is also the reason badblocks is basically useless for modern harddisks: The harddisk itself will transparently remap the block on the next write (or whenever it feels like it) as soon as it discovers a problem. So badblocks will nearly always tell you "there are no bad blocks", and the harddisk will remap them until it runs out of spares, at which point you'll be in trouble, because by then the harddisk is at the end of its life, and will fail completely and catastrophically very soon.

I am not sure what you mean by "logical errors" and "physical errors": The harddisk doesn't distinguish between different kinds of bad blocks in the error messages you'll see from the harddisk controller.

If this is an XY problem, and your Y is "I need to distinguish between logical and physical bad blocks", please edit the question and describe the X you want to achieve.

  • I would like to know whether the sector of a HDD is actually physically damaged or not. Is there a way without rewrite the sector? (although: if the sector is unreadable, testing rewrite would not really make a difference.)
    – neverMind9
    Nov 19, 2018 at 1:18
  • 1
    As I wrote: You can't really access physical sectors of modern HDDs (the HDD firmware will map the LBA to the real physical address, and you can't see this mapping). It's even worse for SDDs (which routinely update write levelling mappings). So there's no way to know if a given physical sector is damaged or not. Rewriting that sector won't tell you either, the HDD will just map it to a spare if it was damaged, and tell you "all is fine". The best you can do is get the number of physically damaged sectors via SMART.
    – dirkt
    Nov 19, 2018 at 6:52

You must log in to answer this question.

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