JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
System Administration Guide: Devices and File Systems     Oracle Solaris 11 Express 11/10
search filter icon
search icon

Document Information

Preface

1.  Managing Removable Media (Overview)

2.  Managing Removable Media (Tasks)

3.  Accessing Removable Media (Tasks)

4.  Writing CDs and DVDs (Tasks)

5.  Managing Devices (Overview/Tasks)

6.  Dynamically Configuring Devices (Tasks)

7.  Using USB Devices (Overview)

8.  Using USB Devices (Tasks)

9.  Using InfiniBand Devices (Overview/Tasks)

10.  Managing Disks (Overview)

11.  Administering Disks (Tasks)

12.  SPARC: Adding a Disk (Tasks)

13.  x86: Adding a Disk (Tasks)

14.  Configuring iSCSI Storage Devices With COMSTAR

COMSTAR and iSCSI Technology (Overview)

COMSTAR Software and Hardware Requirements

Configuring COMSTAR (Task Map)

Configuring COMSTAR

COMSTAR Terminology

Configuring Dynamic or Static Target Discovery

How to Create an iSCSI LUN

How to Create the iSCSI Target

How to Configure an iSCSI Initiator

How to Access iSCSI Disks

How to Access iSCSI Disks Upon Reboot

How to Restrict LUN Access to Selected Systems

Configuring Authentication in Your iSCSI-Based Storage Network

How to Configure CHAP Authentication for Your iSCSI Initiator

How to Configure CHAP Authentication for Your iSCSI Target

Using a Third-Party RADIUS Server to Simplify CHAP Management in Your iSCSI Configuration

Solaris iSCSI and RADIUS Server Error Messages

Booting and Installing Solaris From an iSCSI LUN

Hardware and Software Requirements for iSCSI Booting

iSCSI Boot Process Overview

How to Install the Oracle Solaris Release on an iSCSI LUN

How to Boot Solaris from an iSCSI LUN (x86)

How to Boot Solaris from an iSCSI LUN (SPARC)

How to Remove Discovered iSCSI Targets

Monitoring Your iSCSI Configuration

Modifying iSCSI Initiator and Target Parameters

Tuning iSCSI Parameters

How to Modify iSCSI Initiator and Target Parameters

Troubleshooting iSCSI Configuration Problems

No Connections to the iSCSI Target From the Local System

How to Troubleshoot iSCSI Connection Problems

iSCSI Device or Disk Is Not Available on the Local System

How to Troubleshoot iSCSI Device or Disk Unavailability

Use LUN Masking When Using the iSNS Discovery Method

General iSCSI Error Messages

15.  Configuring and Managing the Solaris Internet Storage Name Service (iSNS)

16.  Managing Disk Use (Tasks)

17.  The format Utility (Reference)

18.  Managing File Systems (Overview)

19.  Creating ZFS, UFS, TMPFS, and LOFS File Systems (Tasks)

20.  Mounting and Unmounting File Systems (Tasks)

21.  Configuring Additional Swap Space (Tasks)

22.  Copying Files and File Systems (Tasks)

23.  Managing Tape Drives (Tasks)

Index

Configuring COMSTAR (Task Map)

Task
Description
For Instructions
1. Identify the COMSTAR software and hardware requirements.
Identify the software and hardware requirements for setting up an iSCSI storage network with COMSTAR .
2. Create SCSI logical units and make them available.
Enable the STMF service, create SCSI logical units, and make the logical units available.

Make a logical unit available to all hosts or specific hosts for iSCSI or iSER configurations.

5. Configure the iSCSI target.
Configure the iSCSI target for the iSCSI storage component.
6. Configure the iSCSI initiator.
Configure the system or systems that initiate SCSI requests to the iSCSI target.
7. Configure the iSCSI target discovery method.
Select the iSCSI target discovery method best suited for your environment.
8. Access the iSCSI disks.
You can access your iSCSI disks with the format utility. You can also enable the iSCSI disks to be available automatically after the system is rebooted.
9. Restrict LUN Access to Selected Systems
You might want to restrict LUN access to specific systems in the network.
10. (Optional) Set up authentication in your Solaris iSCSI configuration.
Decide whether you want to use authentication in your Solaris iSCSI configuration:
Consider using unidirectional CHAP or bidirectional CHAP.
Consider using a third-party RADIUS server to simplify CHAP management.
11. (Optional) Configure iSSCI Booting
You might want to boot and install Solaris from an iSCSI LUN
12. (Optional) Remove discovered iSCSI targets.
You might need to remove a discovered iSCSI target.
13. Monitor your iSCSI configuration.
Monitor your iSCSI configuration by using the iscsiadm command.
14. (Optional) Modify your iSCSI configuration.
You might want to modify your iSCSI target settings such as the header and data digest parameters.

Configuring COMSTAR

Configuring your Solaris iSCSI targets and initiators with COMSTAR involves the following steps:

The iSCSI configuration information is stored in the /etc/iscsi directory, but it requires no manual administration.

COMSTAR Terminology

Review the following terminology before configuring iSCSI targets and initiators.

