Hi,

Michael Stone wrote on 06/12/2024 14:49:
On Fri, Dec 06, 2024 at 02:26:23PM +0100, Jörg-Volker Peetz wrote:
Should have been more clear. The drive should be idle for a longer time. This is assured by not mounting any partition of the SSD. I was able to "repair" unreadable sectors on a built-in SSD of an HP-Probook laptop. As far as I remember I also deleted files which could not be read any more because of defective sectors and restored the files from backup. Such unreadable files can be found by performing, e.g., a checksum calculation of all files on the SSD. Then, leaving the SSD alone, it was able to "replace" the defective sectors by spare sectors.

Sorry, I don't buy that. Whatever happened, it wasn't the drive pondering unreadable sectors and then regenerating them. I can believe that deleting unreadable files and restoring them made them readable again. (Overwriting a bad sector will cause the original block to be freed and potentially discarded; after rewriting, the data is not in the same physical location it was before.)

Yes, you are right. I also called 'fstrim -a' before restarting the computer into BIOS.

As outlined in a previous post, trimming unused space may also let the drive discard bad blocks. None of that requires the drive to be unmounted.

May be that would have worked if I had waited long enough. But I did it by letting the computer stay in BIOS for a while.

As a check if the defective sectors are all mapped out I did read all sectors of the partitions:

  sudo dd if=/dev/sdaX of=/dev/null bs=8M status=progress

Regards,
Jörg.


Reply via email to