Hide Forgot
The following fixes were requested during review of the block mirroring patches: - drive-mirror: documentation fixes use current image format as the default when no format is specified - qmp_transaction: remove duplicate check - bdrv_append: add assertion that dirty_bitmap is NULL - drive-reopen: documentation fixes refuse to reopen unless the job completes successfully - block/mirror.c: simple optimization, do not set sector_num = -1 inside the loop
- drive-mirror: documentation fixes use current image format as the default when no format is specified Verify this on qemu-kvm-rhev-0.12.1.2-2.288.el6.x86_64: 1.qemu-img create -f raw sn1 30G 2.{ "execute" : "__com.redhat_drive-mirror", "arguments" : { "device" : "drive-virtio-disk0", "target" : "/root/sn1", "mode": "existing", "full" : false } } 3.{ "execute": "__com.redhat_drive-reopen", "arguments": {"device": "drive-virtio-disk0", "new-image-file": "/root/sn1" } } 4.reboot guest, guest works correctly
- drive-reopen: documentation fixes refuse to reopen unless the job completes successfully Verify this on qemu-kvm-rhev-0.12.1.2-2.288.el6.x86_64: 1.{ "execute": "__com.redhat_drive-reopen", "arguments": {"device": "drive-virtio-disk0", "new-image-file": "/root/sn1" } } {"timestamp": {"seconds": 1336019686, "microseconds": 858254}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "drive-virtio-disk0", "len": 32212254720, "offset": 24367857664, "speed": 0, "type": "mirror"}} {"error": {"class": "DeviceInUse", "desc": "Device 'drive-virtio-disk0' is in use", "data": {"device": "drive-virtio-disk0"}}} 2. (qemu) info block-jobs No active jobs (qemu) info block drive-virtio-disk0: removable=0 io-status=ok file=/root/sn1 ro=0 drv=raw encrypted=0 This one failed.
- qmp_transaction: remove duplicate check Verify this on qemu-kvm-rhev-0.12.1.2-2.288.el6.x86_64: 1.start guest with base: { "execute": "transaction", "arguments": { "actions": [ { 'type': 'blockdev-snapshot-sync', 'data' : { "device": "drive-virtio-disk0", "snapshot-file": "/root/sn1", "format": "qcow2" } }, { 'type': '__com.redhat_drive-mirror', 'data' : { "device": "drive-virtio-disk0", "target": "/root/sn2", "mode": "absolute-paths", "format": "qcow2", "full": false } } ] } } 2. in step 1, i specify "full"=false, but after step 1, base is copied to sn2 3. [root@shu ~]# qemu-img info sn1 image: sn1 file format: qcow2 virtual size: 30G (32212254720 bytes) disk size: 31M cluster_size: 65536 backing file: win7-64-virtio.qcow2 (actual path: win7-64-virtio.qcow2) [root@shu ~]# qemu-img info sn2 image: sn2 file format: qcow2 virtual size: 30G (32212254720 bytes) disk size: 7.6G cluster_size: 65536 [root@shu ~]# qemu-img info win7-64-virtio.qcow2 image: win7-64-virtio.qcow2 file format: qcow2 virtual size: 30G (32212254720 bytes) disk size: 7.4G cluster_size: 65536 here win7-64-virtio.qcow2 is the base. This one failed.
- bdrv_append: add assertion that dirty_bitmap is NULL - block/mirror.c: simple optimization, do not set sector_num = -1 inside the loop These two, test run of mirroring with qemu-kvm-rhev-0.12.1.2-2.288.el6.x86_64, no problem found so far, deem as passed. And according to comment 4 and comment 5, re-assign this bug.
Forgot to say, steps in comment 4 is reopening the target when have not reached steady state.
Test with qemu-kvm-rhev 282, problem in comment 5 also exists, so it's a separated issue, open new one to track it: Bug 818449 - mirroring in QMP transaction with "full"=false is treated as "full"=true
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: No Documentation Needed
Test with steps in comment 4 on qemu-kvm-rhev-0.12.1.2-2.292.el6.x86_64: { "execute" : "__com.redhat_drive-mirror", "arguments" : { "device" : "drive-virtio-disk0", "target" : "/root/nfs/sn3", "format": "qcow2", "mode": "absolute-paths", "full" : true } } {"return": {}} { "execute": "__com.redhat_drive-reopen", "arguments": {"device": "drive-virtio-disk0", "new-image-file": "/root/nfs/sn3", "format": "qcow2" } } {"timestamp": {"seconds": 1336733701, "microseconds": 136915}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "drive-virtio-disk0", "len": 21474836480, "offset": 17934843904, "speed": 0, "type": "mirror"}} {"error": {"class": "DeviceInUse", "desc": "Device 'drive-virtio-disk0' is in use", "data": {"device": "drive-virtio-disk0"}}} (qemu) info block drive-virtio-disk0: removable=0 io-status=ok file=/root/nfs/sn2 backing_file=/root/nfs/sn1 ro=0 drv=qcow2 encrypted=0 Job cancelled, and info block shows correct dependency, fixed.
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. http://rhn.redhat.com/errata/RHBA-2012-0746.html