Term
Description
Discovery
The process that presents the initiator with a list of available targets.
Discovery method
The way in which the iSCSI targets can be found. Three methods are currently available:
  • Internet Storage Name Service (iSNS) – Potential targets are discovered by interacting with one or more iSNS servers.

  • SendTargets – Potential targets are discovered by using a discovery-address.

  • Static – Static target addressing is configured.

Initiator
The driver that initiates SCSI requests to the iSCSI target.
Initiator group
A set of initiators. When an initiator group is associated with a LUN, only initiators from that group may access the LUN.
Logical Unit
A uniquely numbered component in a storage system. Also referred to as a LUN. When a LUN is associated with one or more SCSI targets, the target can be accessed by one or more SCSI initiators.
Target device
The iSCSI storage component.
Target group
A set of targets. A LUN can be made available to all targets in one specific target group.
Target portal group
A list of IP addresses that determines which interfaces a specific iSCSI target will listen to. A TPG contains IP addresses and TCP port numbers
Configuring Dynamic or Static Target Discovery

Determine whether you want to configure one of the dynamic device discovery methods or use static iSCSI initiator targets to perform device discovery.


Note - Do not configure an iSCSI target to be discovered by both static and dynamic device discovery methods. The consequence of using redundant discovery methods might be slow performance when the initiator is communicating with the iSCSI target device.


How to Create an iSCSI LUN

The disk volume provided by the server is referred to as the target. When the LUN is associated with an iSCSI target, it can be accessed by an iSCSI initiator.

The following tasks are completed on the system that is providing the storage device.

  1. Install the COMSTAR storage server software.
    target# pkg install storage-server
       Packages to install:    19
               Create boot environment:    No
                   Services to restart:     1
    DOWNLOAD                                  PKGS       FILES    XFER (MB)
    Completed                                19/19     674/674    47.9/47.9
    
    PHASE                                        ACTIONS
    Install Phase                              1386/1386 
    
    PHASE                                          ITEMS
    Package State Update Phase                     19/19 
    Image State Update Phase                         2/2 
    
    PHASE                                          ITEMS
    Reading Existing Index                           8/8 
    Indexing Packages                              19/19
    Indexing Packages                              19/19
    Optimizing Index...
  2. Enable the stmf service.
    target# svcadm enable stmf
    # svcs stmf
    STATE          STIME    FMRI
    online         09:42:32 svc:/system/stmf:default
  3. Create a ZFS storage pool.
    target# zpool create sanpool mirror c2t3d0 c2t4d0
  4. Create a ZFS volume to be used as a SCSI logical unit.
    target# zfs create -V 2g sanpool/vol1
  5. Create a LUN for the ZFS volume.
    target# stmfadm create-lu /dev/zvol/rdsk/sanpool/vol1
    Logical unit created: 600144F0C49A050000004CC84BE20001

    You can find the device path for the ZFS volume in /dev/zvol/rdsk/pool-name/.

  6. Confirm that the LUN is created.
    target# stmfadm list-lu
    LU Name: 600144F0C49A050000004CC84BE20001
  7. Add the LUN view.

    This command makes the LUN accessible to all systems.

    target# stmfadm add-view 600144F0C49A050000004CC84BE20001

    If you want to restrict the LUN view to specific systems, see How to Restrict LUN Access to Selected Systems.

  8. Verify the LUN configuration.
    target# stmfadm list-view -l 600144F0C49A050000004CC84BE20001
    View Entry: 0
        Host group   : All
        Target group : All
        LUN          : 0

How to Create the iSCSI Target

This procedure assumes that you are logged in to the local system that contains the iSCSI targets.

  1. Start the iSCSI target service.
    target# svcadm enable -r svc:/network/iscsi/target:default

    Confirm that the service is started.

    target# svcs -l iscsi/target
    fmri         svc:/network/iscsi/target:default
    name         iscsi target
    enabled      true
    state        online
    next_state   none
    state_time   Wed Oct 27 09:59:59 2010
    logfile      /var/svc/log/network-iscsi-target:default.log
    restarter    svc:/system/svc/restarter:default
    dependency   require_any/error svc:/milestone/network (online)
    dependency   require_all/none svc:/system/stmf:default (online)
  2. Create the iSCSI target.
    target# itadm create-target
    Target iqn.1986-03.com.sun:02:a4a694bc-6de2-ee50-8979-e25ba29acb86 successfully created
  3. Display the iSCSI target information.
    target# itadm list-target -v
    TARGET NAME                                                  STATE    SESSIONS 
    iqn.1986-03.com.sun:02:a4a694bc-6de2-ee50-8979-e25ba29acb86  online   0        
            alias:                  -
            auth:                   none (defaults)
            targetchapuser:         -
            targetchapsecret:       unset
            tpg-tags:               default

How to Configure an iSCSI Initiator

Part of initiator configuration process is to identify the iSCSI target discovery process, which presents an initiator with a list of available targets. You can configure iSCSI Targets for static, Send Targets, or iSNS dynamic discovery. Dynamic discovery using the Send Targets option is the optimum configuration for an iSCSI initiator that accesses a large number of targets, such over an iSCSI to Fibre Channel bridge. Send Targets dynamic discovery requires the IP address and port combination of the iSCSI target for the iSCSI initiator to be able to perform the device discovery. The most common discovery method is Send Targets.

