Hello Antonio,

> From: Antonio Diaz Diaz <anto...@gnu.org> 
> Sent: Friday, April 23, 2021 8:35 PM
> >> Maybe the error is not about writing to sdc but about writing the
> >
> > There would be no "Maybe the error is ..." in case ddrescue would
> > the source of the error (i.e. complete error diagnostics):
> >
> >     ddrescue: /dev/sdc: Write error: No space left on device
> >     ddrescue: logfile: Write error: No space left on device
> >
> > instead of just:
> >
> >     ddrescue: Write error: No space left on device
> >
> > This is not the case even in the latest version 1.25 (11 years
> > It took me a while to figure out the real source of the problem.
> Ddrescue 1.25 reports different diagnostics for outfile and mapfile:
> ddrescue: Write error: No space left on device
> Error writing mapfile 'mapfile': No space left on device

I see, mapfile write error message is OK then.
Before I posted, I was searching the v1.25 source files just for "Write
error" (the error I got) (and found 2 occurrences). I didn't go that far as
to see whether these error messages are related to outfile or mapfile or

> Moreover, an error writing to the mapfile is treated very differently from

> an error writing to outfile:

I did read this part, but only after the "No space left on device" error
(while reading (unrelated to the error message) the whole manual to finally
get the real picture of how ddrescue actually works).

OTOH, talking about mapfile emergency save, I experienced (same recovery
session few days ago) the following problem with mapfile:

ddrescue ...
Timeout expired

ddrescue [exactly the same parameters, immediately after "Timeout expired"]
ddrescue: error in mapfile 'ddrescue.log', line 4736.

awk 'NR >= 4733 && NR <= 4738 {print NR,$0} {next}'  ddrescue.log | cat -evt
4733 0x59A9320200  0x08FAFC00  /$
4734 0x59B22CFE00  0x00000200  -$
4735 0x59B22D0000  0x0BF90000  +$
4736 0x59BE260000  0x000000xCF87050000  0x00980000  ?$
4737 0xCF879D0000  0x00020000  *$
4738 0xCF879F0000  0x01310000  ?$

Like some problem for ddrescue to write out the mapfile
The free space on the drive holding the mapfile was only ~44 kB (copying 1
TB *disk device* to 1 TB *file system*, you know ...), the mapfile itself
was ~134 kB.
But there was no "Error writing mapfile 'mapfile': No space left on device"
This caused lot of already processed (good/bad) blocks between 0x59BE260000
and 0xCF879D0000 to be lost in previous (valid) mapfile.
I fixed the mapfile ("error in mapfile") by changing the offending line to
be contigous with next line.

> > The error diagnostics is insufficient in lot of software, but I'd expect
> > ddrescue better than that.
> I do not remember anybody reporting this problem clearly enough before. I 
> have in the TODO list for ddrescue "replace show_error with
> where adequate", but until now I didn't consider it a priority because it 
> seemed clear to me that a write error causing an immediate exit implied 
> outfile. Maybe I were wrong.

The more diagnostics info, the better ! :-)
"API function(): parameter (e.g. path): API error (number + string)" is a
For example:
  2021-03-31 14:25:39 \\.\physicaldrive2: ReadFile(): The drive cannot find
the sector requested <ERROR_SECTOR_NOT_FOUND/27>
     - offset: 2,000,365,289,472, # bytes processed: 304,260,579,328

> The "Write error" diagnostic will show the name of outfile in the next 
> version of ddrescue. Hope this is what you wanted.

Thank you.


Reply via email to