Bug 908980

Summary: Provide the conv=sparse option in dd
Product: Red Hat Enterprise Linux 6 Reporter: Federico Simoncelli <fsimonce>
Component: coreutilsAssignee: Ondrej Vasik <ovasik>
Status: CLOSED ERRATA QA Contact: Tomas Dolezal <todoleza>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.5CC: azelinka, todoleza
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: coreutils-8.4-22.el6 Doc Type: Enhancement
Doc Text:
Feature: Command dd is missing the conversion option for sparse file support format. Reason: 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). Result (if any): Feature was implemented in the RHEL-6 coreutils package based on the upstream solution.
Story Points: ---
Clone Of:
: 998454 (view as bug list) Environment:
Last Closed: 2013-11-21 20:59:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 998454    

Description Federico Simoncelli 2013-02-07 23:37:03 UTC
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):
coreutils-8.4-19.el6.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. $ dd if=/dev/zero of=/tmp/test.dd count=10 conv=sparse
  
Actual results:
dd: invalid conversion: `sparse'

Expected results:
$ stat -c %b /tmp/test.dd
0

Additional info:
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).

Comment 2 Ondrej Vasik 2013-02-08 09:43:09 UTC
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).

Comment 7 errata-xmlrpc 2013-11-21 20:59:31 UTC
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.

http://rhn.redhat.com/errata/RHSA-2013-1652.html