When configuring target discovery, you will need to provide the following information:

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 into the server that is providing the target.
    target# ifconfig -a
    lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
            inet 127.0.0.1 netmask ff000000 
    e1000g0: flags=1004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4> mtu 1500 index 6
            inet 10.10.46.83 netmask ffffff00 broadcast 10.10.46.255
            ether 0:1e:68:2f:4f:62 
    lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1
            inet6 ::1/128 
    e1000g0: flags=20002004841<UP,RUNNING,MULTICAST,DHCP,IPv6> mtu 1500 index 6
            inet6 fe80::21e:68ff:fe2f:4f62/10 
            ether 0:1e:68:2f:4f:62 
    target# itadm list-target
    TARGET NAME                                                  STATE    SESSIONS 
    iqn.1986-03.com.sun:02:71561778-137f-ca37-dd31-9f833173ce6b  online   0
  3. Configure the device to be statically discovered.
    initiator# iscsiadm add static-config qn.1986-03.com.sun:02:71561778-137f-ca37-dd31-9f833173ce6b,
    10.10.46.83
  4. Review the static configuration information.
    initiator# iscsiadm list static-config
    Static Configuration Target: iqn.1986-03.com.sun:02:71561778-137f-ca37-dd31-9f833173ce6b,
    10.10.46.86:3260

    The iSCSI connection is not initiated until the discovery method is enabled. See the next step.

  5. Configure a target discovery method using one of the following:
    • If you have configured a dynamically discovered (SendTargets) device, configure the SendTargets discovery method.

      initiator# iscsiadm add discovery-address 10.10.46.83:3260
    • If you have configured a dynamically discovered (iSNS) device, configure the iSNS discovery method.

      initiator# iscsiadm add isns-server 10.10.46.82
  6. Enable the target discovery method using one of the following:
    • If you have configured a dynamically discovered (SendTargets) device, enable the SendTargets discovery method.

      initiator# iscsiadm modify discovery --sendtargets enable
    • If you have configured a dynamically discovered (iSNS) device, 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.
    initiator# devfsadm -i iscsi

How to Access iSCSI Disks

If you want to access the iSCSI disks upon reboot, create the file system on the disk, and add an /etc/vfstab entry as you would with any UFS file system on a SCSI device. Then, create a new SMF service for mounting iSCSI disks that depends on the iSCSI initiator service. For more information, see How to Access iSCSI Disks Upon Reboot.

After the devices have been discovered by the Solaris iSCSI initiator, the login negotiation occurs automatically. The Solaris iSCSI driver determines the number of available LUNs and creates the device nodes. Then, the iSCSI devices can be treated as any other SCSI device.

You can view the iSCSI disks on the local system by using the format utility.

  1. Review the iSCSI LUN information in the format output.
    initiator# format
    AVAILABLE DISK SELECTIONS:
           0. c3t0d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
              /pci@1f,700000/scsi@2/sd@0,0
           1. c3t1d0 <HITACHI-DK32EJ36NSUN36G-PQ0B-33.92GB>
              /pci@1f,700000/scsi@2/sd@1,0
           2. c3t2d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
              /pci@1f,700000/scsi@2/sd@2,0
           3. c3t3d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
              /pci@1f,700000/scsi@2/sd@3,0
           4. c13t600144F0C49A050000004CC84BE20001d0 <SUN-COMSTAR-1.0 cyl 16382 alt 2 hd 8 sec 32>
              /scsi_vhci/ssd@g600144f0c49a050000004cc84be20001

    In the above format output, disks 0–3 are local disks. Disk 4 is an iSCSI LUN under MPxIO control.

  2. You can create a ZFS storage pool and ZFS file systems on the iSCSI LUN.
    initiator# zpool create pool-name c13t600144F0C49A050000004CC84BE20001d0
    initiator# zfs create pool-name/fs-name

How to Access iSCSI Disks Upon Reboot

Follow the steps below to access iSCSI disks after the system is rebooted. This procedure assumes that you are logged into the initiator.

  1. Become an administrator.
  2. Add entries for the iSCSI LUN(s) to the /etc/vfstab file. Set the mount at boot option to iscsi.
    initiator# vi /etc/vfstab
    #device         device          mount           FS      fsck    mount   mount
    #to mount       to fsck         point           type    pass    at boot options
    #
    /dev/dsk/device-name        -       /mnt    ufs     -       iscsi      -

How to Restrict LUN Access to Selected Systems

Use this procedure to restrict logical units to selected hosts on a storage network. If you are using Fibre Channel ports, first identify the World Wide Names (WWN). Then, selectively map a logical unit number (LUN) to the ports on host-a, for example. A target group (targets-0) is also defined for a given set of target ports that export the same set of logical units to the same host group.

