Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
when i tried to random test with 1024 disks assigned to random controllers, targets and LUNs, windows guest only can detect 1020 disks.
BWT, if use the rhel7 guest has no such issue which can detect 1024 disks correctly. It can do hot-plug with 1024 number virtio-scsi disk on one virtio-scsi controller to windows guest successfully and they can be detected in windows guest correctly.
Version-Release number of selected component (if applicable):
host info:
# uname -r && rpm -q qemu-kvm-rhev
3.10.0-121.el7.x86_64
qemu-kvm-rhev-1.5.3-60.el7ev.x86_64
guest info:
win2012R2 64bit
win7 64bit
virtio-win-1.7.0-1.el7.noarch
How reproducible:
100%
Steps to Reproduce:
1.boot up a windows KVM guest with 1024 disks assigned to random controllers, targets and LUNs.
qemu-kvm command script:
cli="/usr/libexec/qemu-kvm -M pc -m 4G -smp 4 -cpu SandyBridge -vnc :1 -monitor stdio -boot menu=on -monitor unix:/tmp/monitor,server,nowait -drive file=/home/windows_server_2012_r2_x64.raw,if=none,id=blk1 -device virtio-blk-pci,scsi=off,drive=blk1,id=blk-disk1,bootindex=1 -netdev tap,id=netdev1,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=netdev1,mac=02:03:04:05:06:00,id=net-pci1"
cli="$cli -device virtio-scsi-pci,id=scsi0"
cli="$cli -device virtio-scsi-pci,id=scsi1"
count=$((${1:-1}-1))
for i in $(seq 0 $count)
do
j=$((2*$i))
echo $j
cli="$cli -drive file=/home/disk/disk$j.qcow2,if=none,id=disk$j"
cli="$cli -device scsi-hd,bus=scsi0.0,drive=disk$j,id=target$j,scsi-id=$(($i%256)),lun=$(($i/256))"
cli="$cli -drive file=/home/disk/disk$(($j+1)).qcow2,if=none,id=disk$(($j+1))"
cli="$cli -device scsi-hd,bus=scsi1.0,drive=disk$(($j+1)),id=target$(($j+1)),scsi-id=$(($i%256)),lun=$(($i/256))"
done
$cli
2.'Rescan Disks' and check the disks numbers in 'Computer Management ----- storage ----- Disk Management'.
Actual results:
after step 2, windows guest only can detect 1020 disks in 'Disk Management', the HMP monitor has 1024 disks correctly.
Expected results:
It can detect 1024 disks in 'Disk Management'.
Additional info:
(In reply to Mike Cao from comment #2)
> I can reproduce this issue with lun=16383
> -device
> scsi-hd,bus=scsi0.0,drive=drive-scsi-11,id=scsi-11,lun=16383,scsi-id=6
WDK defines the maximum number of luns per target as 255 (0..254). 16383 is 3FFF and will be clipped to FF, which is 255. You can try 255, 511, 767, 1023, etc. They also should fail.
(In reply to Vadim Rozenfeld from comment #3)
> (In reply to Mike Cao from comment #2)
> > I can reproduce this issue with lun=16383
> > -device
> > scsi-hd,bus=scsi0.0,drive=drive-scsi-11,id=scsi-11,lun=16383,scsi-id=6
>
> WDK defines the maximum number of luns per target as 255 (0..254). 16383 is
> 3FFF and will be clipped to FF, which is 255. You can try 255, 511, 767,
> 1023, etc. They also should fail.
So you mean lun=256 should be same as lun=0 ,right ?
So Is it normal only 1 disk can be detects if I use following commandline ?
-drive file=test8.qcow2,if=none,id=drive-test8,cache=writethrough,format=qcow2,werror=stop,rerror=stop -device scsi-hd,id=test8,drive=drive-test8,lun=256,scsi-id=1 -drive file=test9.qcow2,if=none,id=drive-test9,cache=writeback,format=qcow2,werror=stop,rerror=stop -device scsi-hd,id=test9,drive=drive-test9,lun=0,scsi-id=1
(In reply to Mike Cao from comment #4)
> (In reply to Vadim Rozenfeld from comment #3)
> > (In reply to Mike Cao from comment #2)
> > > I can reproduce this issue with lun=16383
> > > -device
> > > scsi-hd,bus=scsi0.0,drive=drive-scsi-11,id=scsi-11,lun=16383,scsi-id=6
> >
> > WDK defines the maximum number of luns per target as 255 (0..254). 16383 is
> > 3FFF and will be clipped to FF, which is 255. You can try 255, 511, 767,
> > 1023, etc. They also should fail.
>
> So you mean lun=256 should be same as lun=0 ,right ?
> So Is it normal only 1 disk can be detects if I use following commandline ?
>
> -drive
> file=test8.qcow2,if=none,id=drive-test8,cache=writethrough,format=qcow2,
> werror=stop,rerror=stop -device
> scsi-hd,id=test8,drive=drive-test8,lun=256,scsi-id=1 -drive
> file=test9.qcow2,if=none,id=drive-test9,cache=writeback,format=qcow2,
> werror=stop,rerror=stop -device
> scsi-hd,id=test9,drive=drive-test9,lun=0,scsi-id=1
Right after returning from HWInitialization, Windows sends REPORT_LUNS to all targets. Since the maximum number of luns is 255 (unless this value is limited with max_lun parameter), Windows just cannot recognize
any lut behind 254.
Description of problem: when i tried to random test with 1024 disks assigned to random controllers, targets and LUNs, windows guest only can detect 1020 disks. BWT, if use the rhel7 guest has no such issue which can detect 1024 disks correctly. It can do hot-plug with 1024 number virtio-scsi disk on one virtio-scsi controller to windows guest successfully and they can be detected in windows guest correctly. Version-Release number of selected component (if applicable): host info: # uname -r && rpm -q qemu-kvm-rhev 3.10.0-121.el7.x86_64 qemu-kvm-rhev-1.5.3-60.el7ev.x86_64 guest info: win2012R2 64bit win7 64bit virtio-win-1.7.0-1.el7.noarch How reproducible: 100% Steps to Reproduce: 1.boot up a windows KVM guest with 1024 disks assigned to random controllers, targets and LUNs. qemu-kvm command script: cli="/usr/libexec/qemu-kvm -M pc -m 4G -smp 4 -cpu SandyBridge -vnc :1 -monitor stdio -boot menu=on -monitor unix:/tmp/monitor,server,nowait -drive file=/home/windows_server_2012_r2_x64.raw,if=none,id=blk1 -device virtio-blk-pci,scsi=off,drive=blk1,id=blk-disk1,bootindex=1 -netdev tap,id=netdev1,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=netdev1,mac=02:03:04:05:06:00,id=net-pci1" cli="$cli -device virtio-scsi-pci,id=scsi0" cli="$cli -device virtio-scsi-pci,id=scsi1" count=$((${1:-1}-1)) for i in $(seq 0 $count) do j=$((2*$i)) echo $j cli="$cli -drive file=/home/disk/disk$j.qcow2,if=none,id=disk$j" cli="$cli -device scsi-hd,bus=scsi0.0,drive=disk$j,id=target$j,scsi-id=$(($i%256)),lun=$(($i/256))" cli="$cli -drive file=/home/disk/disk$(($j+1)).qcow2,if=none,id=disk$(($j+1))" cli="$cli -device scsi-hd,bus=scsi1.0,drive=disk$(($j+1)),id=target$(($j+1)),scsi-id=$(($i%256)),lun=$(($i/256))" done $cli 2.'Rescan Disks' and check the disks numbers in 'Computer Management ----- storage ----- Disk Management'. Actual results: after step 2, windows guest only can detect 1020 disks in 'Disk Management', the HMP monitor has 1024 disks correctly. Expected results: It can detect 1024 disks in 'Disk Management'. Additional info: