Bug 1534898
| Summary: | qemu-img should give meaningful error messages when create 16TB luks format image on ext4 | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | Ping Li <pingl> |
| Component: | qemu-kvm | Assignee: | Maxim Levitsky <mlevitsk> |
| qemu-kvm sub component: | General | QA Contact: | Xueqiang Wei <xuwei> |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | low | ||
| Priority: | low | CC: | berrange, chayang, coli, ddepaula, juzhang, knoel, ngu, rbalakri, virt-maint |
| Version: | --- | Keywords: | Triaged |
| Target Milestone: | rc | Flags: | pm-rhel:
mirror+
|
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | qemu-kvm-5.1.0-2.module+el8.3.0+7652+b30e6901 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-11-17 17:44:45 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Ping Li
2018-01-16 08:59:56 UTC
Reproduced this issue in latest qemu package. Steps: # qemu-img create -f luks --object secret,id=sec0,data=base -o key-secret=sec0 test.luks 16T Formatting 'test.luks', fmt=luks size=17592186044416 key-secret=sec0 qemu-img: test.luks: Could not resize file: File too large # qemu-img info test.luks image: test.luks file format: raw virtual size: 0 (0 bytes) disk size: 0 # df -T test.luks Filesystem Type 1K-blocks Used Available Use% Mounted on /dev/loop0 ext4 5095040 20472 4796040 1% /mnt # qemu-img --version qemu-img version 4.0.0 (qemu-kvm-4.0.0-6.module+el8.1.0+3736+a2aefea3) Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers 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 Pulled upstream, see: https://git.qemu.org/?p=qemu.git;a=commit;h=3d1900a471c89ebdd9ea7f3582fe487e2f494419 Tested with qemu-kvm-5.1.0-2.module+el8.3.0+7652+b30e6901, not hit this issue. So set status to VERIFIED. Versions: kernel-4.18.0-232.el8.x86_64 qemu-kvm-5.1.0-2.module+el8.3.0+7652+b30e6901 create 16TB luks format image on ext4 # qemu-img create -f raw loop_img 50G # losetup /dev/loop0 loop_img # mkfs.ext4 /dev/loop0 # mkdir /home/luks_test # mount /dev/loop0 /home/luks_test/ # df -T Filesystem Type 1K-blocks Used Available Use% Mounted on /dev/loop0 ext4 51343840 53272 48652744 1% /home/luks_test # qemu-img create -f luks --object secret,id=sec0,data=base -o key-secret=sec0 /home/luks_test/test.luks 16T Formatting '/home/luks_test/test.luks', fmt=luks size=17592186044416 key-secret=sec0 qemu-img: /home/luks_test/test.luks: The requested file size is too large # ls /home/luks_test/* # I also try to create 8EiB luks image on xfs file system, it work well too. # umount /home/luks_test # mkfs.xfs -f /dev/loop0 # mount /dev/loop0 /home/luks_test/ # df -T Filesystem Type 1K-blocks Used Available Use% Mounted on /dev/loop0 xfs 52403200 398400 52004800 1% /home/luks_test # qemu-img create -f luks --object secret,id=sec0,data=base -o key-secret=sec0 /home/luks_test/test.luks 8E qemu-img: Invalid image size specified. Must be between 0 and 9223372036854775807. # ls /home/luks_test/ # 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 (virt:8.3 bug fix and enhancement update), 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/RHBA-2020:5137 |