Bug 1252372 - drive_mirror can't be done on 'raw' type drive
drive_mirror can't be done on 'raw' type drive
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev (Show other bugs)
7.2
ppc64le Linux
unspecified Severity unspecified
: rc
: ---
Assigned To: Jeff Cody
Virtualization Bugs
:
Depends On:
Blocks: RHEV3.6PPC
  Show dependency treegraph
 
Reported: 2015-08-11 05:23 EDT by Zhengtong
Modified: 2016-02-21 06:10 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-01-21 02:20:10 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Zhengtong 2015-08-11 05:23:44 EDT
Description of problem:

Do drive_mirror through qmp on raw type drive, target mirror file size is not normal. 

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.3.0-16.el7

How reproducible:
100%

Steps to Reproduce:
1.Start guest on powerpc with raw type drive:
qemu-kvm ...
-drive file=/root/test_home/liuzt/vdisk/rhel7.2_be_dataplane.raw,if=none,id=drive-scsi0-0-0-0,format=raw,cache=none,rerror=stop,werror=stop \
-device virtio-blk-pci,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bus=pci.0,addr=0x3,bootindex=1 \
...

2.After guest boot up , do drive_mirror with qmp cli.

{ "execute":  "drive-mirror", "arguments": { "device": "drive-scsi0-0-0-0", "target":  "/root/test_home/liuzt/vdisk/mirror.raw", "format": "raw", "mode": "absolute-paths", "sync":  "full", "speed": 1000000000, "on-source-error": "stop",  "on-target-error": "stop" } }

3.Check target file /root/test_home/liuzt/vdisk/mirror.raw

Actual results:

/root/test_home/liuzt/vdisk/mirror.raw exist, but the size is always 196K. 

Expected results:

the size should be same with that of origin drive image.

Additional info:

Qemu cmd: 
/usr/libexec/qemu-kvm -name liuzt-RHEL-7.2_BE -machine pseries,accel=kvm,usb=off -m 8192 -realtime mlock=off -smp 4,sockets=1,cores=2,threads=2 \
-rtc base=localtime,clock=host,driftfix=slew \
-monitor stdio \
-no-shutdown \
-boot strict=on \
-device usb-ehci,id=usb,bus=pci.0,addr=0x1 \
-device pci-ohci,id=usb1,bus=pci.0,addr=0x2 \
-drive file=/root/test_home/liuzt/vdisk/rhel7.2_be_dataplane.raw,if=none,id=drive-scsi0-0-0-0,format=raw,cache=none,rerror=stop,werror=stop \
-device virtio-blk-pci,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bus=pci.0,addr=0x3,bootindex=1 \
-drive file=/root/test_home/liuzt/vdisk/RHEL-7.2-20150806.1-Server-ppc64-dvd1.iso,id=drive-scsi0-0-0-1,format=raw,if=none \
-device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x4 \
-device scsi-cd,drive=drive-scsi0-0-0-1,bus=scsi0.0,bootindex=2 \
-drive file=/root/test_home/liuzt/vdisk/test.img,id=test,if=none,format=qcow2,cache=none \
-device scsi-hd,drive=test,bus=scsi0.0 \
-serial pty \
-device usb-kbd,id=input0 \
-device usb-mouse,id=input1 \
-device usb-tablet,id=input2 \
-vnc 0:16 -device VGA,id=video0,vgamem_mb=16,bus=pci.0,addr=0x5 \
-msg timestamp=on \
-netdev tap,id=hostnet0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:c4:e7:93,bus=pci.0,addr=0x6 \
-qmp tcp:0:4448,server,nowait \
Comment 3 Thomas Huth 2016-01-18 09:52:29 EST
Does this only happen on ppc64? i.e. did you try it on x86_64, too?
Comment 4 Zhengtong 2016-01-20 00:15:24 EST
(In reply to Thomas Huth from comment #3)
> Does this only happen on ppc64? i.e. did you try it on x86_64, too?

Yes , it works well on X86.
Comment 5 Thomas Huth 2016-01-20 06:20:02 EST
Ok, I've just tried it with qemu-kvm-rhev-2.3.0-31.el7_2.5.ppc64le, and I was not able to reproduce this problem. The mirror.raw had the right size. Zhengtong, could you please try whether you can still reproduce this problem with the latest version of qemu-kvm-rhev on ppc64le? Also, is there any output from QEMU? For me it says something like:
 Formatting '/root/test_home/liuzt/vdisk/mirror.raw', fmt=raw size=10739318784
when I issue the QMP command. Do you get a similar message or maybe even an error message?
Comment 6 Zhengtong 2016-01-20 21:49:33 EST
Hi , Thomas , the bug seems fixed already in some versions before. I can't reproduce it any more , either. The qemu message is "Formatting '/root/test_home/liuzt/vdisk/mirror.raw', fmt=raw size=21474836480",  After the process finished , the size if normal (1.5G in my test). So this bug could be closed.
Comment 7 Thomas Huth 2016-01-21 02:20:10 EST
Ok, closing since it seems to be fixed in the current version already.

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