bug-ddrescue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: forcing copy mode to finish


From: Florian Sedivy
Subject: Re: forcing copy mode to finish
Date: Sun, 28 Mar 2021 20:23:47 +0200

Hello Jason!

Another possibility would be to generate a file list from the logfile directly. 
How to exactly do that depends on the filesystem used on the damaged volume. I 
already used it for HFS and NTFS in the past. 

The general workflow is: 
1. Generate a list of „bad blocks“ from the mapfile using ddrescuelog (as 
Antonio wrote you can include all not-rescued statuses, so you don’t need to 
„finish“ the rescue) with --list-blocks='?*/-'
2. Use a filesystem tool to get a file list from that block list. 
Details to pay attention to in both steps are offsets, block size, filesystem 
cluster size and such. 

This approach is less universal than Fill Mode + grep, but it can be much 
faster, it includes special files not visible in userspace, and it potentially 
works on volumes that won’t mount.

On volumes that are not very full, this technique can also be used in reverse 
at the start of the rescue, to generate a rescue domain that only includes used 
space, or even only a subset of data. 

BTW, Antonio: Some filesystem tools produce or expect a volume bitmap (for used 
space mostly). Could ddrescuelog get that as an alternative in-/output format 
in addition to „block list“?

Greetings, Florian

> Am 28.03.2021 um 19:44 schrieb Antonio Diaz Diaz <antonio@gnu.org>:
> 
> jason laughman wrote:
> I've been using ddrescue to try and recover a failing 2 TB HDD.  It's
> been running for close to three weeks now and it's still only in pass 3
> of copying. It's recovered all but about 32 GB, and at the rate it's
> going I may just be willing to write that data off and/or regenerate it.
> I'd be a lot more comfortable with that if I knew what files would be
> affected, though.  What I would like to do is have it just finish where
> it's at and mark everything non-tried as bad-sector, or give up a *lot*
> quicker, and then use fill mode to try and figure out which files are
> incomplete, as described in the documentation.  Is there a way to do
> this?

You can use fill mode to figure out which files are incomplete without having 
to mark anything as bad-sector and the such.

First stop ddrescue with Ctrl-C. Then fill all the non-finished areas in the 
destination partition like this:

ddrescue --fill-mode='?*/-' <(printf "NON-RESCUED-SECTOR ") /dev/sda2 
copy_of_mapfile

It is best to use a copy of the mapfile for the fill to avoid changing the 
original mapfile, which would prevent ddrescue from continuing the rescue where 
it was interrupted (in case you wish to do that).


Best regards,
Antonio.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]