ISCSI.CONF(5)

NAME
iscsi.conf - ISCSI daemon configuration file

DESCRIPTION
The iscsid(8) daemon implements the Internet Small Computer Systems Interface as described in RFC 3720.

SECTIONS
The iscsi.conf configuration file is divided into three main sections:

Macros
    User-defined variables may be defined and 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
Macros can be defined that will later be expanded in context. Macro names must start with a letter, digit, or underscore, and may contain any of those characters. Macro names may not be reserved words (for example, target, or port). Macros are not expanded inside quotes.

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 isid 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.

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 disabled is set. The default value is enabled.

[discovery|normal]
    Define the type of session that will be established. It is possible to initiate a special discovery session to a target to enumerate the available volumes.

    initiatoraddr addr [inet|inet6] [port num] 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 initiatoraddr is given, it binds to this address first.

initiatorname string
    Specify the initiatorname 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] Define the target IP address which iscsid(8) should connect to. By default port 3260 will be used.

targetname string
    The targetname specifies which LUN or disk should be requested by iscsid(8). It is possible to enumerate remote systems with a discovery session.

FILES
/etc/iscsi.conf
    iscsid(8) configuration file.

SEE ALSO
tcp(4), iscsictl(8), iscsid(8), rc.conf.local(8)

HISTORY
The iscsi.conf file format first appeared in OpenBSD 4.9.