I'm looking for a good explanation about how ddrescue works.
Recently I had a hard drive failure. A fairly new drive too and the failure occurred in the middle of a backup.
The partition map was fine on the failed drive. I could mount partitions (in read-only mode) but I had problems accessing various files.
I replaced the failed drive and with a previous backup I restored all but a few files. I was curious about trying to recover those missing files. I used ddrescue to copy the failed drive.
I recovered the missing files.
The interesting part of the story is after I completed the task, the "failed" drive was fully readable and there were no errors anywhere. I could access all files, including the missing files. I ran fsck on the ext4 partitions without errors and xfs_check found no errors on the xfs partition. Before running ddrescue both checks always failed and found errors.
After ddrescue I ran a smartctl -t long test on the drive and no errors were reported. The ddrescue log provided no clues about what had failed. Since the failure I have not (knowingly) run any kind of write operation to the failed drive.
In short, the "failed" drive is now fully functional as though nothing ever happened.
I understood that ddrescue is non-destructive to the source drive. That is, ddrescue does not perform any write operations to the failed drive. Yet something in the way ddrescue reads data from a "failed" drive somehow fixed the problem I had. I have no intention of now using the "failed" drive in a production system but as the drive works again I'll use for various non-production projects. Still, I'd like to know what happened that the "failed" drive fully recovered itself.
Thanks.