On Sun, 23 Jan 2022 11:09:47 +0000
Andy Smith <a...@strugglers.net> wrote:

> Yes. When a drive sector goes bad, the drive cannot read from it, so
> you get an error in Linux when a read is attempted.

As I understand things, that isn't entirely correct. From what I
understand:

If the drive can read a sector without error, it passes the data to the
OS and that's it.

If it gets an error, it uses cyclical redundancy check (CRC) data to
reconstruct the data. If that fails, it reports an error to the OS. If
the CRC reconstruction is successful, the drive re-writes the sector
and passes the reconstructed data back to the OS.

If the attempt to re-write the sector fails, the drive allocates a
spare sector, writes that, and notes the mapping in it sector
reallocation table.

There may be multiple efforts to re-write a sector, either in place or
reallocated.

And there's always the possibility that the sector reallocation table
will go bad.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/

Reply via email to