Red Hat Bugzilla – Bug 908980
Provide the conv=sparse option in dd
Last modified: 2013-11-21 15:59:31 EST
Description of problem:
At the moment dd (part of coreutils) is not supporting the conv=sparse option. Upstream the feature is present since Feb 27 2012:
4e776fa dd: add support for the conv=sparse option
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. $ dd if=/dev/zero of=/tmp/test.dd count=10 conv=sparse
dd: invalid conversion: `sparse'
$ stat -c %b /tmp/test.dd
This feature is quite useful when copying block devices to files to minimize the actual amount of data occupied. More specifically it is very handy when managing virtual machine images on different storages (iscsi, nfs, etc).
Just for reference - related upstream commit is http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=4e776faa8482ae630d2ea9bc767298e664f07ba9 ... it should be easy to backport it. There is some tuning needed for the test (it's not working properly in initial version).
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.