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.
Bug 997736 - virtio scsi disk could not be initialized when hotplug virtio scsi disk more than 995
Summary: virtio scsi disk could not be initialized when hotplug virtio scsi disk more ...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Asias He
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 841519
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-16 05:46 UTC by Xu Han
Modified: 2013-09-04 07:39 UTC (History)
17 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 841519
Environment:
Last Closed: 2013-09-04 07:39:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Xu Han 2013-08-16 05:46:26 UTC
+++ This bug was initially created as a clone of Bug #841519 +++

Description of problem:
 qemu monitor display "could not open disk image /home/disk/disk996.qcow2: Too many open files
 Property 'scsi-hd.drive' can't find value 'scsi996'
" when hotplug number more than 995.  not find any error message from syslog. host and guest work well. 

Version-Release number of selected component (if applicable):
#rpm -qa|grep qemu
qemu-kvm-1.5.2-3.el7.x86_64

# uname -r
3.10.0-8.el7.x86_64

guest: rhel7.0

How reproducible:
100%

Steps to Reproduce:
1./usr/libexec/qemu-kvm -enable-kvm -M pc-i440fx-rhel7.0.0 -smp 4 -m 3G -usb -device usb-tablet,id=input0 -name RHEL-Server-7.0-64 -drive file=/home/guest/scalability-RHEL7.0-64.qcow2,if=none,id=hd,format=qcow2,cache=none,werror=stop,rerror=stop -device virtio-scsi-pci,id=scsi0 -device scsi-hd,drive=hd,scsi-id=0,lun=0,id=scsi_image,bootindex=1 -netdev tap,script=/etc/qemu-ifup-switch,id=netdev0 -device virtio-net-pci,netdev=netdev0,id=device-net0 -spice port=5931,disable-ticketing -vga qxl -monitor stdio

2. hotplug virtio-scsi with this script
i=1
j=0
while [ $i -lt 16388 ]
do
    j=$((i%255))
    sleep 1 

    echo "drive_add localhost file=/home/disk/disk$i.qcow2,format=qcow2,media=disk,id=scsi$i,if=none" | nc -U /tmp/monitor2
    echo "device_add scsi-hd,bus=bus1.0,drive=scsi$i,scsi-id=$j,id=hd$i" |nc -U /tmp/monitor2

    i=$(($i+1))
done

3.check disks inside guest
(qemu) info block
  
Actual results:
(qemu) drive_add localhost file=/home/disk/disk995.qcow2,format=qcow2,media=disk,id=scsi995,if=none
OK
(qemu) QEMU 1.5.2 monitor - type 'help' for more information
(qemu) device_add scsi-hd,bus=bus1.0,drive=scsi995,scsi-id=230,id=hd995
(qemu) QEMU 1.5.2 monitor - type 'help' for more information
(qemu) drive_add localhost file=/home/disk/disk996.qcow2,format=qcow2,media=disk,id=scsi996,if=none
could not open disk image /home/disk/disk996.qcow2: Too many open files
(qemu) QEMU 1.5.2 monitor - type 'help' for more information
(qemu) device_add scsi-hd,bus=bus1.0,drive=scsi996,scsi-id=231,id=hd996
Property 'scsi-hd.drive' can't find value 'scsi996'

(qemu) info block
drive-virtio-disk1: removable=0 io-status=ok file=/home/guest/scalability-RHEL7.0-64.qcow2 ro=0 drv=qcow2 encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
ide1-cd0: removable=1 locked=0 tray-open=0 io-status=ok [not inserted]
floppy0: removable=1 locked=0 tray-open=0 [not inserted]
sd0: removable=1 locked=0 tray-open=0 [not inserted]
scsi1: removable=0 io-status=ok file=/home/disk/disk1.qcow2 ro=0 drv=qcow2 encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
scsi2: removable=0 io-status=ok file=/home/disk/disk2.qcow2 ro=0 drv=qcow2 encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
...
scsi994: removable=0 io-status=ok file=/home/disk/disk994.qcow2 ro=0 drv=qcow2 encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0
scsi995: removable=0 io-status=ok file=/home/disk/disk995.qcow2 ro=0 drv=qcow2 encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0


Expected results:
can hotplug 16384 virtio scsi disk.

Additional info:

Comment 2 Xu Han 2013-08-22 03:09:23 UTC
Last week I just forgot to modify the limit on the number of open files.
Now, I have re-tested, and wouldn't hit this issue.
But in rhel7 guest, I find only 512 disks can be recognized, like weizhang hitted in Bug 841519, is it a problem?

Comment 3 Xu Han 2013-08-22 04:26:24 UTC
Forgot to say, this time I bind all luns to one target, so the maximum lun number is 512?

Comment 4 Asias He 2013-09-04 04:46:31 UTC
(In reply to xuhan from comment #3)
> Forgot to say, this time I bind all luns to one target, so the maximum lun
> number is 512?

We are supposed to support 2^14 == 16384 luns per target by virtio-scsi's design.
The largest luns per target I have ever seen is 512.

See: Bug 1000340 - linux guest can not support more than 512 luns per target

Comment 5 Xu Han 2013-09-04 07:39:21 UTC
According to comment2. This is not bug.

QE will track bz1000340 as well.


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