Bug 1001619 - only a scsi disk detected in guest when use discontinuous lun ID (stepping 63)
only a scsi disk detected in guest when use discontinuous lun ID (stepping 63)
Status: CLOSED WORKSFORME
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
7.0
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Fam Zheng
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-27 08:16 EDT by xu
Modified: 2014-04-18 07:55 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-04-18 07:55:03 EDT
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)
info qtree output (166.99 KB, text/plain)
2013-08-27 08:16 EDT, xu
no flags Details
boot guest cmdline (49.57 KB, text/plain)
2013-08-27 08:17 EDT, xu
no flags Details

  None (edit)
Description xu 2013-08-27 08:16:02 EDT
Description of problem:

when we boot rhel7 guest 261 virtio-scsi disk to guest, guest only detect 26 disk; but if we set lun ID discontinuous (with stepping 63) only fist disk detect in guest;
 

Version-Release number of selected component (if applicable):

qemu-kvm-1.5.0-2.el7.x86_64

How reproducible:

100%

Steps to Reproduce:
1. create 1M qcow2 image file

for i in `seq 0 260`;do qemu-img create -f "/tmp/stg$i.qcow2" 1M; done


2. boot guest with cmd in attachment:
    /usr/libexec/qemu-kvm \
    -name 'virt-tests-vm1' \
    -nodefaults \
    -chardev socket,id=qmp_id_qmpmonitor1,path=/tmp/monitor-qmpmonitor1-20130827-183340-iDVccT9c,server,nowait \
    -mon chardev=qmp_id_qmpmonitor1,mode=control \
    -chardev socket,id=serial_id_serial1,path=/tmp/serial-serial1-20130827-183340-iDVccT9c,server,nowait \
    -device isa-serial,chardev=serial_id_serial1 \
    -chardev socket,id=seabioslog_id_20130827-183340-iDVccT9c,path=/tmp/seabios-20130827-183340-iDVccT9c,server,nowait \
    -device isa-debugcon,chardev=seabioslog_id_20130827-183340-iDVccT9c,iobase=0x402 \
    -device ich9-usb-uhci1,id=usb1,bus=pci.0,addr=0x4 \
    -drive file='/root/test/autotest-devel/client/tests/virt/shared/data/images/RHEL-Server-6.3-64-virtio.qcow2',index=0,if=none,id=drive-virtio-disk1,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk1,bootindex=0 \
    -device virtio-scsi-pci,id=virtio_scsi_pci0,addr=0x6 \
    -drive file='/tmp/stg0.qcow2',if=none,id=virtio-scsi2-id0,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=0,drive=virtio-scsi2-id0 \
    -drive file='/tmp/stg1.qcow2',if=none,id=virtio-scsi3-id1,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=63,drive=virtio-scsi3-id1 \
    -drive file='/tmp/stg2.qcow2',if=none,id=virtio-scsi4-id2,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=126,drive=virtio-scsi4-id2 \
    -drive file='/tmp/stg3.qcow2',if=none,id=virtio-scsi5-id3,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=189,drive=virtio-scsi5-id3 \
    -drive file='/tmp/stg4.qcow2',if=none,id=virtio-scsi6-id4,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=252,drive=virtio-scsi6-id4 \
    -drive file='/tmp/stg5.qcow2',if=none,id=virtio-scsi7-id5,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=315,drive=virtio-scsi7-id5 \
    -drive file='/tmp/stg6.qcow2',if=none,id=virtio-scsi8-id6,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=378,drive=virtio-scsi8-id6 \
    -drive file='/tmp/stg7.qcow2',if=none,id=virtio-scsi9-id7,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=441,drive=virtio-scsi9-id7 \
    -drive file='/tmp/stg8.qcow2',if=none,id=virtio-scsi10-id8,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=504,drive=virtio-scsi10-id8 \
    -drive file='/tmp/stg9.qcow2',if=none,id=virtio-scsi11-id9,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=567,drive=virtio-scsi11-id9 \
    -drive file='/tmp/stg10.qcow2',if=none,id=virtio-scsi12-id10,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    ...
    -drive file='/tmp/stg236.qcow2',if=none,id=virtio-scsi238-id236,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=14868,drive=virtio-scsi238-id236 \
    -drive file='/tmp/stg237.qcow2',if=none,id=virtio-scsi239-id237,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=14931,drive=virtio-scsi239-id237 \
    -drive file='/tmp/stg238.qcow2',if=none,id=virtio-scsi240-id238,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=14994,drive=virtio-scsi240-id238 \
    -drive file='/tmp/stg239.qcow2',if=none,id=virtio-scsi241-id239,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=15057,drive=virtio-scsi241-id239 \
    -drive file='/tmp/stg240.qcow2',if=none,id=virtio-scsi242-id240,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=15120,drive=virtio-scsi242-id240 \
    -drive file='/tmp/stg241.qcow2',if=none,id=virtio-scsi243-id241,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=15183,drive=virtio-scsi243-id241 \
    -drive file='/tmp/stg242.qcow2',if=none,id=virtio-scsi244-id242,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=15246,drive=virtio-scsi244-id242 \
    -drive file='/tmp/stg243.qcow2',if=none,id=virtio-scsi245-id243,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=15309,drive=virtio-scsi245-id243 \
    -drive file='/tmp/stg244.qcow2',if=none,id=virtio-scsi246-id244,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=15372,drive=virtio-scsi246-id244 \
    -drive file='/tmp/stg245.qcow2',if=none,id=virtio-scsi247-id245,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=15435,drive=virtio-scsi247-id245 \
    -drive file='/tmp/stg246.qcow2',if=none,id=virtio-scsi248-id246,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=15498,drive=virtio-scsi248-id246 \
    -drive file='/tmp/stg247.qcow2',if=none,id=virtio-scsi249-id247,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=15561,drive=virtio-scsi249-id247 \
    -drive file='/tmp/stg248.qcow2',if=none,id=virtio-scsi250-id248,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=15624,drive=virtio-scsi250-id248 \
    -drive file='/tmp/stg249.qcow2',if=none,id=virtio-scsi251-id249,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=15687,drive=virtio-scsi251-id249 \
    -drive file='/tmp/stg250.qcow2',if=none,id=virtio-scsi252-id250,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=15750,drive=virtio-scsi252-id250 \
    -drive file='/tmp/stg251.qcow2',if=none,id=virtio-scsi253-id251,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=15813,drive=virtio-scsi253-id251 \
    -drive file='/tmp/stg252.qcow2',if=none,id=virtio-scsi254-id252,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=15876,drive=virtio-scsi254-id252 \
    -drive file='/tmp/stg253.qcow2',if=none,id=virtio-scsi255-id253,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=15939,drive=virtio-scsi255-id253 \
    -drive file='/tmp/stg254.qcow2',if=none,id=virtio-scsi256-id254,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=16002,drive=virtio-scsi256-id254 \
    -drive file='/tmp/stg255.qcow2',if=none,id=virtio-scsi257-id255,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=16065,drive=virtio-scsi257-id255 \
    -drive file='/tmp/stg256.qcow2',if=none,id=virtio-scsi258-id256,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=16128,drive=virtio-scsi258-id256 \
    -drive file='/tmp/stg257.qcow2',if=none,id=virtio-scsi259-id257,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=16191,drive=virtio-scsi259-id257 \
    -drive file='/tmp/stg258.qcow2',if=none,id=virtio-scsi260-id258,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=16254,drive=virtio-scsi260-id258 \
    -drive file='/tmp/stg259.qcow2',if=none,id=virtio-scsi261-id259,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=16317,drive=virtio-scsi261-id259 \
    -drive file='/tmp/stg260.qcow2',if=none,id=virtio-scsi262-id260,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=16380,drive=virtio-scsi262-id260 \
    -m 4096 \
    -smp 4,maxcpus=4,cores=2,threads=1,sockets=2 \
    -cpu 'SandyBridge' \
    -M pc \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \
    -vnc :0 \
    -vga cirrus \
    -rtc base=utc,clock=host,driftfix=slew  \
    -boot order=cdn,once=c,menu=off   \
    -no-kvm-pit-reinjection \
    -enable-kvm \
    -monitor stdio


