Blame doc/iscsiadm.8

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