Installation guide

Scanning iSCSI Interconnects
137
However, if the targets do not send an iSCSI async event, you need to manually scan them using the
iscsiadm utility. Before doing so, however, you need to first retrieve the proper --targetname and
the --portal values. If your device model supports only a single logical unit and portal per target,
use iscsiadm to issue a sendtargets command to the host, as in:
iscsiadm -m discovery -t sendtargets -p target_IP:port
3
The output will appear in the following format:
target_IP:port,target_portal_group_tag proper_target_name
For example, on a target with a proper_target_name of
iqn.1992-08.com.netapp:sn.33615311 and a target_IP:port of 10.15.85.19:3260, the
output may appear as:
10.15.84.19:3260,2 iqn.1992-08.com.netapp:sn.33615311
10.15.85.19:3260,3 iqn.1992-08.com.netapp:sn.33615311
In this example, the target has two portals, each using target_ip:ports of 10.15.84.19:3260
and 10.15.85.19:3260.
To see which iface configuration will be used for each session, add the -P 1 option. This option will
print also session information in tree format, as in:
Target: proper_target_name
Portal: target_IP:port,target_portal_group_tag
Iface Name: iface_name
For example, with iscsiadm -m discovery -t sendtargets -p 10.15.85.19:3260 -P 1,
the output may appear as:
Target: iqn.1992-08.com.netapp:sn.33615311
Portal: 10.15.84.19:3260,2
Iface Name: iface2
Portal: 10.15.85.19:3260,3
Iface Name: iface2
This means that the target iqn.1992-08.com.netapp:sn.33615311 will use iface2 as its
iface configuration.
With some device models (e.g. from EMC and Netapp), however, a single target may have multiple
logical units and/or portals. In this case, issue a sendtargets command to the host first to find new
portals on the target. Then, rescan the existing sessions using:
iscsiadm -m session --rescan
You can also rescan a specific session by specifying the session's SID value, as in:
iscsiadm -m session -r SID --rescan
6
6
For information on how to retrieve a session's SID value, refer to Section 21.2.1, “iSCSI API”.