| ISCSI.CONF(5) | File Formats Manual | ISCSI.CONF(5) |
iscsi.conf — ISCSI
daemon configuration file
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:
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"
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
}
There are a few settings that affect the operation of the iscsid(8) daemon globally.
isid
(oui|en|rand)
base qualisid specifies the
initiator part of the Session Identifier. It is set during startup of
iscsid(8) and is used for session reinstatement. By
default a random isid is generated on startup. The
random rand form has a 24-bit random number as
base and a 16-bit qual
qualifier. The oui format uses a 22-bit
base OUI and a 24-bit qual
qualifier. The IANA enterprise number format en
uses the 24-bit enterprise number in base and a
16-bit qual qualifier.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]disabled is set. The default value is
enabled.discovery|normal]discovery session to a target
to enumerate the available volumes.initiatoraddr
addr
[inet|inet6]initiatoraddr is given, it binds to
this address first.initiatorname
stringinitiatorname used to connect to the
remote target. The initiatorname can be used to
restrict access to a target. If not given, iscsid(8)
will use
iqn.1995-11.org.openbsd.iscsid
as default.targetaddr
addr
[inet|inet6]
[port num]targetname
stringtargetname specifies which LUN or disk should
be requested by iscsid(8). It is possible to enumerate
remote systems with a discovery session.The iscsi.conf file format first appeared
in OpenBSD 4.9.
| July 8, 2025 | Debian |