bug-ddrescue
[Top][All Lists]
Advanced

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

Re: [Bug-ddrescue] bug/feature request: sparse file to block device


From: Mark
Subject: Re: [Bug-ddrescue] bug/feature request: sparse file to block device
Date: Tue, 25 Sep 2012 17:13:14 +0100
User-agent: SquirrelMail/1.4.21

Hi,

On Mon, September 24, 2012 08:21, Steven Noonan wrote:
> It seems that ddrescue doesn't like using -S with block device output
> targets. My use case is copying a sparse file (QEMU raw disk image)
> onto an empty physical volume. I'd like to avoid doing 'dd
> if=sparsefile of=/dev/sdf' because zeros from the sparse file will be
> written to the target.

It isn't ddrescue, but ddpt should be able to do what you want. See
  http://sg.danny.cz/sg/ddpt.html

You'd use a command like this:
  ddpt if=imagefile.bin of=/dev/sdd bs=512 bpt=128 oflag=sparse

If you have an SSD, ddpt can also "trim" all-zero regions rather than just
skip them. For that you'd do something like:
  ddpt if=imagefile.bin of=/dev/sdd bs=512 bpt=128 oflag=pt,trim


Regards,
-- Mark





reply via email to

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