Bug 802253 - tgtd fails to present more than 255 LUs to single target
tgtd fails to present more than 255 LUs to single target
Status: VERIFIED
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: scsi-target-utils (Show other bugs)
6.3
Unspecified Unspecified
unspecified Severity medium
: rc
: ---
Assigned To: Andy Grover
Bruno Goncalves
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-12 04:27 EDT by Bruno Goncalves
Modified: 2017-01-09 10:36 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
setup 512 LUs (2.03 KB, application/x-shellscript)
2012-03-12 04:27 EDT, Bruno Goncalves
no flags Details

  None (edit)
Description Bruno Goncalves 2012-03-12 04:27:49 EDT
Created attachment 569299 [details]
setup 512 LUs

Description of problem:
When creating more than 255 LU for a single target only 255 are presented to initiator.

When creating the LUs no error is reported.

Version-Release number of selected component (if applicable):
scsi-target-utils-1.0.14-4.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Run the attached script to create 512 LUs (tgtd.sh)
2. iscsiadm -m discovery -p localhost -t st
3. iscsiadm -m node -l
4. iscsiadm -m session -P3 | grep sd | wc
  
Actual results:
Only 255 devices are shown

Expected results:
Should be able to login to all 512 devices


Additional information:
/var/log/messages shows the following error:
host 5 channel 0 id 0 lun16640 has a LUN larger than allowed by the host adapter

tgt-admin -s shows LUN information correctly.
        LUN: 512
            Type: disk
            SCSI ID: 512
            SCSI SN: 512
Comment 1 Mike Christie 2012-03-13 18:30:36 EDT
It seems tgtd is not sending the lun info how scsi-ml likes it. You can simpify this by just doing a target like this:

<target iqn.2008-09.com.tgtd.meanminna>
    <backing-store /tmp/loop-disk-1-1>
        scsi_sn 512
        scsi_id 512
        lun 512
    </backing-store>
</target>

remember for iscsi_tcp to increase the max_lun

modprobe iscsi_tcp max_lun=513
Comment 2 RHEL Product and Program Management 2012-05-03 01:44:23 EDT
Since RHEL 6.3 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.
Comment 3 Bruno Goncalves 2013-08-27 15:24:07 EDT
Verified fix on 2.6.32-397.el6.x86_64.

iscsiadm -m discovery -p localhost -t st
[  OK  ] iscsid: [  OK  ]
[::1]:3260,1 iqn.2009-10.com.redhat:storage-1

iscsiadm -m node -l
Logging in to [iface: default, target: iqn.2009-10.com.redhat:storage-1, portal: ::1,3260] (multiple)
Login to [iface: default, target: iqn.2009-10.com.redhat:storage-1, portal: ::1,3260] successful.

iscsiadm -m session -P3 | grep sd | wc
    512    3072   21992

cat /sys/module/iscsi_tcp/parameters/max_lun 
4294967295

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