Bug 801416 - virtio-scsi: use local image as guest disk can not configure the multipath
virtio-scsi: use local image as guest disk can not configure the multipath
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Paolo Bonzini
Virtualization Bugs
Depends On:
Blocks: 769712 857935 889075
  Show dependency treegraph
Reported: 2012-03-08 08:38 EST by daiwei
Modified: 2013-01-09 19:45 EST (History)
15 users (show)

See Also:
Fixed In Version: qemu-kvm-
Doc Type: Bug Fix
Doc Text:
No documentation needed
Story Points: ---
Clone Of:
Last Closed: 2012-06-20 07:44:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description daiwei 2012-03-08 08:38:03 EST
Description of problem:

use local image as guest disk,attached twice on different virtio-scsi-pci.In guest we get different wwid,so can't configure multipath.

Version-Release number of selected component (if applicable):
# uname -r;rpm -q qemu-kvm

How reproducible:

Steps to Reproduce:
1.boot a guest with one local raw image attached twice,like
/usr/libexec/qemu-kvm -M rhel6.2.0 -cpu cpu64-rhel6 -enable-kvm -m 2G -smp 2,sockets=1,cores=2,threads=1 -name win2003sp2 -uuid 125b7bc8-1b37-49e9-9a33-7e8917c34b88 -rtc base=localtime,driftfix=slew -device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=0x4 -drive file=/home/RHEL6.3_20120304.n.0_x86_64_0308.qcow2,if=none,id=scsi0,format=qcow2,cache=none,werror=stop,rerror=stop,aio=native -device virtio-scsi-pci,id=sysscsi0,bus=pci.0,addr=0x5 -device scsi-hd,drive=scsi0 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup-switch -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:1a:4a:42:1a:52,bus=pci.0,addr=0x3 -chardev socket,id=charchannel0,path=/tmp/wdai-test,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.rhevm.vdsm -spice port=9000,disable-ticketing -vga qxl -global qxl-vga.vram_size=33554432 -usb -device usb-tablet,id=input0 -device virtio-balloon-pci,id=balloon0,addr=0x7  -boot c -monitor stdio -drive file=/home/datadisk.raw,if=none,format=raw,id=datadisk1 -device virtio-scsi-pci,id=scsipci1 -device scsi-hd,drive=datadisk1,serial=test -drive file=/home/datadisk.raw,if=none,format=raw,id=datadisk2 -device virtio-scsi-pci,id=scsipci2 -device scsi-hd,drive=datadisk2,serial=test

2.in guest check wwid
# scsi_id --whitelisted --replace-whitespace --device=/dev/sdb
# scsi_id --whitelisted --replace-whitespace --device=/dev/sdc

Actual results:
after get different wwids


So,can't configure multipath.

Expected results:

should get the same wwids.

Additional info:

If there are other ways to configure multi-path, please correct me.
Comment 2 Paolo Bonzini 2012-03-16 14:10:17 EDT
On real hardware:

$ sudo sg_inq -p 0x80 /dev/sda
VPD INQUIRY: Unit serial number page
  Unit serial number:             5TG11QWL
$ sudo sg_inq -p 0x83 /dev/sda
VPD INQUIRY: Device Identification page
  Designation descriptor number 1, descriptor length: 24
    designator_type: vendor specific [0x0],  code_set: ASCII
    associated with the addressed logical unit
      vendor specific:             5TG11QWL

So if a serial is provided we must use it in page 0x83.  Better do it before 6.3 so that we don't change guest-visible properties later.
Comment 6 Sibiao Luo 2012-04-05 02:11:55 EDT
Reproduced and verified this issue with the same steps as weidai.
Reproduced this issue with the environment and test results as following: 
host info:
# uname -r && rpm -q qemu-kvm
Actual results:

# scsi_id --whitelisted --replace-whitespace --device=/dev/sdb
# scsi_id --whitelisted --replace-whitespace --device=/dev/sdc

Verified this issue with the environment and test results as following: 
host info:
# uname -r && rpm -q qemu-kvm

Actual results:
# scsi_id --whitelisted --replace-whitespace --device=/dev/sdb
# scsi_id --whitelisted --replace-whitespace --device=/dev/sdc

Above all, this issue has been fixed.
Comment 8 Dor Laor 2012-04-22 07:31:47 EDT
    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 9 errata-xmlrpc 2012-06-20 07:44:30 EDT
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.


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