For information on configuring a target group, see stmfadm(1M).

  1. Become an administrator.
  2. Identify the FC port on the initiator. For example:
    initiator# fcinfo hba-port
    HBA Port WWN: 210000e08b195dae
            Port Mode: Initiator
            Port ID: 0
            OS Device Name: /dev/cfg/c8
            Manufacturer: QLogic Corp.
            Model: 375-3108-xx
            Firmware Version: 03.03.28
            FCode/BIOS Version:  fcode: 1.13;
            Serial Number: not available
            Driver Name: qlc
            Driver Version: 20100408-3.01
            Type: unknown
            State: offline
            Supported Speeds: 1Gb 2Gb 
            Current Speed: not established 
            Node WWN: 200000e08b195dae
            NPIV Not Supported
    .
    .
    .
  3. Create a host group.
    target# stmfadm create-hg host-a 210000e08b195dae 210100e08b395dae
  4. Add the WWNs identified in the above output as members to the host group.
    target# stmfadm add-hg-member -g host-a
  5. Create a target group.
    target# stmfadm create-tg targets-0
  6. Specify the target group members by adding the target names.

    Each SCSI target can be a member of only one target group.

    target# stmfadm add-tg-member -g targets-0 wwn.guid-number
  7. Identify the GUID number for the logical unit.
    target# stmfadm list-lu -v
  8. Make the logical unit available by adding a view entry, specifying the host group name and the logical unit GUID number.
    target# stmfadm add-view -h host-a -t targets-0 -n 1 guid-number

Configuring Authentication in Your iSCSI-Based Storage Network

Setting up authentication for your iSCSI devices is optional.

In a secure environment, authentication is not required because only trusted initiators can access the targets.

In a less secure environment, the target cannot determine if a connection request is truly from a given host. In that case, the target can authenticate an initiator by using the Challenge-Handshake Authentication Protocol (CHAP).

CHAP authentication uses the notion of a challenge and response, which means that the target challenges the initiator to prove its identity. For the challenge/response method to work, the target must know the initiator's secret key, and the initiator must be set up to respond to a challenge. Refer to the array vendor's documentation for instructions on setting up the secret key on the array.

iSCSI supports unidirectional and bidirectional authentication:

How to Configure CHAP Authentication for Your iSCSI Initiator

This procedure assumes that you are logged in to the local system where you want to securely access the configured iSCSI target device.

  1. Become an administrator.

    For more information, see How to Obtain Administrative Rights in System Administration Guide: Security Services.

  2. Determine whether you want to configure unidirectional or bidirectional CHAP.
    • Unidirectional authentication, the default method, enables the target to validate the initiator. Complete steps 3–5 only.

    • Bidirectional authentication adds a second level of security by enabling the initiator to authenticate the target. Complete steps 3–9.

  3. Unidirectional CHAP – Set the secret key on the initiator.

    For example, the following command initiates a dialogue to define the CHAP secret key.

    initiator# iscsiadm modify initiator-node --CHAP-secret

    Note - The CHAP secret length must be a minimum of 12 characters and a maximum of 16 characters.


  4. (Optional) Unidirectional CHAP – Set the CHAP name on the initiator.

    By default, the initiator's CHAP name is set to the initiator node name.

    You can use the following command to change the initiator's CHAP name.

    initiator# iscsiadm modify initiator-node --CHAP-name new-CHAP-name

    In the Solaris environment, the CHAP name is always set to the initiator node name by default. The CHAP name can be set to any length text that is less than 512 bytes. The 512-byte length limit is a Solaris limitation. However, if you do not set the CHAP name, it is set to the initiator node name upon initialization.

  5. Unidirectional CHAP – Enable CHAP authentication on the initiator after the secret has been set.
    initiator# iscsiadm modify initiator-node --authentication CHAP

    CHAP requires that the initiator node have both a user name and a password. The user name is typically used by the target to look up the secret for the given username.

  6. Select one of the following to enable or disable Bidirectional CHAP.
    • Bidirectional CHAP – Enable bidirectional authentication parameters.

      For example:

      initiator# iscsiadm modify target-param -B enable target-iqn
    • Disable bidirectional CHAP. For example:

      initiator# iscsiadm modify target-param -B disable target-iqn
  7. Bidirectional CHAP – Set the authentication method to CHAP.

    For example:

    initiator# iscsiadm modify target-param --authentication CHAP target-iqn
  8. Bidirectional CHAP – Set the target device secret key.

    For example, the following command initiates a dialogue to define the CHAP secret key:

    initiator# iscsiadm modify target-param --CHAP-secret target-iqn
  9. Bidirectional CHAP - Set the CHAP name.

    By default, the target's CHAP name is set to the target name.

    You can use the following command to change the target's CHAP name:

    initiator# iscsiadm modify target-param --CHAP-name target-CHAP-name

How to Configure CHAP Authentication for Your iSCSI Target

This procedure assumes that you are logged in to the local system that contains the iSCSI targets.

  1. Become an administrator.
  2. Determine whether you want to configure unidirectional or bidirectional CHAP.
    • Unidirectional authentication is the default method, complete steps 3-5 only.

    • Bidirectional authentication, complete steps 3-7.

  3. Unidirectional/Bidirectional CHAP: Create an initiator-context that describes the initiator.

    Create the initiator context with the initiator's full node name and with the initiator CHAP secret.

    target# itadm modify-target -a chap target-iqn
  4. Unidirectional/Bidirectional CHAP: Create an initiator-context that describes the initiator.

    Create the initiator context with the initiator's full node name and with the initiator CHAP secret.

    target# itadm create-initiator -s initiator-iqn
    Enter CHAP secret: *********
    Re-enter secret: *********
  5. Unidirectional/Bidirectional CHAP: If the initiator uses an alternate CHAP name, then configure the initiator-context with the alternate name.
    target# itadm modify-initiator -u initiator-CHAP-name initiator-iqn
  6. Bidirectional CHAP: Set the target device secret key that identifies this target.
    target# itadm modify-target -s target-iqn
    Enter CHAP secret: *********
    Re-enter secret: *********
  7. Bidirectional CHAP: (Optional) If the target uses an alternate target CHAP name other than the target node name (iqn), modify the target.
    target# itadm modify-target -u target-CHAP-name target-iqn
