Bug 1242316
| Summary: | Add "unmap" support for drive-mirror | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Fam Zheng <famz> |
| Component: | qemu-kvm-rhev | Assignee: | Fam Zheng <famz> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.2 | CC: | huding, juzhang, mrezanin, pbonzini, virt-maint, xfu |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | qemu-kvm-rhev-2.3.0-13.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-12-04 16:49:33 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: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1232914, 1297255 | ||
|
Description
Fam Zheng
2015-07-13 02:54:39 UTC
reproduced on qemu-kvm-rhev-2.3.0-7.el7.x86_64:
[root@hp-dl385g7-04 ~]# rpm -q qemu-kvm-rhev
qemu-kvm-rhev-2.3.0-7.el7.x86_64
[root@hp-dl385g7-04 ~]# qemu-img create source.img 1G
Formatting 'source.img', fmt=raw size=1073741824
[root@hp-dl385g7-04 ~]# qemu-io source.img -c 'write -z 0 1G'
WARNING: Image format was not specified for 'source.img' and probing guessed raw.
Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
Specify the 'raw' format explicitly to remove the restrictions.
wrote 1073741824/1073741824 bytes at offset 0
1 GiB, 1 ops; 0.0095 sec (105.020 GiB/sec and 105.0200 ops/sec)
[root@hp-dl385g7-04 ~]# /usr/libexec/qemu-kvm -drive file=source.img,if=none,id=source -monitor stdio
(qemu) drive_mirror source target.img
Formatting 'target.img', fmt=raw size=1073741824
(qemu) info block
block block-jobs blockstats
(qemu) info block-jobs
Type mirror, device source: Completed 1073741824 of 1073741824 bytes, speed limit 0 bytes/s
(qemu) blo
block_job_cancel block_job_complete block_job_pause
block_job_resume block_job_set_speed block_passwd
block_resize block_set_io_throttle block_stream
(qemu) block_job
block_job_cancel block_job_complete block_job_pause
block_job_resume block_job_set_speed
(qemu) block_job_complete source
(qemu) quit
[root@hp-dl385g7-04 ~]# qemu-img map target.img
Offset Length Mapped to File
0 0x40000000 0 target.img
If testing this with NFS (bug 1079385) note that NFS 4.2 negotation must be enabled explicitly. This test case should be added to the thin-provisioning test plan. Another important test case is to run fstrim during drive-mirror. Fix included in qemu-kvm-rhev-2.3.0-13.el7 Verified on qemu-kvm-rhev-2.3.0-13.el7.x86_64: with steps in comment 2, after last step: [root@hp-dl385g7-02 ~]# qemu-img map target.img Offset Length Mapped to File 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://rhn.redhat.com/errata/RHBA-2015-2546.html |