Bug 2010067
Summary: | Downloading prellocated disk created preallocated image | ||
---|---|---|---|
Product: | [oVirt] ovirt-imageio | Reporter: | Nir Soffer <nsoffer> |
Component: | Client | Assignee: | Nir Soffer <nsoffer> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Ilia Markelov <imarkelo> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 2.2.0 | CC: | bugs, eshames, nsoffer, sfishbai, sgordon, tnisan |
Target Milestone: | ovirt-4.5.0 | Keywords: | ZStream |
Target Release: | 2.3.0 | Flags: | sbonazzo:
ovirt-4.5+
|
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | ovirt-imageio-2.3.0-1 | Doc Type: | Bug Fix |
Doc Text: |
Cause: Previoulsy, when downloading preallocated disk the downloaded image is fully allocated instead of sparse.
Consequence: This was inefficient when the image should be transferred to another machine, or uploaded back to storage.
Fix: downloaded image is now saved as sparse
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2022-04-20 06:33:59 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | Storage | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Nir Soffer
2021-10-03 12:05:26 UTC
Example functional test: 1. Add 2g preallocated disk with alias=empty uuid=7be36ade-6b39-4da2-ad1d-1a2a74381d1f 2. Add 2g preallocated disk with alias=half uuid=6f09ea12-d8a6-48a3-8c05-5ecd94b34403 3. Add 2g preallocated disk with alias=full uuid=baf0e5df-ba31-42d5-902a-94735b83e911 4. Start the VM 5. Zero the tests disks for disk_id in 7be36ade-6b39-4da2-ad1d-1a2a74381d1f 6f09ea12-d8a6-48a3-8c05-5ecd94b34403 baf0e5df-ba31-42d5-902a-94735b83e911; do blkdiscard --zeroout /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_$disk_id done 6. Write 1g data to disk "half" dd if=/dev/zero bs=1M count=1024 | tr "\0" "\1" > /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_6f09ea12-d8a6-48a3-8c05-5ecd94b34403 7. Write 2g of data to disk "full" dd if=/dev/zero bs=1M count=2048 | tr "\0" "\1" > /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_baf0e5df-ba31-42d5-902a-94735b83e911 8. Shut down the VM 9. Download disk "empty" $ ./download_disk.py -c engine-dev 7be36ade-6b39-4da2-ad1d-1a2a74381d1f empty.qcow2 10. Download disk "half" $ ./download_disk.py -c engine-dev 6f09ea12-d8a6-48a3-8c05-5ecd94b34403 /data/scratch/nsoffer/half.qcow2 11. Download disk "full" $ ./download_disk.py -c engine-dev baf0e5df-ba31-42d5-902a-94735b83e911 /data/scratch/nsoffer/full.qcow2 12. Check downloaded images size $ qemu-img info empty.qcow2 | grep 'disk size' disk size: 512 KiB $ qemu-img info half.qcow2 | grep 'disk size' disk size: 1 GiB $ qemu-img info full.qcow2 | grep 'disk size' disk size: 2 GiB $ git tag --contains 70e9fb26d8acdd1dbd72e0de85d063ba56b67e19 v2.3.0 v2.4.1 Verified. Zeroed areas are not stored as data, extends are detected as "zero": true, and image size is as big as it should be while testing all best/common/worst cases. Version 4.5.0-0.237.el8ev ovirt-imageio-client-2.4.1-1.el8ev.x86_64 This bugzilla is included in oVirt 4.5.0 release, published on April 20th 2022. Since the problem described in this bug report should be resolved in oVirt 4.5.0 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report. |