Bug 1514373
| Summary: | RFE: support preallocation=falloc/full/off when create raw image on cephfs | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | Longxiang Lyu <lolyu> |
| Component: | qemu-kvm | Assignee: | Virtualization Maintenance <virt-maint> |
| qemu-kvm sub component: | Ceph | QA Contact: | zixchen |
| Status: | CLOSED WONTFIX | Docs Contact: | |
| Severity: | medium | ||
| Priority: | medium | CC: | aliang, chayang, coli, juli, juzhang, knoel, qzhang, rbalakri, sgarzare, virt-maint |
| Version: | --- | Keywords: | FutureFeature, Triaged |
| Target Milestone: | rc | Flags: | knoel:
mirror+
|
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-02-15 07:31:15 UTC | Type: | Feature Request |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1200234 | ||
|
Description
Longxiang Lyu
2017-11-17 09:09:32 UTC
Creating raw image with preallocation=falloc/full/off on iSCSI backend also has this problem: # qemu-img create -f raw iscsi://10.0.0.7/iqn.2017-08.com.yilzhang:libiscsi/0 10G -o preallocation=full qemu-img: Invalid parameter 'preallocation' qemu-img: iscsi://10.0.0.7/iqn.2017-08.com.yilzhang:libiscsi/0: Invalid options for file format 'raw' *** Bug 1200232 has been marked as a duplicate of this bug. *** I posted a patch upstream to add the support of preallocation (full/off) for RBD images. https://lists.gnu.org/archive/html/qemu-devel/2019-04/msg04663.html For qcow2 with rbd, preallocation=full does not work now.
Tested with:
qemu-kvm-4.1.0-4.module+el8.1.0+4020+16089f93
kernel-4.18.0-135.el8
Preallocation=off
# qemu-img create -f qcow2 -o preallocation=off rbd:kvmtest-pool/test.qcow2 2G
Formatting 'rbd:kvmtest-pool/test.qcow2', fmt=qcow2 size=2147483648 cluster_size=65536 preallocation=off lazy_refcounts=off refcount_bits=16
# qemu-img map --output=json rbd:kvmtest-pool/test_off.img
[{ "start": 0, "length": 2147483648, "depth": 0, "zero": true, "data": false}]
Preallocation=metadata
# qemu-img create -f qcow2 -o preallocation=metadata rbd:kvmtest-pool/test.qcow2 5G
Formatting 'rbd:kvmtest-pool/test.qcow2', fmt=qcow2 size=5368709120 cluster_size=65536 preallocation=metadata lazy_refcounts=off refcount_bits=16
# qemu-img map --output=json rbd:kvmtest-pool/test.qcow2
[{ "start": 0, "length": 536870912, "depth": 0, "zero": false, "data": true, "offset": 327680},
{ "start": 536870912, "length": 536870912, "depth": 0, "zero": false, "data": true, "offset": 537264128},
{ "start": 1073741824, "length": 536870912, "depth": 0, "zero": false, "data": true, "offset": 1074200576},
{ "start": 1610612736, "length": 536870912, "depth": 0, "zero": false, "data": true, "offset": 1611137024},
{ "start": 2147483648, "length": 536870912, "depth": 0, "zero": false, "data": true, "offset": 2148139008},
{ "start": 2684354560, "length": 536870912, "depth": 0, "zero": false, "data": true, "offset": 2685075456},
{ "start": 3221225472, "length": 536870912, "depth": 0, "zero": false, "data": true, "offset": 3222011904},
{ "start": 3758096384, "length": 536870912, "depth": 0, "zero": false, "data": true, "offset": 3758948352},
{ "start": 4294967296, "length": 536870912, "depth": 0, "zero": false, "data": true, "offset": 4295950336},
{ "start": 4831838208, "length": 536870912, "depth": 0, "zero": false, "data": true, "offset": 4832886784}]
Preallocation=full
# qemu-img create -f qcow2 -o preallocation=full rbd:kvmtest-pool/test_full.qcow2 5G
Formatting 'rbd:kvmtest-pool/test_full.qcow2', fmt=qcow2 size=5368709120 cluster_size=65536 preallocation=full lazy_refcounts=off refcount_bits=16
qemu-img: rbd:kvmtest-pool/test_full.qcow2: Could not resize image: Failed to resize underlying file: Unsupported preallocation mode 'full'
(In reply to Tingting Mao from comment #9) > For qcow2 with rbd, preallocation=full does not work now. > The patch is not merged yet, I sent a v3 [1] and now I'm working on the v4. I hope I'll send it this week. [1] https://www.mail-archive.com/qemu-devel@nongnu.org/msg632765.html *** Bug 1782666 has been marked as a duplicate of this bug. *** QEMU has been recently split into sub-components and as a one-time operation to avoid breakage of tools, we are setting the QEMU sub-component of this BZ to "General". Please review and change the sub-component if necessary the next time you review this BZ. Thanks After evaluating this issue, there are no plans to address it further or fix it in an upcoming release. Therefore, it is being closed. If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened. For rbd backend, only create qcow2 image with preallocation=off has no error. As it is a RFE bug, QA agrees to close this bug. Checked version qemu-kvm-5.2.0-1.module+el8.4.0+9091+650b220a.x86_64 #qemu-img create -f qcow2 -o preallocation=off rbd:rbd/test.qcow2 1G Formatting 'rbd:rbd/test.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off preallocation=off compression_type=zlib size=1073741824 lazy_refcounts=off refcount_bits=16 |