RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1297255 - add possibility to sparsify image during block copy
Summary: add possibility to sparsify image during block copy
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.3
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: 7.4
Assignee: Peter Krempa
QA Contact: yisun
URL:
Whiteboard:
Depends On: 1232914 1242316 1533975
Blocks: 1229843 1288337 1401400 1473733 1477664 1546815
TreeView+ depends on / blocked
 
Reported: 2016-01-11 01:39 UTC by Fam Zheng
Modified: 2022-03-13 13:59 UTC (History)
23 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1232914
Environment:
Last Closed: 2018-12-18 12:14:35 UTC
Target Upstream Version:
Embargoed:
asoni: needinfo-


Attachments (Terms of Use)

Comment 24 Peter Krempa 2017-12-12 09:01:46 UTC
Fixing summary to clarify. 

Description asks libvirt to add possibility to enable sparsification of the regions of the image containing only zero blocks so that they are actually unmapped.

Note that this comes with a performance penalty thus it should not be enabled by default.

Also note that qemu already keeps the unmaped regions unmapped when copying, so this is useful only when the regions were not unmapped before for some reasons.

Comment 31 Peter Krempa 2018-12-18 12:14:35 UTC
So unfortunately it looks like qemu will not provide the required interface (https://bugzilla.redhat.com/show_bug.cgi?id=1533975) which will allow to skip zero-writes when doing a block-copy operation into a raw file.

Closing as CANTFIX

It is possible to do a workaround with a few manual/external steps:
1) create a snapshot on top of the raw file on the local filesystem or NFS (virsh snapshot-create --no-metadata ...)
2) manually copy over the original file and sparsify it since it's no longer written to
3) manually create an empty qcow2 file with a backing file which points to the new file copied in step 2
4) use block copy operation to switch to the new file: (virsh blockcopy --reuse-external --transient-job --shallow --pivot ...) and wait for it to finish
5) use block-commit to remove the temporary snapshot and start using the copied file (virsh blockcommit --active --pivot ...)


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