Any SMART disk experts? I have a failing external USB drive (spinning rust kind) that I'm trying to get the data off. It has quite a lot of bad sectors that fail the CRC check. The read is going very slowly due to the retries on bad sectors and I'm currently estimating 1-2 weeks to read the whole thing.

Is there a way to make this go faster, such as tuning the number of retries so it gives up faster on the bad sectors?

Thanks everyone who suggested ddrescue! Even with the USB interface to the drive it is estimating only 12 hours to copy 160GB. And I finally installed Linux natively on a physical computer in my house for the first time in over a decade πŸ˜‚
@vaurora congrats, and welcome!

@vaurora I'd make a mirror image of the drive first, with ddrescue. You can tune the retries with that. Then, once you've got as much of the disk imaged as you can, mount the image with loopback.

Also saves on additional wear on the original device.

@vaurora It's been a while since I had to do this, so it's possible that I'm wrong about the tuning part, but I'm pretty sure there's options to change timeouts and retries.
@vaurora generally consumer drives don't let you tune TLER (time limited error recovery), so chances are slim sadly.
@vaurora you might try SpinRite. It supposedly will do a low level read and potentially get the drive to state where you can read it. I've had some luck in the past with it.
https://www.grc.com/sr/spinrite.htm
GRC | Hard drive data recovery software  

Hard drive data recovery software

And now I’m done with Steve Gibson (and SpinRite) – DiskTuna // Photo Repair & Photo Recovery

@vaurora

gnu ddrescue gives you a set of tunables that do what you describe but for whatever my advice is worth, my first step in a data-recovery/forensic context is to swap out the USB controller for an internal connector and desktop power supply, if at all possible. USB-HDD drive connectors are notoriously unreliable and often the root of the problem. Once ddrescue finishes, or gets close to finishing, doing filesystem recovery on the image is much easier.

https://www.gnu.org/software/ddrescue/manual/ddrescue_manual.html

GNU ddrescue Manual

GNU ddrescue Manual

@mhoye @vaurora +5 for ddrescue, AKA gddrescue. Saved my bacon more than once - and a brilliant, elegant piece of software design. (Avoid Spinrite - it was useful on MFM/RLL drives, but is largely snakeoil on modern drives.)
@vaurora hddsuperclone used to be proprietary, but is now free. It can among other things talk directly to the disk, bypassing the OS so it has a better chance to liberate your data.

@vaurora You probably want to get that drive out of the USB enclosure and directly onto a SATA port of a computer. The USB->SATA adapter is 'handling' errors upstream from where your operating system can see them.

I'd get the drive into a PC and 'dd' it to a file first, then mount the image with loopback and read-only and retrieve the files from that disk image. The less the damaged disk is used, the better, and one fell swoop to grab an image is the cleanest exit on that front.

@vaurora @DarcMoughty this!

Image the drive, recover from the image.

You have backups, right?