Hello Bret, Bret Quigley II wrote:
First of all, let me just say thank you for the excellent ddrescue; I've used it to great success for many years.
You are welcome! :-)
Today I discovered a surprising behavior that seems (to me) to be a bug: using `--domain-mapfile` omits trailing empty space in the created outfile.
This is the expected behavior. It works just like '--size 1GiB', which copies at most 1 GiB of data but does not extend the output file to 1 GiB. Ddrescue does not write zeros to the output when it does not read anything from the input. Just imagine if the mapfile had a extent of 8 EiB, as is the case when ddrescue can't find out the size of the input device.
# Domain logfile created by partclone.ext4 v0.3.32 # Source: /dev/sdc1 # Offset: 0x00000000 # current_pos current_status 0x40000000 ?
It is nice that partclone saves the size of the partition in current_pos. All you need to do is adding '-x 0x40000000' to your ddrescue command.
I can also get the expected output using `--extend-outfile`, e.g.: # ddrescue --domain-mapfile partclone-domain-mapfile --extend-outfile 1GiB /dev/sdc1 out.img out.log But that seems like an unnecessary workaround.
As stated above, using -x is not an unnecessary workaround. Extending the output file by default would be inconsistent and would cause real trouble.
Best regards, Antonio.