Using a Third-Party RADIUS Server to Simplify CHAP Management in Your iSCSI Configuration

You can use a third-party RADIUS server to simplify CHAP secret management. A RADIUS server is a centralized authentication service. While you must still specify the initiator's CHAP secret, you are no longer required to specify each target's CHAP secret on each initiator when using bidirectional authentication with a RADIUS server.

For more information, see:

How to Configure RADIUS for Your iSCSI Configuration

This procedure assumes that you are logged in to the local system where you want to securely access the configured iSCSI target device.

  1. Become superuser.
  2. Configure the initiator node with the IP address and port (the default port is 1812) of the RADIUS server.

    For example:

    initiator# iscsiadm modify initiator-node --radius-server 10.0.0.72:1812
  3. Configure the initiator node with the shared secret of the RADIUS server.
    initiator# iscsiadm modify initiator-node --radius-shared-secret

    Note - The Solaris iSCSI implementation requires that the RADIUS server is configured with a shared secret before the Solaris iSCSI software can interact with the RADIUS server.


  4. Enable the RADIUS server.
    initiator# iscsiadm modify initiator-node --radius-access enable
Solaris iSCSI and RADIUS Server Error Messages

This section describes the error messages that are related to a Solaris iSCSI and RADIUS server configuration, along with potential solutions for recovery.

empty RADIUS shared secret

Cause: The RADIUS server is enabled on the initiator, but the RADIUS shared secret is not set.

Solution: Configure the initiator with the RADIUS shared secret. For more information, see How to Configure RADIUS for Your iSCSI Configuration.

WARNING: RADIUS packet authentication failed

Cause: The initiator failed to authenticate the RADIUS data packet. This error can occur if the shared secret configured on the initiator node is different from the shared secret on the RADIUS server.

Reconfigure the initiator with the correct RADIUS shared secret. For more information, see How to Configure RADIUS for Your iSCSI Configuration.

Booting and Installing Solaris From an iSCSI LUN

Hardware and Software Requirements for iSCSI Booting

The iSCSI boot requirements are as follows:

iSCSI Boot Process Overview

The general process for booting and installing Solaris from an iSCSI LUN is as follows:

How to Install the Oracle Solaris Release on an iSCSI LUN

  1. Select the installation method.
    • LiveCD

    • Text installation

    • Automated installation

    The steps below include the selected installation method so be sure that you follow the instructions for the selected installation method. For example, in steps 3, 4, or 5, you configure the iSCSI LUN based on the selected installation method.

  2. Automated Installation — Follow these steps to automatically install a system with an iSCSI device.
    1. Confirm that the iSCSI LUN is available and accessible.
    2. Configure iSCSI device information in DHCP, if necessary.

      Add the following keywords to the installation manifest to identify that the iSCSI target information is provided by DHCP.

      <target_device_iscsi_parameter_source>DHCP</target_device_iscsi_parameter_source>
    3. Add the target-device keywords to the installation manifest to identify the following information:
      • target_device_iscsi_target_name

      • target_device_iscsi_target_ip

      • target_device_iscsi_target_port

      • target_device_iscsi_target_lun

    4. Disable the NWAM service.

      Starting in b144 and higher, the var/ai/<port_number>/AI_data/default.xml file contains the following section to enable the NWAM service:

      <service name="network/physical" version="1" type="service">
              <instance name="nwam" enabled="true"/>
              <instance name="default" enabled="false"/></service>

      You can determine the port-number value in the following way:

      # installadm list -n <install_service>

      Modify the default.xml manifest to disable NWAM as follows:

      <instance name="nwam" enabled="false"/>
      <instance name="default" enabled="true"/>
    5. Start the installation by booting the installation client from the network.
  3. LiveCD — Follow these steps to install a system with an iSCSI device from the LiveCD.
    1. Configure the iSCSI device to be dynamically discovered in a terminal window before the installation.
      # iscsiadm add discovery-address iscsi-target-ip
    2. Enable the iSCSI discovery method.
      # iscsiadm modify discovery -t enable
    3. Confirm that the iSCSI LUN is available.
      # iscsiadm list target -S
    4. Start the LiveCD installation.
    5. Select the disk with the device name that matches the iSCSI UUID.

      Then, continue the installation.

    6. Disable the NWAM service after the installation is complete.

      From a terminal or shell window, manually mount the new boot environment, edit the network service configuration, and unmount the BE prior to booting as follows:

      # beadm mount solaris /a
      # svccfg
      svc:> repository /a/etc/svc/repository.db
      svc:> select nwam
      svc:/network/physical/nwam:> setprop general/enabled=false
      svc:/network/physical/nwam:> unselect
      svc:/network/physical> select network/physical:default
      svc:/network/physical:default> setprop general/enabled=true
      svc:/network/physical:default> unselect
      svc:/network/physical> exit
      
      # beadm umount solaris
      # init 6
  4. Text installation — Follow these steps to install a system with an iSCSI device by using the text installation.
    1. Start the text installation and select option 3 – Shell to open a shell window.
    2. Configure the iSCSI device to be dynamically discovered from the shell window.
      # iscsiadm add discovery-address iscsi-target-ip
    3. Enable the iSCSI discovery method.
      # iscsiadm modify discovery -t enable
    4. Confirm that the iSCSI LUN is available.
      # iscsiadm list target -S
    5. From the shell window, type text-install to restart the text installation.
    6. Select the iSCSI disk that is visible in the Type (iSCSI) column.

      Then, continue the installation.

    7. Disable the NWAM service after the installation is complete.

      From a terminal or shell window, manually mount the new boot environment, edit the network service configuration, and unmount the BE prior to booting as follows:

      # beadm mount solaris /a
      # svccfg
      svc:> repository /a/etc/svc/repository.db
      svc:> select nwam
      svc:/network/physical/nwam:> setprop general/enabled=false
      svc:/network/physical/nwam:> unselect
      svc:/network/physical> select network/physical:default
      svc:/network/physical:default> setprop general/enabled=true
      svc:/network/physical:default> unselect
      svc:/network/physical> exit
      
      # beadm umount solaris
      # init 6

