Blame doc/iscsiadm.8

Packit Service 646995
.TH ISCSIADM 8 "Sep 2006" "" "Linux Administrator's Manual"
Packit Service 646995
.SH NAME
Packit Service 646995
iscsiadm \- open-iscsi administration utility
Packit Service 646995
.SH SYNOPSIS
Packit Service 646995
.B iscsiadm
Packit Service 646995
.B \-m discoverydb
Packit Service 646995
.RB [ \-hV ]
Packit Service 646995
.RB [ \-d
Packit Service 646995
.IR debug_level ]
Packit Service 646995
.RB [ \-P
Packit Service 646995
.IR printlevel ]
Packit Service 646995
[\
Packit Service 646995
.BI \-I\  iface\  \-t\  type\  \-p\  ip:port
Packit Service 646995
.RB [ \-lD ]
Packit Service 646995
] | [
Packit Service 646995
.RB [ \-p
Packit Service 646995
.I ip:port
Packit Service 646995
.B \-t
Packit Service 646995
.IR type ]
Packit Service 646995
.RB [ \-o
Packit Service 646995
.IR operation ]
Packit Service 646995
.RB [ \-n
Packit Service 646995
.IR name ]
Packit Service 646995
.RB [ \-v
Packit Service 646995
.IR value ]
Packit Service 646995
.RB [ \-lD ]
Packit Service 646995
]
Packit Service 646995
.PP
Packit Service 646995
.B iscsiadm
Packit Service 646995
.B \-m discovery
Packit Service 646995
.RB [ \-hV ]
Packit Service 646995
.RB [ \-d
Packit Service 646995
.IR debug_level ]
Packit Service 646995
.RB [ \-P
Packit Service 646995
.IR printlevel ]
Packit Service 646995
[\
Packit Service 646995
.BI \-I\  iface\  \-t\  type\  \-p\  ip:port
Packit Service 646995
.RB [ \-l ]
Packit Service 646995
] | [
Packit Service 646995
.RB [ \-p
Packit Service 646995
.IR ip:port ]
Packit Service 646995
.RB [ \-l | \-D ]
Packit Service 646995
]
Packit Service 646995
.PP
Packit Service 646995
.B iscsiadm
Packit Service 646995
.B \-m node
Packit Service 646995
.RB [ \-hV ]
Packit Service 646995
.RB [ \-d
Packit Service 646995
.IR debug_level ]
Packit Service 646995
.RB [ \-P
Packit Service 646995
.IR printlevel ]
Packit Service 646995
.RB [ \-L
Packit Service 646995
.IR all,manual,automatic,onboot ]
Packit Service 646995
.RB [ \-W ]
Packit Service 646995
.RB [ \-U
Packit Service 646995
.IR all,manual,automatic,onboot ]
Packit Service 646995
.RB [ \-S ]
Packit Service 646995
[
Packit Service 646995
.RB [ \-T
Packit Service 646995
.IB targetname\  \-p\  ip:port\  \-I\  iface
Packit Service 646995
]
Packit Service 646995
.RB [ \-l | \-u | \-R | \-s ]
Packit Service 646995
]
Packit Service 646995
[
Packit Service 646995
.RB [ \-o
Packit Service 646995
.IR operation ]
Packit Service 646995
.RB [ \-n
Packit Service 646995
.IR name ]
Packit Service 646995
.RB [ \-v
Packit Service 646995
.IR value ]
Packit Service 646995
.RB [ \-p
Packit Service 646995
.IR ip:port ]
Packit Service 646995
]
Packit Service 646995
.PP
Packit Service 646995
.B iscsiadm
Packit Service 646995
.B \-m session
Packit Service 646995
.RB [ \-hV ]
Packit Service 646995
.RB [ \-d
Packit Service 646995
.IR debug_level ]
Packit Service 646995
.RB [ \-P
Packit Service 646995
.IR printlevel ]
Packit Service 646995
[
Packit Service 646995
.B \-r
Packit Service 646995
.IR sessionid | sysfsdir
Packit Service 646995
.RB [ \-R ]
Packit Service 646995
.RB [ \-u | \-s | \-o
Packit Service 646995
.IR new ]
Packit Service 646995
]
Packit Service 646995
.PP
Packit Service 646995
.B iscsiadm
Packit Service 646995
.B \-m iface
Packit Service 646995
.RB [ \-hV ]
Packit Service 646995
.RB [ \-d
Packit Service 646995
.IR debug_level ]
Packit Service 646995
.RB [ \-P
Packit Service 646995
.IR printlevel ]
Packit Service 646995
[
Packit Service 646995
.BI \-I\  ifacename
Packit Service 646995
|
Packit Service 646995
.BI \-H\  hostno|MAC
Packit Service 646995
]
Packit Service 646995
[
Packit Service 646995
.RB [ \-o
Packit Service 646995
.IR operation ]
Packit Service 646995
.RB [ \-n
Packit Service 646995
.IR name ]
Packit Service 646995
.RB [ \-v
Packit Service 646995
.IR value ]
Packit Service 646995
]
Packit Service 646995
[
Packit Service 646995
.BI \-C\  ping
Packit Service 646995
.RB [ \-a
Packit Service 646995
.IR ip ]
Packit Service 646995
.RB [ \-b
Packit Service 646995
.IR packetsize ]
Packit Service 646995
.RB [ \-c
Packit Service 646995
.IR count ]
Packit Service 646995
.RB [ \-i
Packit Service 646995
.IR interval ]
Packit Service 646995
]
Packit Service 646995
.PP
Packit Service 646995
.B iscsiadm
Packit Service 646995
.B \-m fw
Packit Service 646995
.RB [ \-d
Packit Service 646995
.IR debug_level ]
Packit Service 646995
.RB [ \-l ]
Packit Service 646995
.PP
Packit Service 646995
.B iscsiadm
Packit Service 646995
.B \-m host
Packit Service 646995
.RB [ \-P
Packit Service 646995
.IR printlevel ]
Packit Service 646995
.RB [ \-H
Packit Service 646995
.IR hostno|MAC ]
Packit Service 646995
[
Packit Service 646995
.RB [\  \-C
Packit Service 646995
.IR chap
Packit Service 646995
.RB [ \-x
Packit Service 646995
.IR chap_tbl_idx ]
Packit Service 646995
] |
Packit Service 646995
.RB [\  \-C
Packit Service 646995
.IR flashnode
Packit Service 646995
.RB [ \-A
Packit Service 646995
.IR portal_type ]
Packit Service 646995
.RB [ \-x
Packit Service 646995
.IR flashnode_idx ]
Packit Service 646995
] |
Packit Service 646995
.RB [\  \-C
Packit Service 646995
.IR stats \ ]
Packit Service 646995
]
Packit Service 646995
[
Packit Service 646995
.RB [ \-o
Packit Service 646995
.IR operation ]
Packit Service 646995
.RB [ \-n
Packit Service 646995
.IR name ]
Packit Service 646995
.RB [ \-v
Packit Service 646995
.IR value ]
Packit Service 646995
]
Packit Service 646995
.PP
Packit Service 646995
.B iscsiadm
Packit Service 646995
.B \-k  priority
Packit Service 646995
.SH "DESCRIPTION"
Packit Service 646995
The iscsiadm utility is a command-line tool allowing discovery and login
Packit Service 646995
to iSCSI targets, as well as access and management of the open-iscsi
Packit Service 646995
database.
Packit Service 646995
.PP
Packit Service 646995
Open-iscsi does not use the term node as defined by the iSCSI RFC,
Packit Service 646995
where a node is a single iSCSI initiator or target. Open-iscsi uses the
Packit Service 646995
term node to refer to a portal on a target.
Packit Service 646995
.PP
Packit Service 646995
For session mode, a session id (sid) is used. The sid of a session can be
Packit Service 646995
found by running iscsiadm \-m session \-P 1. The session id and sysfs
Packit Service 646995
path are not currently persistent and is partially determined by when the
Packit Service 646995
session is setup.
Packit Service 646995
.PP
Packit Service 646995
Note that many of the node and discovery operations require that the iSCSI
Packit Service 646995
daemon (iscsid) be running.
Packit Service 646995
.SH OPTIONS
Packit Service 646995
.TP
Packit Service 646995
\fB\-a\fR, \fB\-\-ip=\fIipaddr\fP
Packit Service 646995
\fIipaddr\fR can be IPv4 or IPv6.
Packit Service 646995
.IP
Packit Service 646995
This option is only valid for ping submode.
Packit Service 646995
.TP
Packit Service 646995
\fB\-A\fR, \fB\-\-portal_type=\fI[ipv4|ipv6]\fR
Packit Service 646995
Specify the portal type for the new flash node entry to be created.
Packit Service 646995
.IP
Packit Service 646995
This option is only valid for flashnode submode of host mode and only with \fInew\fR operation.
Packit Service 646995
.TP
Packit Service 646995
\fB\-b\fR, \fB\-\-packetsize=\fIpacketsize\fP
Packit Service 646995
Specify the ping \fIpacketsize\fR.
Packit Service 646995
.IP
Packit Service 646995
This option is only valid for ping submode.
Packit Service 646995
.TP
Packit Service 646995
\fB\-c\fR, \fB\-\-count=\fIcount\fP
Packit Service 646995
\fIcount\fR specify number of ping iterations.
Packit Service 646995
.IP
Packit Service 646995
This option is only valid for ping submode.
Packit Service 646995
.TP
Packit Service 646995
\fB\-C\fR, \fB\-\-submode=\fIop\fP
Packit Service 646995
Specify the submode for mode. op must be name of submode.
Packit Service 646995
.IP
Packit Service 646995
Currently iscsiadm support ping as submode for iface. For example:
Packit Service 646995
.IP
Packit Service 646995
iscsiadm \-m iface \-I ifacename \-C ping \-a ipaddr \-b packetsize \-c count \-i interval
Packit Service 646995
.IP
Packit Service 646995
For host, it supports chap , flashnode and stats as submodes. For example:
Packit Service 646995
.IP
Packit Service 646995
iscsiadm \-m host \-H hostno \-C chap \-x chap_tbl_idx \-o operation
Packit Service 646995
.IP
Packit Service 646995
iscsiadm \-m host \-H hostno \-C flashnode \-x flashnode_idx \-o operation
Packit Service 646995
.IP
Packit Service 646995
iscsiadm \-m host \-H hostno \-C stats
Packit Service 646995
.TP
Packit Service 646995
\fB\-d\fR, \fB\-\-debug=\fIdebug_level\fP
Packit Service 646995
print debugging information. Valid values for debug_level are 0 to 8.
Packit Service 646995
.TP
Packit Service 646995
\fB\-h\fR, \fB\-\-help\fR
Packit Service 646995
display help text and exit
Packit Service 646995
.TP
Packit Service 646995
\fB\-H\fR, \fB\-\-host=\fI[hostno|MAC]\fR
Packit Service 646995
The host argument specifies the SCSI host to use for the operation. It can be
Packit Service 646995
the scsi host number assigned to the host by the kernel's scsi layer, or the
Packit Service 646995
MAC address of a scsi host.
Packit Service 646995
.TP
Packit Service 646995
\fB\-i\fR, \fB\-\-interval=\fIinterval\fP
Packit Service 646995
\fIinterval\fP specify delay between two ping iterations.
Packit Service 646995
.IP
Packit Service 646995
This option is only valid for ping submode.
Packit Service 646995
.TP
Packit Service 646995
\fB\-I\fR, \fB\-\-interface=\fI[iface]\fR
Packit Service 646995
The interface argument specifies the iSCSI interface to use for the operation.
Packit Service fad540
iSCSI interfaces (iface) are defined in /var/lib/iscsi/ifaces. For hardware
Packit Service 646995
iSCSI (qla4xxx) the iface config must have the hardware address
Packit Service 646995
(iface.hwaddress = port's MAC address)
Packit Service 646995
and the driver/transport_name (iface.transport_name). The iface's name is
Packit Service 646995
then the filename of the iface config. For software iSCSI, the iface config
Packit Service 646995
must have either the hardware address (iface.hwaddress), or the network
Packit Service 646995
layer's interface name (iface.net_ifacename), and it must have the
Packit Service 646995
driver/transport_name
Packit Service 646995
.IP
Packit Service 646995
The available drivers/iscsi_transports are tcp (software iSCSI over TCP/IP),
Packit Service 646995
iser (software iSCSI over InfiniBand), or qla4xxx (Qlogic 4XXXX HBAs). The
Packit Service 646995
hwaddress is the MAC address or for software iSCSI it may be the special
Packit Service 646995
value "default" which directs the initiator to not bind the session to a
Packit Service 646995
specific hardware resource and instead allow the network or InfiniBand layer
Packit Service 646995
to decide what to do. There is no need to create an iface config with the default
Packit Service 646995
behavior. If you do not specify an iface, then the default behavior is used.
Packit Service 646995
.IP
Packit Service 646995
As mentioned above there is a special iface name default. There are three
Packit Service 646995
others -- cxgb3i, bnx2i and iser, which does not bind the session to a
Packit Service 646995
specific card, but will bind the session to the cxgb3i, bnx2i or iser transport. These
Packit Service 646995
are experimental and the use is not supported as a stable interface yet.
Packit Service 646995
.IP
Packit Service 646995
In discovery mode multiple interfaces can be specified by passing in multiple
Packit Service 646995
\-I/\-\-interface instances. For example:
Packit Service 646995
.IP
Packit Service 646995
"iscsiadm \-m discoverydb \-t st \-p ip:port \-I iface0 \-I iface2 \-\-discover"
Packit Service 646995
.IP
Packit Service 646995
Will direct iscsiadm to setup the node db to create records which will create
Packit Service 646995
sessions through the two intefaces passed in.
Packit Service 646995
.IP
Packit Service 646995
In node mode, only a single interface is supported in each call to iscsiadm.
Packit Service 646995
.IP
Packit Service 646995
This option is valid for discovery, node and iface mode.
Packit Service 646995
.TP
Packit Service 646995
\fB\-k\fR, \fB\-\-killiscsid=\fI[priority]\fR
Packit Service 646995
Currently priority must be zero. This will immediately stop all iscsid
Packit Service 646995
operations and shutdown iscsid. It does not logout any sessions. Running
Packit Service 646995
this command is the same as doing "killall iscsid". Neither should
Packit Service 646995
normally be used, because if iscsid is doing error recovery or if there
Packit Service 646995
is an error while iscsid is not running, the system may not be able to recover.
Packit Service 646995
This command and iscsid's SIGTERM handling are experimental.
Packit Service 646995
.TP
Packit Service 646995
\fB\-D\fR, \fB\-\-discover\fR
Packit Service 646995
Discover targets using the discovery record with the  \fIrecid\fR matching
Packit Service 646995
the the discovery type and portal passed in. If there is no matching record,
Packit Service 646995
it will be created using the iscsid.conf discovery settings.
Packit Service 646995
This must be passed in \fIdiscoverydb\fR mode to instruct iscsiadm to perform
Packit Service 646995
discovery.
Packit Service 646995
.IP
Packit Service 646995
This option is only valid for SendTargets discovery mode.
Packit Service 646995
.TP
Packit Service 646995
\fB\-l\fR, \fB\-\-login\fR
Packit Service 646995
For node and fw mode, login to a specified record. For discovery mode, login to
Packit Service 646995
all discovered targets.
Packit Service 646995
.IP
Packit Service 646995
This option is only valid for discovery and node modes.
Packit Service 646995
.TP
Packit Service 646995
\fB\-L\fR, \fB\-\-loginall=\fI[all|manual|automatic|onboot]\fR
Packit Service 646995
For node mode, login all sessions with the node or conn startup values passed
Packit Service 646995
in or all running session, except ones marked onboot, if all is passed in.
Packit Service 646995
.IP
Packit Service 646995
This option is only valid for node mode (it is valid but not functional
Packit Service 646995
for session mode).
Packit Service 646995
.TP
Packit Service 646995
\fB\-W\fR, \fB\-\-\-no_wait\fR
Packit Service 646995
In node mode, do not wait for a response from the targets.
Packit Service 646995
This means that success will be returned if the command is able to
Packit Service 646995
send the login requests, whether or not they succeed. In this case, it will
Packit Service 646995
be up to the caller to poll for success (i.e. session creation).
Packit Service 646995
.TP
Packit Service 646995
\fB\-m\fR, \fB\-\-mode \fIop\fR
Packit Service 646995
specify the mode. \fIop\fR
Packit Service 646995
must be one of \fIdiscovery\fR, \fIdiscoverydb\fR, \fInode\fR, \fIfw\fR,
Packit Service 646995
\fIhost\fR \fIiface\fR or \fIsession\fR.
Packit Service 646995
.IP
Packit Service 646995
If no other options are specified: for \fIdiscovery\fR, \fIdiscoverydb\fR and
Packit Service 646995
\fInode\fR, all of their respective records are displayed; for \fIsession\fR,
Packit Service 646995
all active sessions and connections are displayed; for \fIfw\fR, all boot
Packit Service 646995
firmware values are displayed; for \fIhost\fR, all iSCSI hosts are displayed;
Packit Service fad540
and for \fIiface\fR, all ifaces setup in /var/lib/iscsi/ifaces are displayed.
Packit Service 646995
.TP
Packit Service 646995
\fB\-n\fR, \fB\-\-name=\fIname\fR
Packit Service 646995
In node mode, specify a field \fIname\fR in a record. In flashnode submode
Packit Service 646995
of host mode, specify name of the flash node parameter.
Packit Service 646995
.IP
Packit Service 646995
For use with the \fIupdate\fR operator.
Packit Service 646995
.TP
Packit Service 646995
\fB\-o\fR, \fB\-\-op=\fIop\fR
Packit Service 646995
Specifies a database operator \fIop\fR. \fIop\fR must be one of
Packit Service 646995
\fInew\fR, \fIdelete\fR, \fIupdate\fR, \fIshow\fR or \fInonpersistent\fR.
Packit Service 646995
.IP
Packit Service 646995
For iface mode, \fIapply\fR and \fIapplyall\fR  are also applicable.
Packit Service 646995
.IP
Packit Service 646995
For flashnode submode of host mode, \fIlogin\fR and \fIlogout\fR are also applicable.
Packit Service 646995
.IP
Packit Service 646995
This option is valid for all modes except fw. Delete should not be used
Packit Service 646995
on a running session. If it is iscsiadm will stop the session and then delete the
Packit Service 646995
record.
Packit Service 646995
.IP
Packit Service 646995
\fInew\fR creates a new database record for a given object. In node mode, the
Packit Service 646995
\fIrecid\fR is the target name and portal (IP:port). In iface mode, the \fIrecid\fR
Packit Service 646995
is the iface name. In discovery mode, the \fIrecid\fR is the portal and
Packit Service 646995
discovery type.
Packit Service 646995
.IP
Packit Service 646995
In session mode, the \fInew\fR operation logs in a new session using
Packit Service 646995
the same node database and iface information as the specified session.
Packit Service 646995
.IP
Packit Service 646995
In discovery mode, if the \fIrecid\fR and new operation is passed in,
Packit Service 646995
but the \fI--discover\fR argument is not, then iscsiadm will only create a
Packit Service 646995
discovery record (it will not perform discovery). If the \fI--discover\fR
Packit Service 646995
argument is passed in with the portal and discovery type, then iscsiadm
Packit Service 646995
will create the discovery record if needed, and it will create records
Packit Service 646995
for portals returned by the target that do not yet have a node DB record.
Packit Service 646995
.IP
Packit Service 646995
\fIdelete\fR deletes a specified \fIrecid\fR. In discovery mode, if
Packit Service 646995
iscsiadm is performing discovery it will delete records for portals that
Packit Service 646995
are no longer returned.
Packit Service 646995
.IP
Packit Service 646995
\fIupdate\fR will update the \fIrecid\fR with \fIname\fR to the specified
Packit Service 646995
\fIvalue\fR. In discovery mode, if iscsiadm is performing discovery the
Packit Service 646995
\fIrecid\fR, \fIname\fR  and \fIvalue\fR arguments are not needed. The
Packit Service 646995
update operation will operate on the portals returned by the target,
Packit Service 646995
and will update the node records with info from the config file and
Packit Service 646995
command line.
Packit Service 646995
.IP
Packit Service 646995
\fIshow\fR is the default behaviour for node, discovery and iface mode. It is
Packit Service 646995
also used when there are no commands passed into session mode and a running
Packit Service 646995
sid is passed in.
Packit Service 646995
\fIname\fR and \fIvalue\fR are currently ignored when used with \fIshow\fR.
Packit Service 646995
.IP
Packit Service 646995
\fInonpersistent\fR instructs iscsiadm to not manipulate the node DB.
Packit Service 646995
.IP
Packit Service 646995
\fIapply\fR will cause the network settings to take effect on the specified iface.
Packit Service 646995
.IP
Packit Service 646995
\fIapplyall\fR will cause the network settings to take effect on all the
Packit Service 646995
ifaces whose MAC address or host number matches that of the specific host.
Packit Service 646995
.IP
Packit Service 646995
\fIlogin\fR will log into the specified flash node entry.
Packit Service 646995
.IP
Packit Service 646995
\fIlogout\fR does the logout from the given flash node entry.
Packit Service 646995
.TP
Packit Service 646995
\fB\-p\fR, \fB\-\-portal=\fIip[:port]\fR
Packit Service 646995
Use target portal with ip-address \fIip\fR and \fIport\fR. If port is not passed
Packit Service 646995
in the default \fIport\fR value is 3260.
Packit Service 646995
.IP
Packit Service 646995
IPv6 addresses can be specified as [ddd.ddd.ddd.ddd]:port or
Packit Service 646995
ddd.ddd.ddd.ddd.
Packit Service 646995
.IP
Packit Service 646995
Hostnames can also be used for the ip argument.
Packit Service 646995
.IP
Packit Service 646995
This option is only valid for discovery, or for node operations with
Packit Service 646995
the \fInew\fR operator.
Packit Service 646995
.IP
Packit Service 646995
This should be used along with \-\-target in node mode, to specify what
Packit Service 646995
the open-iscsi docs refer to as a node or node record. Note: open-iscsi's
Packit Service 646995
use of the word node, does not match the iSCSI RFC's iSCSI Node term.
Packit Service 646995
.TP
Packit Service 646995
\fB\-P\fR,  \fB\-\-print=\fIprintlevel\fR
Packit Service 646995
If in node mode print nodes in tree format. If in session mode print
Packit Service 646995
sessions in tree format. If in discovery mode print the nodes in
Packit Service 646995
tree format.
Packit Service 646995
.TP
Packit Service 646995
\fB\-T\fR, \fB\-\-targetname=\fItargetname\fR
Packit Service 646995
Use target \fItargetname\fR.
Packit Service 646995
.IP
Packit Service 646995
This should be used along with \-\-portal in node mode, to specify what
Packit Service 646995
the open-iscsi docs refer to as a node or node record. Note: open-iscsi's
Packit Service 646995
use of the word node, does not match the iSCSI RFC's iSCSI Node term.
Packit Service 646995
.TP
Packit Service 646995
\fB\-r\fR,  \fB\-\-sid=\fIsid | sysfsdir\fR
Packit Service 646995
Use session ID \fIsid\fR. The sid of a session can be found from running
Packit Service 646995
iscsiadm in session mode with the \-\-info argument.
Packit Service 646995
.IP
Packit Service 646995
Instead of sid, a sysfs path containing the session can be used.
Packit Service 646995
For example using one of the following:
Packit Service 646995
/sys/devices/platform/hostH/sessionS/targetH:B:I/H:B:I:L,
Packit Service 646995
/sys/devices/platform/hostH/sessionS/targetH:B:I, or
Packit Service 646995
/sys/devices/platform/hostH/sessionS, for the sysfsdir argument would
Packit Service 646995
result in the session with sid S to be used.
Packit Service 646995
.IP
Packit Service 646995
\fIsid | sysfsdir\fR is only required for session mode.
Packit Service 646995
.TP
Packit Service 646995
\fB\-R\fR,  \fB\-\-rescan\fR
Packit Service 646995
In session mode, if sid is also passed in rescan the session. If no sid has
Packit Service 646995
been passed in  rescan all running sessions.
Packit Service 646995
.IP
Packit Service 646995
In node mode, rescan a session running through the target, portal, iface
Packit Service 646995
tuple passed in.
Packit Service 646995
.TP
Packit Service 646995
\fB\-s\fR, \fB\-\-stats\fR
Packit Service 646995
Display session statistics.
Packit Service 646995
This option when used with host mode, displays host statistics.
Packit Service 646995
.TP
Packit Service 646995
\fB\-S\fR, \fB\-\-show\fR
Packit Service 646995
When displaying records, do not hide masked values, such as the CHAP
Packit Service 646995
secret (password).
Packit Service 646995
.IP
Packit Service 646995
This option is only valid for node and session mode.
Packit Service 646995
.TP
Packit Service 646995
\fB\-t\fR, \fB\-\-type=\fItype\fR
Packit Service 646995
\fItype\fR must be \fIsendtargets\fR (or abbreviated as \fIst\fR),
Packit Service 646995
\fIslp\fR, \fIisns\fR or \fIfw\fR. Currently only sendtargets, fw, and
Packit Service 646995
iSNS is supported, see the DISCOVERY TYPES section.
Packit Service 646995
.IP
Packit Service 646995
This option is only valid for discovery mode.
Packit Service 646995
.TP
Packit Service 646995
\fB\-u\fR, \fB\-\-logout\fR
Packit Service 646995
logout for a specified record.
Packit Service 646995
.IP
Packit Service 646995
This option is only valid for node and session mode.
Packit Service 646995
.TP
Packit Service 646995
\fB\-U\fR, \fB\-\-logoutall=\fI[all,manual,automatic|onboot]\fR
Packit Service 646995
logout all sessions with the node or conn startup values passed in or all
Packit Service 646995
running session, except ones marked onboot, if all is passed in.
Packit Service 646995
.IP
Packit Service 646995
This option is only valid for node mode (it is valid but not functional
Packit Service 646995
for session mode).
Packit Service 646995
.TP
Packit Service 646995
\fB\-v\fR, \fB\-\-value=\fIvalue\fR
Packit Service 646995
Specify a \fIvalue\fR for use with the \fIupdate\fR operator.
Packit Service 646995
.IP
Packit Service 646995
This option is only valid for node mode and flashnode submode of host mode.
Packit Service 646995
.TP
Packit Service 646995
\fB\-V\fR, \fB\-\-version\fR
Packit Service 646995
display version and exit
Packit Service 646995
.TP
Packit Service 646995
\fB\-x\fR, \fB\-\-index=\fIindex\fR
Packit Service 646995
Specify the \fIindex\fR of the entity to operate on.
Packit Service 646995
.IP
Packit Service 646995
This option is only valid for chap and flashnode submodes of host mode.
Packit Service 646995
.SH DISCOVERY TYPES
Packit Service 646995
iSCSI defines 3 discovery types: SendTargets, SLP, and iSNS.
Packit Service 646995
.TP
Packit Service 646995
.B
Packit Service 646995
SendTargets
Packit Service 646995
A native iSCSI protocol which allows each iSCSI
Packit Service 646995
target to send a list of available targets to the initiator.
Packit Service 646995
.TP
Packit Service 646995
.B
Packit Service 646995
SLP
Packit Service 646995
Optionally an iSCSI target can use the Service Location Protocol (SLP)
Packit Service 646995
to announce the available targets. The initiator can either implement
Packit Service 646995
SLP queries directly or can use a separate tool to acquire the
Packit Service 646995
information about available targets.
Packit Service 646995
.TP
Packit Service 646995
.B
Packit Service 646995
iSNS
Packit Service 646995
iSNS (Internet Storage Name Service) records information about storage
Packit Service 646995
volumes within a larger network. To utilize iSNS, pass the address and
Packit Service 646995
optionally the port of the iSNS server to do discovery to.
Packit Service 646995
.TP
Packit Service 646995
.B
Packit Service 646995
fw
Packit Service 646995
Several NICs and systems contain a mini iSCSI initiator which can be used
Packit Service 646995
for boot. To get the values used for boot the fw option can be used.
Packit Service 646995
Doing fw discovery, does not store persistent records in the node or
Packit Service 646995
discovery DB, because the values are stored in the system's or NIC's
Packit Service 646995
resource.
Packit Service 646995
.IP
Packit Service 646995
Performing fw discovery will print the portals, like with other discovery
Packit Service 646995
methods. To see other settings like CHAP values and initiator settings,
Packit Service 646995
like you would in node mode, run "iscsiadm \-m fw".
Packit Service 646995
.IP
Packit Service 646995
fw support in open-iscsi is experimental. The settings and iscsiadm
Packit Service 646995
syntax and output format may change.
Packit Service 646995
.P
Packit Service 646995
iscsiadm supports the
Packit Service 646995
.B
Packit Service 646995
iSNS (isns)
Packit Service 646995
or
Packit Service 646995
.B
Packit Service 646995
SendTargets (st)
Packit Service 646995
discovery type. An SLP implementation is under development.
Packit Service 646995
.SH EXIT STATUS
Packit Service 646995
On success 0 is returned. On error one of the return codes below will
Packit Service 646995
be returned.
Packit Service 646995
.PP
Packit Service 646995
Commands that operate on multiple objects (sessions, records, etc),
Packit Service 646995
iscsiadm/iscsistart will return the first error that is encountered.
Packit Service 646995
iscsiadm/iscsistart will attempt to execute the operation on the objects it
Packit Service 646995
can. If no objects are found ISCSI_ERR_NO_OBJS_FOUND is returned.
Packit Service 646995
.TP
Packit Service 646995
.B
Packit Service 646995
0
Packit Service 646995
ISCSI_SUCCESS - command executed successfully.
Packit Service 646995
.TP
Packit Service 646995
.B
Packit Service 646995
1
Packit Service 646995
ISCSI_ERR - generic error code.
Packit Service 646995
.TP
Packit Service 646995
.B
Packit Service 646995
2
Packit Service 646995
ISCSI_ERR_SESS_NOT_FOUND - session could not be found.
Packit Service 646995
.TP
Packit Service 646995
.B
Packit Service 646995
3
Packit Service 646995
ISCSI_ERR_NOMEM - could not allocate resource for operation.
Packit Service 646995
.TP
Packit Service 646995
.B
Packit Service 646995
4
Packit Service 646995
ISCSI_ERR_TRANS - connect problem caused operation to fail.
Packit Service 646995
.TP
Packit Service 646995
.B
Packit Service 646995
5
Packit Service 646995
ISCSI_ERR_LOGIN - generic iSCSI login failure.
Packit Service 646995
.TP
Packit Service 646995
.B
Packit Service 646995
6
Packit Service 646995
ISCSI_ERR_IDBM - error accessing/managing iSCSI DB.
Packit Service 646995
.TP
Packit Service 646995
.B
Packit Service 646995
7
Packit Service 646995
ISCSI_ERR_INVAL - invalid argument.
Packit Service 646995
.TP
Packit Service 646995
.B
Packit Service 646995
8
Packit Service 646995
ISCSI_ERR_TRANS_TIMEOUT - connection timer exired while trying to connect.
Packit Service 646995
.TP
Packit Service 646995
.B
Packit Service 646995
9
Packit Service 646995
ISCSI_ERR_INTERNAL - generic internal iscsid/kernel failure.
Packit Service 646995
.TP
Packit Service 646995
.B
Packit Service 646995
10
Packit Service 646995
ISCSI_ERR_LOGOUT - iSCSI logout failed.
Packit Service 646995
.TP
Packit Service 646995
.B
Packit Service 646995
11
Packit Service 646995
ISCSI_ERR_PDU_TIMEOUT - iSCSI PDU timedout.
Packit Service 646995
.TP
Packit Service 646995
.B
Packit Service 646995
12
Packit Service 646995
ISCSI_ERR_TRANS_NOT_FOUND - iSCSI transport module not loaded in kernel or iscsid.
Packit Service 646995
.TP
Packit Service 646995
.B
Packit Service 646995
13
Packit Service 646995
ISCSI_ERR_ACCESS - did not have proper OS permissions to access iscsid or execute iscsiadm command.
Packit Service 646995
.TP
Packit Service 646995
.B
Packit Service 646995
14
Packit Service 646995
ISCSI_ERR_TRANS_CAPS - transport module did not support operation.
Packit Service 646995
.TP
Packit Service 646995
.B
Packit Service 646995
15
Packit Service 646995
ISCSI_ERR_SESS_EXISTS - session is logged in.
Packit Service 646995
.TP
Packit Service 646995
.B
Packit Service 646995
16
Packit Service 646995
ISCSI_ERR_INVALID_MGMT_REQ - invalid IPC MGMT request.
Packit Service 646995
.TP
Packit Service 646995
.B
Packit Service 646995
17
Packit Service 646995
ISCSI_ERR_ISNS_UNAVAILABLE - iSNS service is not supported.
Packit Service 646995
.TP
Packit Service 646995
.B
Packit Service 646995
18
Packit Service 646995
ISCSI_ERR_ISCSID_COMM_ERR - a read/write to iscsid failed.
Packit Service 646995
.TP
Packit Service 646995
.B
Packit Service 646995
19
Packit Service 646995
ISCSI_ERR_FATAL_LOGIN - fatal iSCSI login error.
Packit Service 646995
.TP
Packit Service 646995
.B
Packit Service 646995
20
Packit Service 646995
ISCSI_ERR_ISCSID_NOTCONN - could not connect to iscsid.
Packit Service 646995
.TP
Packit Service 646995
.B
Packit Service 646995
21
Packit Service 646995
ISCSI_ERR_NO_OBJS_FOUND - no records/targets/sessions/portals found to execute operation on.
Packit Service 646995
.TP
Packit Service 646995
.B
Packit Service 646995
22
Packit Service 646995
ISCSI_ERR_SYSFS_LOOKUP - could not lookup object in sysfs.
Packit Service 646995
.TP
Packit Service 646995
.B
Packit Service 646995
23
Packit Service 646995
ISCSI_ERR_HOST_NOT_FOUND - could not lookup host.
Packit Service 646995
.TP
Packit Service 646995
.B
Packit Service 646995
24
Packit Service 646995
ISCSI_ERR_LOGIN_AUTH_FAILED - login failed due to authorization failure.
Packit Service 646995
.TP
Packit Service 646995
.B
Packit Service 646995
25
Packit Service 646995
ISCSI_ERR_ISNS_QUERY - iSNS query failure.
Packit Service 646995
.TP
Packit Service 646995
.B
Packit Service 646995
26
Packit Service 646995
ISCSI_ERR_ISNS_REG_FAILED - iSNS registration/deregistration failed.
Packit Service 646995
.SH EXAMPLES
Packit Service 646995
Discover targets at a given IP address:
Packit Service 646995
.IP
Packit Service 646995
iscsiadm \-\-mode discoverydb \-\-type sendtargets \-\-portal 192.168.1.10 \-\-discover
Packit Service 646995
.PP
Packit Service 646995
Login, must use a node record id found by the discovery:
Packit Service 646995
.IP
Packit Service 646995
iscsiadm \-\-mode node \-\-targetname iqn.2001-05.com.doe:test \-\-portal 192.168.1.1:3260 \-\-login
Packit Service 646995
.PP
Packit Service 646995
Logout:
Packit Service 646995
.IP
Packit Service 646995
iscsiadm \-\-mode node \-\-targetname iqn.2001-05.com.doe:test \-\-portal 192.168.1.1:3260 \-\-logout
Packit Service 646995
.PP
Packit Service 646995
List node records:
Packit Service 646995
.IP
Packit Service 646995
iscsiadm \-\-mode node
Packit Service 646995
.PP
Packit Service 646995
Display all data for a given node record:
Packit Service 646995
.IP
Packit Service 646995
iscsiadm \-\-mode node \-\-targetname iqn.2001-05.com.doe:test \-\-portal 192.168.1.1:3260
Packit Service 646995
.SH FILES
Packit Service 646995
.TP
Packit Service 646995
/etc/iscsi/iscsid.conf
Packit Service 646995
The configuration file read by \fBiscsid\fR and \fBiscsiadm\fR on startup.
Packit Service 646995
.TP
Packit Service 646995
/etc/iscsi/initiatorname.iscsi
Packit Service 646995
The file containing the iSCSI InitiatorName and InitiatorAlias read by
Packit Service 646995
\fBiscsid\fR and \fBiscsiadm\fR on startup.
Packit Service 646995
.TP
Packit Service fad540
/var/lib/iscsi/nodes/
Packit Service 646995
This directory contains the nodes with their targets.
Packit Service 646995
.TP
Packit Service fad540
/var/lib/iscsi/send_targets
Packit Service 646995
This directory contains the portals.
Packit Service 646995
.SH "SEE ALSO"
Packit Service 646995
.BR iscsid (8)
Packit Service 646995
.SH AUTHORS
Packit Service 646995
Open-iSCSI project <http://www.open-iscsi.com/>
Packit Service 646995
.br
Packit Service 646995
Alex Aizman <itn780@yahoo.com>
Packit Service 646995
.br
Packit Service 646995
Dmitry Yusupov <dmitry_yus@yahoo.com>