Barry Jones wrote:
I've noticed strange behavior related to the --preallocate argument in
ddrescue. I typically output to an image file on an NTFS volume. When I use
the --preallocate argument, it takes several hours to create the
preallocated image file. Conversely, if I omit the --preallocate argument
and use the --reverse argument, the full-sized image file gets created
almost immediately. I'm not using the --sparse argument in either case.
This is as expected.
If --reverse is used, ddrescue needs to seek to a position close to the
end of the destination file before the first file write occurs. This
quickly creates a virtually full-sized but physically very small sparse
file if the destination filesystem supports this.
Note that, unlike Linux/BSD/... filesystems, the NTFS filesystem
requires to set FILE_ATTRIBUTE_SPARSE_FILE to enable this behavior. But
if the Cygwin version of ddrescue is used, this may be done
automatically. See the FAQ for more details:
https://cygwin.com/doc/preview/faq/faq.html#faq.using.sparse-files
--
Regards,
Christian