How to Boot Solaris from an iSCSI LUN (x86)

  1. Configure the iSCSI parameters in the NIC firmware.

    For example, configure an Intel NIC as follows:

    1. Press Control + D to configure the firmware.
    2. Press Return at the iSCSI Port Selection. How do you select this?
    3. Select the iSCSI Boot Configuration option.
    4. At the iSCSI Boot Configuration screen, input the required ISCSI initiator and target information, such as the Initiator Name, Target Name, Target IP, Target Port and Boot LUN.
    5. Save changes and exit.
  2. Configure the NIC as the first boot device in the system's BIOS.

    From the system setup menu, select the NIC as the first device for the Boot Drive Order option.

  3. Boot the system.

    If successful, you will see adapter initialization messages and then the iSCSI target IP address information. Next, you will see the Oracle Solaris 11 GRUB menu.

How to Boot Solaris from an iSCSI LUN (SPARC)

The system stops at the ok prompt after the system installation is complete. You must manually enter the required iSCSI boot information to boot the system. This is CR 6945884.

  1. At the PROM prompt, enter the following boot net command.

    For example, configure an Intel NIC as follows:

    boot net:iscsi-target-IP=target-IP,
    iscsi-target-name=target-name,
    host-ip=host-ip
    [,router-ip=router-ip]
    [,subnet-mask=mask-ip]
    [,iscsi-port=dest-port]
    [,iscsi-lun=lun]
    [,iscsi-partition=partition]

    For example:

    ok boot net:iscsi-target-ip=10.13.21.227,iscsi-target-name=iqn.1986-03.com.sun
    :02:zhaobing,host-ip=10.13.49.129,iscsi-lun=0,router-ip=10.13.149.1
  2. Configure the NIC as the first boot device in the system's BIOS.

    From the system setup menu, select the NIC as the first device for the Boot Drive Order option.

  3. Boot the system.

    If successful, you will see adapter initialization messages and then the iSCSI target IP address information. Next, you will see the Oracle Solaris 11 GRUB menu.

How to Remove Discovered iSCSI Targets

After removing a discovery address, iSNS server, or static configuration, or after disabling a discovery method, the associated targets are logged out. If these associated targets are still in use, for example, they have mounted file systems, the logout of these devices will fail, and they will remain on the active target list.

This optional procedure assumes that you are logged in to the local system where access to an iSCSI target device has already been configured.

  1. Become superuser.
  2. (Optional) Disable an iSCSI target discovery method using one of the following:
    • If you need to disable the SendTargets discovery method, use the following command:

      initiator# iscsiadm modify discovery --sendtargets disable
    • If you need to disable the iSNS discovery method, use the following command:

      initiator# iscsiadm modify discovery --iSNS disable
    • If you need to disable the static target discovery method, use the following command:

      initiator# iscsiadm modify discovery --static disable
  3. Remove an iSCSI device discovery entry using one of the following:
    • Remove an iSCSI SendTargets discovery entry.

      For example:

      initiator# iscsiadm remove discovery-address 10.0.0.1:3260
    • Remove an iSCSI iSNS discovery entry.

      For example:

      # iscsiadm remove isns-server 10.0.0.1:3205
    • Remove a static iSCSI discovery entry.

      For example:

      initiator# iscsiadm remove static-config eui.5000ABCD78945E2B,10.0.0.1

    Note - If you attempt to disable or remove a discovery entry that has an associated logical unit in use, the disable or remove operation fails with the following message:

    logical unit in use

    If this errors occurs, stop all associated I/O on the logical unit, unmount the file systems, and so on. Then, repeat the disable or remove operation.


  4. Remove the iSCSI target device.

    For example:

    initiator# itadm delete-target target-IQN

Monitoring Your iSCSI Configuration

