NAME
iscsi.conf —
ISCSI daemon configuration
file
DESCRIPTION
The iscsid(8) daemon implements the Internet Small Computer Systems Interface as described in RFC 3720.
The iscsi.conf configuration file is
divided into the following main sections:
- Macros
- Definitions of variables that can be used later, simplifying the configuration file.
- Global configuration
- Global settings for iscsid(8).
- Target configuration
- Target-specific parameters.
With the exception of macros, the sections should be grouped and
appear in iscsi.conf in the order shown above.
The current line can be extended over multiple lines using a backslash (‘\’). Comments can be put anywhere in the file using a hash mark (‘#’), and extend to the end of the current line. Care should be taken when commenting out multi-line text: the comment is effective until the end of the entire block.
Argument names not beginning with a letter, digit, or underscore must be quoted.
Additional configuration files can be included with the
include keyword, for example:
include "/etc/iscsi-target.conf"
Macros
A macro is defined with a command of the form
name=value. The macro
name can contain letters, digits, and underscores and
cannot be a reserved word (for example, target or
port). Within unquoted arguments, the string
$name is later expanded to
value.
For example:
target1="1.2.3.4"
target "disk1" {
targetaddr $target1
}
Global configuration
There are a few settings that affect the operation of the iscsid(8) daemon globally.
isid(oui|en|rand) base qual- The Initiator Session ID
isidspecifies the initiator part of the Session Identifier. It is set during startup of iscsid(8) and is used for session reinstatement. By default a randomisidis generated on startup. The randomrandform has a 24-bit random number as base and a 16-bit qual qualifier. Theouiformat uses a 22-bit base OUI and a 24-bit qual qualifier. The IANA enterprise number formatenuses the 24-bit enterprise number in base and a 16-bit qual qualifier.
Target configuration
iscsid(8) establishes TCP connections to iSCSI targets. Each target is specified by a target section, which allows properties to be set specifically for that target:
target disk1 {
targetaddr 10.0.0.2
targetname "iqn.1994-04.org.netbsd.iscsi-target:target:0"
}
There are several target properties:
- [
disabled|enabled] - No session will be established to the target if
disabledis set. The default value isenabled. - [
discovery|normal] - Define the type of session that will be established. It is possible to
initiate a special
discoverysession to a target to enumerate the available volumes. initiatoraddraddr [inet|inet6]- When iscsid(8) initiates
the TCP connection to the target system, it normally does not bind to a
specific IP address and port. If an
initiatoraddris given, it binds to this address first. initiatornamestring- Specify the
initiatornameused to connect to the remote target. Theinitiatornamecan be used to restrict access to a target. If not given, iscsid(8) will use iqn.1995-11.org.openbsd.iscsid as default. targetaddraddr [inet|inet6] [portnum]- Define the target IP address which iscsid(8) should connect to. By default port 3260 will be used.
targetnamestring- The
targetnamespecifies which LUN or disk should be requested by iscsid(8). It is possible to enumerate remote systems with adiscoverysession.
FILES
- /etc/iscsi.conf
- iscsid(8) configuration file.
SEE ALSO
HISTORY
The iscsi.conf file format first appeared
in OpenBSD 4.9.