[olug] drive recovery

Dan Linder dan at linder.org
Fri Mar 21 21:51:44 CDT 2025


If you've got a drive and it still works enough to access it, I have to
recommend the tool "*ddrescue*" over a simple "dd" command.

They essentially produce the same result (an image of the failing HDD), but
ddrescue has options to re-try failed sections and skip them to make a
backup of the remaining good areas.  You can then re-run it and ddrescue
will re-attempt the sections it failed on before.  This is great if your
drive can be coaxed to life by putting it in the refrigerator for a day but
then starts failing after an hour or so - the subsequent re-runs (you can
run it quite few times) will slowly build up more data until it's finished
reading the drive.

And the re-try on failed sectors has a "max" count - I usually end up
running it like this:

   - Run #1 - *ddrescue -r1 /dev/sdXX rescue.sdXX.img rescue.sdXX.map*
      - Does a quick grab of whatever it can, only minimally retrying (-r1)
      failures
   - Run #2 - *ddrescue -r2  /dev/sdXX rescue.sdXX.img rescue.sdXX.map*
      - This re-runs the scan but trying twice before moving on.  If new
      data is recovered, it inserts it into the "rescue.sdXX.img", and
it updates
      the rescue.sdXX.map file to denote what has been recovered.
   - Run #3 - *ddrescue -r5  /dev/sdXX rescue.sdXX.img rescue.sdXX.map*
      - Give it one more try, this time trying five times before exiting.

The -r1/-r2/-r5 are purely from my memory and personal experience.  If the
drive is failing due to heat, cool the drive in the refrigerator inside a
zip-lock bag.  When you take it out moisture will try to condense - the
zip-lock bag will mitigate most of that from happening and won't do much
more damage - it's already dying, right?

Here's a few links:

   - https://en.wikipedia.org/wiki/Ddrescue
   - https://linuxconfig.org/how-to-repair-and-clone-disk-with-ddrescue
   - https://www.gnu.org/software/ddrescue/manual/ddrescue_manual.html

Good luck!
Dan


On Fri, Mar 21, 2025 at 12:52 PM Lou Duchez <lou at paprikash.com> wrote:

> I don't know if this is of any help, but one thing I have done is buy a
> $30 drive duplicator from Amazon, and a blank drive with parameters
> comparable to the one that's going bad on me. IF the drive is still
> mostly readable - though that may not be the case in this situation -
> you can get a properly-working copy of your drive. Right now I'm running
> on a new hard drive in my workhorse laptop, that is a new physical hard
> drive that I cloned from the old drive (five years old and showing signs
> of pending failure).
>
> https://www.amazon.com/dp/B09YY4TJZK
>
> In terms of helping keep a drive going and correct errors, I've been
> using HDD Regenerator and it seems to be able to fix iffy sectors, copy
> data off sectors that are failing, and overall tell you about your drive
> health. You can also make a bootable varmint so you can check out
> multiple computers.
>
> https://www.dposoft.net/
>
> I don't know if that would help if you're click o' deathing, but, maybe?
>
>
> On 3/21/2025 1:00 PM, Eric W. Biederman wrote:
> > Tim Larson <telrsn at gmail.com> writes:
> >
> >> Anyone had good luck with a data recovery service? I’ve got a drive
> >> with the Click O Death I need to salvage files from.
> > What I have always done is copy the entire drive into a file with dd
> > aka:
> >       dd if=/dev/bad-drive of=bad-drive.bin conv=noerror
> >
> > Compress my original backup so it doesn't take too much space
> >       gzip bad-drive.bin
> >
> > Create a copy of the file
> >
> >       zcat bad-drive.bin.gz > bad-drive.bin
> >
> > The fsck the copy
> >
> >       fsck bad-drive.bin
> >
> > The loopback mount it (to get the files you want off)
> >
> >       mount -o loop bad-drive.bin ~/tmp
> >
> > Usually by the time a drive dies my new drives have been significantly
> > larger so it wasn't a problem.
> >
> > There is a newer utility ddrescue that deals with the annoying bits of
> > damaged sectors, so I would definitely recommend starting with that.
> >
> > The important point from perspective is just creating a copy of the data
> > onto another drive so you can get what is salvageable off, separately
> > from dealing with the broken drive.
> >
> > Eric
> > _______________________________________________
> > OLUG mailing list
> > OLUG at olug.org
> > https://www.olug.org/mailman/listinfo/olug
>
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> https://www.olug.org/mailman/listinfo/olug
>


-- 
***************** ************* *********** ******* ***** *** **
"Transparency builds institutional legitimacy - and opacity destroys it."
    -- Noah Bookbinder (Citizens for Responsibility and Ethics in
Washington)

"Quis custodiet ipsos custodes?"
    (Who can watch the watchmen?)
    -- from the Satires of Juvenal

"We the people are the rightful masters of both Congress and the courts,
not to overthrow the Constitution but to overthrow the men who pervert the
Constitution."
    -- Abraham  Lincoln

"I was raised on a diet of Indiana Jones and Captain America and loved them
both. It's pretty clear how I feel about Nazis."
    -- /u//ThePopDaddy - 2023-07-09
** *** ***** ******* *********** ************* *****************


More information about the OLUG mailing list