Skip to content

iscsictl(8)

Nareg Sinenian edited this page Apr 7, 2017 · 9 revisions

ISCSICTL(8) BSD System Manager’s Manual

NAME

iscsictl — iSCSI initiator configuration and management tool.

SYNOPSIS

iscsictl add target target,portal [−interface interface]
iscsictl remove target target[,portal]

iscsictl login target[,portal]
iscsictl logout target[,portal]

iscsictl modify initiator-config [...]
iscsictl modify target-config target[,portal] [...]
iscsictl modify discovery-config [...]

iscsictl list initiator-config
iscsictl list target-config target
iscsictl list discovery-config

iscsictl add discovery-portal portal [−interface interface]
iscsictl remove discovery-portal portal

iscsictl list targets
iscsictl list luns

DESCRIPTION

The utility is used to configure the iSCSI initiator and manage sessions. Users may login or logout of targets after they have been defined with appropriate portals and optional authentication method, session parameters and connection parameters. Unprivileged users cannot perform add, remove and modify operations.

The options are as follows:

add Adds an entity to the specified database.

modify Modifies an existing entity in the specified database.

remove Removes an existing entity from the specified database.

list Lists entities in the specified database.

login Logs into a target or connection.

logout Logs out of a target or connection.

mount Mounts all volumes associated with the specified target.

unmount Unmounts all volumes associated with the specified target.

The target must be an iSCSI Qualified Name (IQN) as defined in RFC3720. The portal must be a valid IP address (version 4 or 6) or a valid DNS name. If a port other than 3620 is used, the portal can include a port number (e.g., address:port). The interface when specified must be a valid network interface (i.e., as listed by ifconfig). Otherwise the first available interface that supports the specified protocol is automatically used.

If multiple connections are to be used with a single target, it is important to indicate the interfaces to be used in order to prevent conflicts.

If the portal is omitted where optional, the command acts on all portals. For example, when logging into or out of a target, a specific portal can be used otherwise the initiator will login to or logout of all portals. Similarly, if a portal is specified for a remove operation, only that portal is removed from the database. If omitted, the target including all portals are removed.

The following options can be used to modify initiator-config:

-node-name initiator_IQN

The initiator's iSCSI qualified name (IQN) per RFC3720.

-node-alias alias

An alias to used for the initiator (presented to the target during login).

-authentication method

The authentication method to use. Possible values are either None or CHAP.

-CHAP-name name

The CHAP user name to use for initiator authentication. This name is presented to the target for during the login phase if authentication is enabled.

-CHAP-secret

The CHAP secret to use for initiator authentication. The secret has a maximum length of 256 characters. The user will be prompted for the password when this option is used.

The following options can be used to modify target-config:

-auto-login enable

Specifies whether the iSCSI daemon should login to the target upon startup. Possible values for enable are enable or disable.

-MaxConnections max_connections

The maximum number of simultaneous connections allowed for this target.

-ErrorRecoveryLevel error_level

The error recovery level for the session associated with this target. Possible values for error_level are either 0, 1, or 2.

-HeaderDigest digest

Specifies the type of header digest to use. Possible values for digest are None or CRC32C.

-DataDigest digest

Specifies the type of data digest to use. Possible values for digest are None or CRC32C.

-CHAP-name name

The CHAP user name to use for target authentication. This name is presented to the initiator for during the login phase if authentication is enabled.

-CHAP-secret

The CHAP secret to use for target authentication. The secret has a maximum length of 256 characters. The user will be prompted for the password when this option is used.

The following options can be used to modify discovery-config:

-SendTargets enable

Specifies whether SendTargets discovery should be used. Possible values for enable are enable or disable.

-interval interval

Specifies the discovery interval in seconds.

FILES
/Library/Preferences/com.github.iscsi-osx.iSCSIInitiator.plist

Initiator, targets and discovery configuration file. Stores the initiator name and alias, a list of defined targets, their associated portals, authentication parameters, session-wide and connection-wide options, discovery portals and settings and a list of discovered targets. Superuser access is required to edit this file.

EXAMPLES

iscsictl add target iqn.2015-01.com.example:target,192.168.1.100:3260 -interface en0

iscsictl add target iqn.2015-01.com.example:target,192.168.1.101:3260 -interface en1

iscsictl login iqn.2015-01.com.example:target,192.168.1.1.100

iscsictl logout target iqn.2015-01.com.example:target

iscsictl modify target iqn.2015-01.com.example:target,192.168.1.1.100:3260 -interface en2

SEE ALSO

iscsid(8)

AUTHORS

Nareg Sinenian ⟨nareg@alum.mit.edu

Mac OS X November 1, 2015 Mac OS X