bug-ddrescue
[Top][All Lists]
Advanced

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

Re: [Bug-ddrescue] Reverse mode clarifications


From: Antonio Diaz Diaz
Subject: Re: [Bug-ddrescue] Reverse mode clarifications
Date: Thu, 13 Feb 2014 18:59:53 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.11) Gecko/20050905

Hello Florian.

Florian Sedivy wrote:
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?

Ddrescue tries to start from the current position in the requested direction (forward or reverse) if at all possible. Else, if the current position is out of the rescue domain for example, it starts from the beginning of the rescue domain forwards, or from the end backwards if reverse is requested.


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.

If there is no log, the first position read will be 600GB. In reverse mode the current position is set to the end of the block being tried.


But where will ddrescue start copying if the current position in the log is
a)100GB
b) 500GB
c) 900GB

Forward: a) 400GB, b) 500GB, c) 400GB.
Reverse: a) 600GB, b) 500GB, c) 600GB.


What if there is a more complex rescue domain (option -m)?

If the current position is not included in one if the blocks of the rescue domain, the copy starts from the beginning of the rescue domain forwards, or from the end backwards if reverse is requested.


Trimming and Splitting ignore both the current position and the --reverse 
option.

Yes.


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 ...

During the copying phase, any block tried in any direction is never more tried again. During the retrying phase, each sector is tried exactly once per pass. If you have seen ddrescue doing anyting else it is a bug.


Best regards,
Antonio.



reply via email to

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