System Administration Guide: Devices and File Systems

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.

ProcedureHow 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).