Managing SAN Devices and Multipathing in Oracle® Solaris 11.2

Exit Print View

Updated: December 2014
 
 

How to Configure an iSCSI Initiator

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.

  1. Enable the iSCSI initiator service.
    initiator# svcadm enable network/iscsi/initiator
  2. Verify the target's name and IP address while logged in to the server that is providing the target.
    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
  3. Configure the target to be statically discovered.
    initiator# iscsiadm add static-config iqn.1986-03.com.sun:02:73d12edc-9bb9-cb44-efc4-c3b36c123456,
    1.2.3.4
  4. Review the static configuration information.
    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.

  5. Configure one of the following target discovery methods:
    • 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
  6. Enable one of the following the target discovery methods:
    • 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
  7. Reconfigure the /dev namespace to recognize the iSCSI disk, if necessary.
    initiator# devfsadm -i iscsi