You can display information about the iSCSI initiator and target devices by using the iscsiadm list command.

  1. Become superuser.
  2. Display information about the iSCSI initiator.

    For example:

    # iscsiadm list initiator-node
    Initiator node name: iqn.1986-03.com.sun:01:0003ba4d233b.425c293c
    Initiator node alias: zzr1200
            Login Parameters (Default/Configured):
                    Header Digest: NONE/-
                    Data Digest: NONE/-
            Authentication Type: NONE
            RADIUS Server: NONE
            RADIUS access: unknown
            Configured Sessions: 1
  3. Display information about which discovery methods are in use.

    For example:

    # iscsiadm list discovery
    Discovery:
        Static: enabled
        Send Targets: enabled
        iSNS: enabled

Example 14-1 Displaying iSCSI Target Information

The following example shows how to display the parameter settings for a specific iSCSI target.

# iscsiadm list target-param iqn.1992-08.com.abcstorage:sn.33592219
        Target: iqn.1992-08.com.abcstorage:sn.33592219

The iscsiadm list target-param -v command displays the following information:

The iscsiadm list target-param -v command displays the default parameter value before the / designator and the configured parameter value after the / designator. If you have not configured any parameters, the configured parameter value displays as a hyphen (-). For more information, see the following examples.

# iscsiadm list target-param -v eui.50060e8004275511 Target: eui.50060e8004275511
        Alias: -
        Bi-directional Authentication: disabled
        Authentication Type: NONE
        Login Parameters (Default/Configured):
                Data Sequence In Order: yes/-
                Data PDU In Order: yes/-
                Default Time To Retain: 20/-
                Default Time To Wait: 2/-
                Error Recovery Level: 0/-
                First Burst Length: 65536/-
                Immediate Data: yes/-
                Initial Ready To Transfer (R2T): yes/-
                Max Burst Length: 262144/-
                Max Outstanding R2T: 1/-
                Max Receive Data Segment Length: 65536/-
                Max Connections: 1/-
                Header Digest: NONE/-
                Data Digest: NONE/-
        Configured Sessions: 1

The following example output displays the parameters that were negotiated between the target and the initiator.

# iscsiadm list target -v eui.50060e8004275511
Target: eui.50060e8004275511
        TPGT: 1
        ISID: 4000002a0000
        Connections: 1
                CID: 0
                  IP address (Local): 172.90.101.71:32813
                  IP address (Peer): 172.90.101.40:3260
                  Discovery Method: Static
                  Login Parameters (Negotiated):
                        Data Sequence In Order: yes
                        Data PDU In Order: yes
                        Default Time To Retain: 0
                        Default Time To Wait: 3
                        Error Recovery Level: 0
                        First Burst Length: 65536
                        Immediate Data: yes
                        Initial Ready To Transfer (R2T): yes
                        Max Burst Length: 262144
                        Max Outstanding R2T: 1
                        Max Receive Data Segment Length: 65536
                        Max Connections: 1
                        Header Digest: NONE
                        Data Digest: NONE

Modifying iSCSI Initiator and Target Parameters

You can modify parameters on both the iSCSI initiator and the iSCSI target device. However, the only parameters that can be modified on the iSCSI initiator are the following:

The iSCSI driver provides default values for the iSCSI initiator and iSCSI target device parameters. If you modify the parameters of the iSCSI initiator, the modified parameters are inherited by the iSCSI target device, unless the iSCSI target device already has different values.


Caution

Caution - Ensure that the target software supports the parameter to be modified. Otherwise, you might be unable to log in to the iSCSI target device. See your array documentation for a list of supported parameters.


Modifying iSCSI parameters should be done when I/O between the initiator and the target is complete. The iSCSI driver reconnects the session after the changes are made by using the iscsiadm modify command.

Tuning iSCSI Parameters

You can tune the timeout length for iSCSI connections with the iscsiadm modify -T command. These tunable parameters apply to the active connection, and change the behavior of the iSCSI initiator and the targets that connect to the initiator. The ability to dynamically tune parameters provides flexibility when configuring your iSCSI initiators.

You can tune the following iSCSI parameters.

Table 14-1 iSCSI Tunable Parameters

Parameter Name
Description
Valid Values (seconds)
Default Value (seconds)
recv-login-rsp-timeout
Session login response time - Specifies how long an iSCSI initiator waits for the response of an iSCSI session login request from the given iSCSI target.
0 - 3600
60
conn-login-max
Maximum connection retry time - Determines the maximum iSCSI initiator connection retry time, after the iSCSI initiator to target IO times out or the connection fails.
0 - 3600
180
polling-login-delay
Login retry time interval - Determines the time interval between each iSCSI session login retry, after the iSCSI initiator to target IO times out or the connection fails.
0 - 3600
60

How to Tune iSCSI Parameters

  1. Display all tunable iSCSI parameters.
    # iscsiadm list initiator-node
    # iscsiadm list target-param [target-name]

    For example:

    # iscsiadm list initiator-node
  2. Tune an iSCSI parameter.
    # iscsiadm modify target-param -T tunable-prop=value target-name

    For example, to set the maximum connection retry time to 90 seconds, use syntax similar to the following:

    # iscsiadm modify initiator-node -T conn-login-max=90

How to Modify iSCSI Initiator and Target Parameters

The first part of this procedure illustrates how modified parameters of the iSCSI initiator are inherited by the iSCSI target device. The second part of this procedure shows how to actually modify parameters on the iSCSI target device.

