Created attachment 1181743 [details] screenshot Description of problem: I'm creating a 10 GB (with OS installed ~2.9GB) preallocated raw disk on nfs domain: [vdsm images]# du -sh * 11G dac2079c-e45d-45b9-9d4d-279deb14d3c5/82d395e0-d108-47e6-adbe-e5ab47e1b519 1.1M dac2079c-e45d-45b9-9d4d-279deb14d3c5/82d395e0-d108-47e6-adbe-e5ab47e1b519.lease 4.0K dac2079c-e45d-45b9-9d4d-279deb14d3c5/82d395e0-d108-47e6-adbe-e5ab47e1b519.meta 11G dac2079c-e45d-45b9-9d4d-279deb14d3c5 copying the disk (via the UI): DEBUG::2016-07-19 19:18:06,398::qemuimg::224::QemuImg::(__init__) /usr/bin/taskset --cpu-list 0-1 /usr/bin/nice -n 19 /usr/bin/ionice -c 3 /usr/bin/qemu-img convert -p -t none -T none -f raw /rhev/data-center/ce185612-2017-4ca1-a76f-ee701f73bd33/5cf6dd4b-65db-413a-8226-95bac7ee9378/images/dac2079c-e45d-45b9-9d4d-279deb14d3c5/82d395e0-d108-47e6-adbe-e5ab47e1b519 -O raw /rhev/data-center/m nt/10.35.64.11:_vol_RHEV_Storage_storage__jenkins__ge5__nfs__0/5cf6dd4b-65db-413a-8226-95bac7ee9378/images/3e65a906-62e8-4c18-9b3b-2cef0b4c90bf/ce80aa84-d8b7-4ca3-883c-1e730916c7c0 (cwd None) And the newly copied disk is created as preallocated, raw but only with the actual size of the disk: [vdsm images]# du -sh * 2.9G 258207a7-45ac-48ab-bd1e-a84ec61e9f82 2.8G 3e65a906-62e8-4c18-9b3b-2cef0b4c90bf/ce80aa84-d8b7-4ca3-883c-1e730916c7c0 1.1M 3e65a906-62e8-4c18-9b3b-2cef0b4c90bf/ce80aa84-d8b7-4ca3-883c-1e730916c7c0.lease 4.0K 3e65a906-62e8-4c18-9b3b-2cef0b4c90bf/ce80aa84-d8b7-4ca3-883c-1e730916c7c0.meta From the API: <disk href="/ovirt-engine/api/disks/3e65a906-62e8-4c18-9b3b-2cef0b4c90bf" id="3e65a906-62e8-4c18-9b3b-2cef0b4c90bf"> <actual_size>3003183104</actual_size> <format>raw</format> <image_id>ce80aa84-d8b7-4ca3-883c-1e730916c7c0</image_id> <provisioned_size>10737418240</provisioned_size> <sparse>false</sparse> Version-Release number of selected component (if applicable): How reproducible: 100% Steps to Reproduce: 1. Create a vm with preallocated disk (10GB) on nfs storage domain and install OS 2. Copy the disk to the same domain 3. Attach the disk to the vm Actual results: The actual size will be the "true" disk size (Screenshot attached) Expected results: The disk should be with actual size of the provisioned size that was requested in creation of the source disk (source for the copy operation) Additional info:
Created attachment 1181744 [details] vdsm.log
Raz, isn't this just a subset of bug 1357919?
Allon, No, In this case I expect from qume-img to act like it reads 10 GB of data because this is what the FS should expose to the client who reads a preallocated file. The actual behavior is that qemu-img copies only the true data (2.9 GB) on the preallocated disk and doesn't fill the extra 7.1 GB with '0' (zeros).
*** This bug has been marked as a duplicate of bug 1405822 ***