Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be unavailable on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 813862 - post-snap1 fixups to live block copy aka mirroring
Summary: post-snap1 fixups to live block copy aka mirroring
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.3
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Paolo Bonzini
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 813810
Blocks: 802284 806280
TreeView+ depends on / blocked
 
Reported: 2012-04-18 15:36 UTC by Paolo Bonzini
Modified: 2013-01-10 00:53 UTC (History)
14 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.291.el6
Doc Type: Bug Fix
Doc Text:
No Documentation Needed
Clone Of:
Environment:
Last Closed: 2012-06-20 11:46:56 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0746 0 normal SHIPPED_LIVE qemu-kvm bug fix and enhancement update 2012-06-19 19:31:48 UTC

Description Paolo Bonzini 2012-04-18 15:36:34 UTC
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

Comment 3 Shaolong Hu 2012-05-03 03:50:55 UTC
- 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

Comment 4 Shaolong Hu 2012-05-03 04:39:05 UTC
- 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.

Comment 5 Shaolong Hu 2012-05-03 05:38:14 UTC
- 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.

Comment 6 Shaolong Hu 2012-05-03 05:46:13 UTC
- 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.

Comment 7 Shaolong Hu 2012-05-03 06:05:10 UTC
Forgot to say, steps in comment 4 is reopening the target when have not reached steady state.

Comment 8 Shaolong Hu 2012-05-03 06:35:35 UTC
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

Comment 9 Ademar Reis 2012-05-03 14:51:19 UTC
    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

Comment 14 Shaolong Hu 2012-05-11 03:00:47 UTC
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.

Comment 16 errata-xmlrpc 2012-06-20 11:46:56 UTC
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


Note You need to log in before you can comment on or make changes to this bug.