This optional procedure assumes that you are logged in to the local system where access to an iSCSI target device has already been configured.

  1. Become superuser.
  2. List the current parameters of the iSCSI initiator and target device.
    1. List the current parameters of the iSCSI initiator. For example:
      initiator# iscsiadm list initiator-node
      Initiator node name: iqn.1986-03.com.sun:01:0003ba4d233b.425c293c
      Initiator node alias: zzr1200
              Login Parameters (Default/Configured):
                      Header Digest: NONE/-
                      Data Digest: NONE/-
              Authentication Type: NONE
              RADIUS Server: NONE
              RADIUS access: unknown
              Configured Sessions: 1
    2. List the current parameters of the iSCSI target device. For example:
      initiator# iscsiadm list target-param -v iqn.1992-08.com.abcstorage:sn.84186266
      Target: iqn.1992-08.com.abcstorage:sn.84186266
              Alias: -
              Bi-directional Authentication: disabled
              Authentication Type: NONE
              Login Parameters (Default/Configured):
                      Data Sequence In Order: yes/-
                      Data PDU In Order: yes/-
                      Default Time To Retain: 20/-
                      Default Time To Wait: 2/-
                      Error Recovery Level: 0/-
                      First Burst Length: 65536/-
                      Immediate Data: yes/-
                      Initial Ready To Transfer (R2T): yes/-
                      Max Burst Length: 262144/-
                      Max Outstanding R2T: 1/-
                      Max Receive Data Segment Length: 65536/-
                      Max Connections: 1/-
                      Header Digest: NONE/-
                      Data Digest: NONE/-
               Configured Sessions: 1

      Note that both header digest and data digest parameters are currently set to NONE for both the iSCSI initiator and the iSCSI target device.

      To review the default parameters of the iSCSI target device, see the iscsiadm list target-param output in Example 14-1.

  3. Modify the parameter of the iSCSI initiator.

    For example, set the header digest to CRC32.

    initiator# iscsiadm modify initiator-node -h CRC32

    If you change the initiator node name, the targets that were discovered by iSNS might be logged out and removed from the initiator's target list, if the new name does not belong to the same discovery domain as that of the targets. However, if the targets are in use, they are not removed. For example, if a file is open or a file system is mounted on these targets, the targets will not removed.

    You might also see new targets after the name change if these targets and the new initiator node name belong to the same discovery domain.

  4. Verify that the parameter was modified.
    1. Display the updated parameter information for the iSCSI initiator. For example:
      initiator# iscsiadm list initiator-node
      Initiator node name: iqn.1986-03.com.sun:01:0003ba4d233b.425c293c
      Initiator node alias: zzr1200
              Login Parameters (Default/Configured):
                      Header Digest: NONE/CRC32
                      Data Digest: NONE/-
              Authentication Type: NONE
              RADIUS Server: NONE
              RADIUS access: unknown
              Configured Sessions: 1

      Note that the header digest is now set to CRC32.

    2. Display the updated parameter information for the iSCSI target device. For example:
      initiator# iscsiadm list target-param -v iqn.1992-08.com.abcstorage:sn.84186266
      Target: iqn.1992-08.com.abcstorage:sn.84186266
              Alias: -
              Bi-directional Authentication: disabled
              Authentication Type: NONE
              Login Parameters (Default/Configured):
                      Data Sequence In Order: yes/-
                      Data PDU In Order: yes/-
                      Default Time To Retain: 20/-
                      Default Time To Wait: 2/-
                      Error Recovery Level: 0/-
                      First Burst Length: 65536/-
                      Immediate Data: yes/-
                      Initial Ready To Transfer (R2T): yes/-
                      Max Burst Length: 262144/-
                      Max Outstanding R2T: 1/-
                      Max Receive Data Segment Length: 65536/-
                      Max Connections: 1/-
                      Header Digest: CRC32/-
                      Data Digest: NONE/-
              Configured Sessions: 1

      Note that the header digest is now set to CRC32.

  5. Verify that the iSCSI initiator has reconnected to the iSCSI target. For example:
    initiator# iscsiadm list target -v iqn.1992-08.com.abcstorage:sn.84186266
    Target: iqn.1992-08.com.abcstorage:sn.84186266
            TPGT: 2
            ISID: 4000002a0000
            Connections: 1
                    CID: 0
                      IP address (Local): nnn.nn.nn.nnn:64369
                      IP address (Peer): nnn.nn.nn.nnn:3260
                      Discovery Method: SendTargets
                      Login Parameters (Negotiated):
                            .
                            .
                            .
                            Header Digest: CRC32
                            Data Digest: NONE 
  6. (Optional) Unset an iSCSI initiator parameter or an iSCSI target device parameter.

    You can unset a parameter by setting it back to its default setting by using the iscsiadm modify command. Or, you can use the iscsiadm remove command to reset all target properties to the default settings.

    The iscsiadm modify target-param command changes only the parameters that are specified on the command line.

    The following example shows how to reset the header digest to NONE:

    initiator# iscsiadm modify target-param -h none iqn.1992-08.com.abcstorage:sn...

    For information about the iscsiadm remove target-param command, see iscsiadm(1M).