Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 783184 - storage cloning ignores "sparse" and creates non-sparse disk images
storage cloning ignores "sparse" and creates non-sparse disk images
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.3
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Cole Robinson
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-19 10:59 EST by Marian Csontos
Modified: 2012-08-16 01:39 EDT (History)
10 users (show)

See Also:
Fixed In Version: libvirt-0.9.10-1.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-20 02:46:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
virt-clone log with --debug (5.51 KB, text/plain)
2012-02-03 02:43 EST, zhe peng
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0748 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2012-06-19 15:31:38 EDT

  None (edit)
Description Marian Csontos 2012-01-19 10:59:59 EST
Description of problem:
virt-clone ignores "sparse" and creates non-sparse disk images

Version-Release number of selected component (if applicable):
python-virtinst-0.600.0-5.el6.noarch

How reproducible:
100%

Steps to Reproduce:
1. clone sparse VM
2. run stat and compare blocks allocated
  
Actual results:
cloned image is non sparse - the amount of blocks is several times bigger than original.

Expected results:
cloned image is sparse

Additional info:
I have not done any investigation on older versions.
Comment 2 Cole Robinson 2012-01-25 16:57:24 EST
Please provide output of virt-clone --debug when reproducing
Comment 4 zhe peng 2012-02-03 02:43:33 EST
Created attachment 559242 [details]
virt-clone log with --debug
Comment 5 Cole Robinson 2012-02-07 14:54:18 EST
This is a libvirt bug, patch forthcoming.
Comment 10 zhe peng 2012-02-14 04:59:58 EST
verify with:
libvirt-0.9.10-1.el6.x86_64
python-virtinst-0.600.0-7.el6.noarch

step same with comment 3
before clone:
# du v1.img 
2871456	v1.img
# stat v1.img 
  File: `v1.img'
  Size: 6291456000	Blocks: 5742912    IO Block: 4096   regular file
Device: 805h/2053d	Inode: 2885429     Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2012-02-14 04:50:59.918362545 -0500
Modify: 2012-02-14 04:50:04.372426169 -0500
Change: 2012-02-14 04:50:30.955113070 -0500
after clone:
# du v1-clone.img 
749936	v1-clone.img
# stat v1-clone.img 
  File: `v1-clone.img'
  Size: 6291456000	Blocks: 1499872    IO Block: 4096   regular file
Device: 805h/2053d	Inode: 2885438     Links: 1
Access: (0644/-rw-r--r--)  Uid: (  107/    qemu)   Gid: (  107/    qemu)
Access: 2012-02-14 04:53:43.038592256 -0500
Modify: 2012-02-14 04:57:14.586157421 -0500
Change: 2012-02-14 04:57:14.586157421 -0500

the cloned image is sparse,verification passed.
move to verified.
Comment 13 errata-xmlrpc 2012-06-20 02:46:56 EDT
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-2012-0748.html
Comment 14 MATSUU Takuto 2012-08-16 01:39:24 EDT
It seems that even if I set --nonsparse option, virt-clone always creates sparse disk image.

Note You need to log in before you can comment on or make changes to this bug.