bug-ddrescue
[Top][All Lists]
Advanced

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

[Bug-ddrescue] Reverse mode clarifications


From: Florian Sedivy
Subject: [Bug-ddrescue] Reverse mode clarifications
Date: Thu, 13 Feb 2014 08:01:21 +0100

Antonio Diaz Diaz wrote:

> Hello Florian.
> 
>> Reverse mode during the copying stage - does it reverse the read operation 
>> itself (thereby forcing sector by sector read), or does it reverse the 
>> direction the current position is moving (thereby respecting the copy block 
>> size)? 
> 
> It reverses the direction the current position is moving, respecting the copy 
> block size and the skip size.

Thats great! So to go into even more detail (and starting a new thread to do 
so):
How do reverse mode, current position and the rescue domain correlate?

Let us for example issue on a 1TB drive the command
ddrescue -R -i 400G -s 200G drive image log

If there is no log, the first position read will be 600GB-64KB (64KB being the 
default copy block size), I assume. 
But where will ddrescue start copying if the current position in the log is
a)100GB
b) 500GB
c) 900GB 

Without the -R reverse mode, the answer would probably be a: 400GB, b: 500GB, 
c: finished (<- wrong). 
What if there is a more complex rescue domain (option -m)?

UPDATE: I looked it up myself. 
Trimming and Splitting ignore both the current position and the --reverse 
option. 
When Copying or Retrying, if the first block to be read from the current 
position (forward resp. reverse) is contained in the rescue domain, operation 
resumes from there. If not, the run starts at 0 for forward, at the end for 
reverse operation, which effectively results in the first resp. last block of 
the rescue domain. 

In the example above that means:
Forward run starts at a) 400GB, b) 500GB, c) 400GB
Reverse run starts at a) 600GB, b) 500GB, c) 600GB

Note that the last block tried in a forward run is not tried again in a 
subsequent reverse run and vice versa. When repeatedly alternating directions 
that means the first and last blocks of the rescue domain are tried only half 
as many times as the rest. I am not quite sure if I consider that a bug or a 
feature ...

Greetings, 
Florian




reply via email to

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