Red Hat Bugzilla – Bug 1566587
Unable to resize image with preallocation=full mode [rhel-7.5.z]
Last modified: 2018-05-10 12:06:09 EDT
This bug has been copied from bug #1549231 and has been proposed to be backported to 7.5 z-stream (EUS).
Fix included in qemu-kvm-rhev-2.10.0-21.el7_5.2
Verified the issue with below packages and steps. Package version: kernel-3.10.0-862.el7.x86_64 qemu-kvm-rhev-2.10.0-21.el7_5.2.x86_64 Steps: 1. Preallocate with mode off, falloc and full in turn 1.1 Create image and resize with preallocation=off mode # qemu-img create -f raw test1.img 5G # qemu-img resize -f raw --preallocation=off test1.img +1G 1.2 Resize again with preallocation=falloc mode # qemu-img resize -f raw --preallocation=falloc test1.img +1G 1.3 Resize with preallocation=full last # qemu-img resize -f raw --preallocation=full test1.img +1G 1.4 Check the result # qemu-img map --output=json test1.img [{ "start": 0, "length": 7516192768, "depth": 0, "zero": true, "data": false, "offset": 0}, { "start": 7516192768, "length": 1073741824, "depth": 0, "zero": false, "data": true, "offset": 7516192768} 2. Preallocate with mode off and full. 2.1 Create image and resize with preallocation=off # qemu-img create -f raw test2.img 5G # qemu-img resize -f raw --preallocation=off test2.img +1G 2.2 Resize image with preallocation=full last # qemu-img resize -f raw --preallocation=full test2.img +1G 2.3 Check the result # qemu-img map --output=json test2.img [{ "start": 0, "length": 6442450944, "depth": 0, "zero": true, "data": false, "offset": 0}, { "start": 6442450944, "length": 1073741824, "depth": 0, "zero": false, "data": true, "offset": 6442450944}] 3. Repeat to preallocate with mode full 3.1 Create image and resize with preallocation=full # qemu-img create -f raw test3.img 5G # qemu-img resize -f raw --preallocation=full test3.img +1G 3.2 Resize image with preallocation=full again # qemu-img resize -f raw --preallocation=full test3.img +1G 3.3 Check the result # qemu-img map --output=json test3.img [{ "start": 0, "length": 5368709120, "depth": 0, "zero": true, "data": false, "offset": 0}, { "start": 5368709120, "length": 2147483648, "depth": 0, "zero": false, "data": true, "offset": 5368709120}]
*** Bug 1537985 has been marked as a duplicate of this bug. ***
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. https://access.redhat.com/errata/RHSA-2018:1369