Part of the initiator configuration process is to identify the iSCSI target discovery method, which presents an initiator with a list of available targets. You can configure iSCSI targets for static, SendTargets, or iSNS dynamic discovery. Dynamic discovery using the SendTargets option is the optimum configuration for an iSCSI initiator that accesses a large number of targets, such over an iSCSI to Fibre Channel bridge. SendTargets dynamic discovery requires the IP address and port combination of the iSCSI target for the iSCSI initiator to perform the target discovery. The most common discovery method is SendTargets.
When configuring the target discovery method, you must provide the following information, depending on which method you choose:
SendTargets – Target IP address
iSNS – iSNS server address
Static – Target IP address and target name
For more information about configuring target discovery methods, see Configuring Dynamic or Static Target Discovery.
initiator# svcadm enable network/iscsi/initiator
target# ipadm show-addr ADDROBJ TYPE STATE ADDR lo0/v4 static ok 127.0.0.1/8 e1000g0/_b dhcp ok 1.2.3.4/24 lo0/v6 static ok ::1/128 e1000g0/_a addrconf ok fe80::123:1234:fe27:360c/10 target# itadm list-target -v TARGET NAME STATE SESSIONS iqn.1986-03.com.sun:02:73d12edc-9bb9-cb44-efc4-c3b36c123456 online 0 alias: - auth: none (defaults) targetchapuser: - targetchapsecret: unset tpg-tags: default
initiator# iscsiadm add static-config iqn.1986-03.com.sun:02:73d12edc-9bb9-cb44-efc4-c3b36c123456, 1.2.3.4
initiator# iscsiadm list static-config Static Configuration Target: iqn.1986-03.com.sun:02:73d12edc-9bb9-cb44-efc4-c3b36c123456, 1.2.3.4:3260
The iSCSI connection is not initiated until the discovery method is enabled. See the next step.
If you have configured a dynamically discovered (SendTargets) target, configure the SendTargets discovery method.
initiator# iscsiadm add discovery-address 1.2.3.4
If you have configured a dynamically discovered (iSNS) target, configure the iSNS discovery method.
initiator# iscsiadm add isns-server 1.2.3.4
If you have configured a dynamically discovered (SendTargets) target, enable the SendTargets discovery method.
initiator# iscsiadm modify discovery --sendtargets enable
If you have configured a dynamically discovered (iSNS) target, enable the iSNS discovery method.
initiator# iscsiadm modify discovery --iSNS enable
If you have configured static targets, enable the static target discovery method.
initiator# iscsiadm modify discovery --static enable
initiator# devfsadm -i iscsi