It should do this now automatically.
> idea to scan all luns of range 0-16383 at start point, but i think it
> is may be possible to do this thru report luns, such as can do sg_luns
> -s2 /dev/sd*.
After the initiator logs in, it asks the scsi layer to find scsi
devices. The scsi layer does a inquiry to LUN 0, then will do a
REPORT_LUNs command. The target then will tell is the LUNs and the scsi
layer will add them.
Note that the default max lun value iscsi_tcp supports is 512. This can
be overridden by doing using the iscsi_tcp max_lun modparam "modinfo
iscsi_tcp" for info.
modparam iscsi_tcp max_lun=whatever_value_you_want.
or you can do
echo X > /sys/module/iscsi_tcp/paramters/max_lun
before you run the login command.
Send a tcpdump/wireshark trace for when you do the iscsiadm login
command, so we can see what the target and initiator are sending.
Could you also send the /var/log/messages for when the login command is run.
I'm no specialist on the SCSI protocol, but I always thought LUNs are restricted to 0-7 (maybe 0-15). On larger storage systems I've seen "big" LUN numbers are mapped to varying targets. On HP-UX they use a pattern like
(LUN / 128), (LUN/8), LUN for "port", "bus" and "target", so this is an example:
disk 45 0/7/1/0.99.16.19.0.10.1 sdisk CLAIMED DEVICE HP HSV200
Adapter 0/7/1/0, Domain 99, Area 16, Port 19, Bus 0, Target 10, LUN 1 (LUN 81)
So "bus 0, target 10, lun 1" actually refers to "lun 81".
I don't know how Linux works there.
Regards,
Ulrich
>>> ??????? ????????<e.i.ma...@gmail.com> schrieb am 02.02.2012 um 10:53 in
Nachricht
<4de2e2fe-a256-4c0c...@a15g2000yqf.googlegroups.com>:
Yeah. I think it is a scsi spec issue/requirement.
> there the way to override this behavior and send REPORT LUNs command
> without any LUN connected (to bus/host)?
>
>
>> Note that the default max lun value iscsi_tcp supports is 512. This can
>> be overridden by doing using the iscsi_tcp max_lun modparam "modinfo
>> iscsi_tcp" for info.
>>
>> modparam iscsi_tcp max_lun=whatever_value_you_want.
>>
>> or you can do
>>
>> echo X > /sys/module/iscsi_tcp/paramters/max_lun
>>
>> before you run the login command.
>
> Seems to read only value for me.
Ah you are right. I never turned on write support through sysfs. This
has not come up very often. I will send a patch to fix it up.