Purpose
Defines iSCSI
targets that will be accessed by the iSCSI software initiator.
Description
The iSCSI targets file defines the name and location of
the iSCSI targets that the iSCSI software initiator will attempt to
access. This file is read any time the iSCSI software initiator driver
is loaded.
Any line in this file that begins with "#" will be treated as a comment line and ignored.
Other non-blank lines will define a target that the iSCSI software
initiator will access. The "\" character
may be used between fields as a line continuation character in order
to make the file more readable.
The shipped version of this
file contains comments that precisely define the format of the file.
However, there are no default target names; the shipped file contains
only comments. In order to use the iSCSI software initiator, the
user must add target definitions to the file and then reload the iSCSI
driver by running cfgmgr or by rebooting
the system.
Each target is defined by three or four fields,
as follows:
HostNameOrAddress PortNumber iSCSIName
or
HostNameOrAddress PortNumber iSCSIName CHAPSecret
The fields that define the target are:
- HostNameOrAddress
- This is the TCP/IP location of the target. The location may be
specified by a TCP/IP address in dotted-decimal form, or by a host
name which can be resolved to a valid TCP/IP address. The format
for the IP Address is taken from RFC2373.
- PortNumber
- The TCP/IP port number on which the iSCSI target is listening.
The standard port number for iSCSI is 3260, but some targets may allow
customizing the port number, so this field must be specified.
- iSCSIName
- The iSCSI name of the target. This name must match the name defined
to the target. Note that the iSCSI name will be converted to contain
all lower case characters, in accordance with the iSCSI standards.
- CHAPSecret
- This optional field specifies the secret to be used by this initiator
if CHAP authentication is required. The secret is a text string enclosed
in double-quote characters. If this field is included in the target
line, the iSCSI software initiator will offer CHAP authentication
to the target, and if the target requests such authentication, this
value will be used as the secret during the authentication process.
If the CHAPSecret field is not included
in the target definition, the initiator will attempt to log in to
the target without any authentication.
Examples
- iSCSI Target without CHAP(MD5) authentication - Assume the target is at address 192.168.3.2 and the valid
port is 5003. The name of the target is iqn.com.ibm-4125-23wwt26.
The target line would look like the following:
192.168.3.2 5003 iqn.com.ibm-4125-23wwt26
- iSCSI Target with CHAP(MD5) authentication - Assume the target is at address 10.2.1.105 and the valid port
is 3260. The name of the target is iqn.com.ibm-k167-42.fc1a and the
CHAP secret is "This is my password." The target line would look
like the following:
10.2.1.105 3260 iqn.com.ibm-k167-42.fc1a "This is my password."
- iSCSI Target with CHAP(MD5) authentication and line
continuation - Assume the target is at address iscsi.fake.com
and the valid port is 3260. The name of the target is iqn.2003-01.com.ibm:00.fcd0ab21.shark128
and the CHAP secret is "123ismysecretpassword.fc1b". The target line
would look like the following:
iscsi.fake.com 3260 iqn.2003-01.com.ibm:00.fcd0ab21.shark128 \
"123ismysecretpassword.fc1b"
Files
Item |
Description |
/etc/iscsi/targets |
The iSCSI targets file. |