Warning Livedoc is no longer being updated and will be deprecated shortly. Please refer to https://documentation.tjhsst.edu.


From Livedoc - The Documentation Repository
Revision as of 21:48, 9 August 2008 by William Yang (talk | contribs) (iscsiadm: Added how to multipath on Solaris with unknown-to-Solaris targets.)
Jump to: navigation, search

iSCSI is the protocol that allows SCSI commands to be sent over the network. In the case of the CSL, Linux servers use the open-iscsi software to connect to the storage arrays, which actually store the data. Solaris servers use the Solaris software iSCSI implementation. This data is sent over the SAN, not the production network.


Initiator - the iscsi client that access the data

Target - the iscsi server that hosts the data

Node - an initiator or target

Initiator name - a unique identifier for an iSCSI node (see Naming configuration below)

CHAP (Challenge-handshake authentication protocol) - used for authenticating iSCSI; as this is insecure, all iSCSI data should travel over a separate network, in our case, the [SAN].

LUN (Logical Unit Number) - the number assigned to a logical unit, in the case of iSCSI, the storage "partitions"


All iSCSI nodes must be given a unique identifying initiator name. This is of the form iqn.yyyy-mm.{reversed domain name}:{user defined}. iqn stands for iSCSI qualified name, and yyyy-mm is the date of the first full month for which the domain name was registered. For the CSL, our initiator names are of the form iqn.1992-03.edu.tjhsst:initiator:servername.number, for initiators, and iqn.1992-03.edu.tjhsst.csl:storage:servername, for storage servers.


This is an iSCSI authentication method. On the CSL SAN, it is currently unidirectional and not used for Send Targets.

Send Targets

This is a method for initiators to scan for LUNs on a target. It is currently the method used on the CSL SAN.

Configuration of open-iscsi


This file stores the node's initiator name. See Naming above.


This file stores the server's iSCSI global configuration. An example is given below.

node.active_cnx = 1
# attach to storage automatically when started?
node.startup = automatic
# the CHAP username
node.session.auth.username = [A CHAP username]
# the CHAP password
node.session.auth.password = [A CHAP password]
# the timeout values for an iSCSI session
node.session.timeo.replacement_timeout = 120
node.session.err_timeo.abort_timeout = 10
node.session.err_timeo.reset_timeout = 30
# other configuration
node.session.iscsi.InitialR2T = No
node.session.iscsi.ImmediateData = Yes
# network configuration
node.session.iscsi.FirstBurstLength = 262144
node.session.iscsi.MaxBurstLength = 16776192
node.session.iscsi.DefaultTime2Wait = 0
node.session.iscsi.DefaultTime2Retain = 0
node.session.iscsi.MaxConnections = 0
node.conn[0].iscsi.HeaderDigest = None
node.conn[0].iscsi.DataDigest = None
node.conn[0].iscsi.MaxRecvDataSegmentLength = 65536
# if we used CHAP for discovery
#discovery.sendtargets.auth.authmethod = CHAP
#discovery.sendtargets.auth.username = [A CHAP username]
#discovery.sendtargets.auth.password = [A CHAP password]


iscsiadm is the main open-iscsi configuration tool.

Discovering storage resources: iscsiadm -m discovery -t sendtargets -p IP address of storage gateway In our case, the storage gateway is one of the two storage IP addresses on each storage array. Logging into the storage array: iscsiadm -m node -T storage initiator -p iSCSI gateway -l

These commands only need to be done once. After they have been run, configuration files are created under /etc/iscsi/ based off of the global configuration file. If node.startup is set to automatic, then the iSCSI LUNs will be reconnected the next time open-iscsi starts.

Configuration of Solaris iSCSI


iscsiadm is used to configure the Solaris iSCSI initiator.

The iSCSI initiator name can be set using iscsiadm modify initiator-node -N [initiator name].


  • To configure the number of allowed sessions per target (for instance, if you wanted to configure multipath, but possibly could be used for other purposes, too), use iscsiadm modify initiator-node -c [number of sessions].
  • Solaris has a built-in list of known iSCSI targets that support multipath. If using a target device (such as the Promise VTrak arrays that currently comprise the primary SAN) that isn't part of this built-in list, Solaris will not use multipath with it by default. To enable multipath for these devices, edit /kernel/drv/scsi_vhci.conf. This is the example provided in the online Sun docs [1] (where ACME and XYZ are vendor IDs and MSU and ABC are product IDs):
device-type-scsi-options-list =
"ACME    MSU", "enable-option",
"XYZ     ABC", "enable-option";
enable-option = 0x1000000;

For our Promise VTraks:

device-type-scsi-options-list =
"Promise VTrak M310i", "enable-option";
enable-option = 0x1000000;
  • After editing the file, run stmsboot -u, which will require an immediate reboot.


  • To enable CHAP, run iscsiadm modify initiator-node -a chap.
  • To set the CHAP username to something other than the default, run iscsiadm modify initiator-node -H [username]. Currently, the short hostname (that is, hostname without the domain part) is used for the CHAP username.
  • To set the CHAP secret, run iscsiadm modify initiator-node -C. This will launch an interactive prompt. Note that, for whatever reason, Sun's iSCSI currently has a limit of 16 characters for the CHAP secret (minimum 12).

Send Targets

  • To enable Send Targets as a discovery method, run iscsiadm modify discovery --sendtargets enable.
  • Add target addresses to scan for LUNs using iscsiadm add discovery-address [IP address]. Add multiple IP addresses one at a time.


iscsitadm is used to configure Solaris iSCSI targets.