Hi Felix!
3) Disable relocation of bad sectors?
[...]
[...] it might be quite bad if a
[temporarily] unreadable sector got replaced by
a space and therefore is not accessible anymore.
Maybe there is a way to tell the drive not to relocate sectors on error?
I have no first-hand information on how relocation works but my
understanding of it is this: If a sector can't be read successfully
due to ECC errors the drive returns an error and saves that
information in the SMART logs. If a sector is ECC-correctable but only
barely so or maybe if the sector couldn't be read previously and was
internally marked as such then the drive's firmware will relocate the
restored (i.e. good) data to a spare sector and internally
decommission the original sector. A relocation also takes place if a
known bad sector is written to.
In essence, relocations only happen if the drive firmware is sure to
know what data the sector should contain. If a sector remains
unreadable for all eternity and isn't written to it is also never
relocated.
However, sectors can also be relocated withouth user interaction by a
hard disk's offline data collection. When a hard drive is idle for a
certain period of time it automatically tries to read all sectors and
relocates them if the data can be read successfully but if the sector
is known to be unreliable. As sectors are only relocated when read
successfully I don't see anything wrong with this feature in general,
but if you want to you can turn it off using i.e. smartmontools. If
you do that, don't write to a damaged disk, and don't successfully(!)
read bad sectors then no relocations should happen.
So if my information is correct and there are no implementation bugs
then you should be happy for every relocated sector as it now holds
the data the bad sector was supposed to contain.
Bye, Burkart
_______________________________________________
Bug-ddrescue mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/bug-ddrescue