3. login guest to check all disk detected


ls -l /dev/sd*

Actual results:

only 1 scsi disk listed, if changed lun ID increase stepping to 128, 26 disk can be listed in guest;

Expected results:

all 260 disk should be list in guest

Additional info:

see info qtree output in attachment;

test with rhel6.3/ rhel6.4 and rhel7.0 guest met the same issue
Comment 1 xu 2013-08-27 08:16:55 EDT
Created attachment 790942 [details]
info qtree output

info qtree output
Comment 2 xu 2013-08-27 08:17:44 EDT
Created attachment 790944 [details]
boot guest cmdline

boot guest command line
Comment 4 xu 2013-08-27 21:21:22 EDT
retest found when found when lun increase  stepping is 63, only the first disk detected by guest, other not; for other stepping all disk detected in guest;

so correct bug title;

sorry for incorrect info in comment#0;

thanks,
Xu
Comment 5 xhan 2013-11-12 01:11:01 EST
qemu-kvm-1.5.3-10.el7.x86_64

After checking the command line, only the lun is assigned as 0, 1, and then the rest disks are increased by one at every step, the disks can be recognised.

............
-device virtio-scsi-pci,id=virtio_scsi_pci0,addr=0x6 \
    -drive file='/tmp/stg0.qcow2',if=none,id=virtio-scsi2-id0,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=0,drive=virtio-scsi2-id0 \
    -drive file='/tmp/stg1.qcow2',if=none,id=virtio-scsi3-id1,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=1,drive=virtio-scsi3-id1 \
    -drive file='/tmp/stg2.qcow2',if=none,id=virtio-scsi4-id2,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=2,drive=virtio-scsi4-id2 \
    -drive file='/tmp/stg3.qcow2',if=none,id=virtio-scsi5-id3,media=disk,cache=unsafe,snapshot=off,format=qcow2,aio=native \
    -device scsi-disk,lun=3,drive=virtio-scsi5-id3 \
............
Comment 8 xu 2014-04-18 04:55:29 EDT
retest qemu-kvm-1.5.3-60.el7.x86_64 with rhel7.0, rhel6.5 guest, disks list in guest. But in rhel6.4 guest, only lun id less that 255 can be list in guest.


Hi Fam,

does this mean rhel6.4 kernel only support 255 scsi disk? if so I thinks this bugs can be closed.

thanks,
Xu
Comment 9 Fam Zheng 2014-04-18 07:55:03 EDT
Closing this bug because it is not reproduced in RHEL 7.

For RHEL 6.4, 256 should be the limit of targets, and the limit for luns per target is 16384, according to the virtio-scsi specification.

Fam

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