2013-09-14 15:29:06 +00:00
|
|
|
.\" Copyright (c) 2012 The FreeBSD Foundation
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" This software was developed by Edward Tomasz Napierala under sponsorship
|
|
|
|
.\" from the FreeBSD Foundation.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
|
|
|
.\" $FreeBSD$
|
|
|
|
.\"
|
2018-12-27 14:44:01 +00:00
|
|
|
.Dd December 27, 2018
|
2013-09-14 15:29:06 +00:00
|
|
|
.Dt ISCSICTL 8
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm iscsictl
|
|
|
|
.Nd iSCSI initiator management utility
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
|
|
|
.Fl A
|
2015-10-17 13:06:52 +00:00
|
|
|
.Fl p Ar portal Fl t Ar target
|
|
|
|
.Op Fl u Ar user Fl s Ar secret
|
|
|
|
.Op Fl w Ar timeout
|
2016-05-06 13:45:42 +00:00
|
|
|
.Op Fl r
|
2018-12-27 14:44:01 +00:00
|
|
|
.Op Fl e Cm on Ns | Ns Cm off
|
2013-09-14 15:29:06 +00:00
|
|
|
.Nm
|
|
|
|
.Fl A
|
2016-05-06 13:45:42 +00:00
|
|
|
.Fl d Ar discovery-host
|
|
|
|
.Op Fl u Ar user Fl s Ar secret
|
|
|
|
.Op Fl r
|
2018-12-27 14:44:01 +00:00
|
|
|
.Op Fl e Cm on Ns | Ns Cm off
|
2013-09-14 15:29:06 +00:00
|
|
|
.Nm
|
|
|
|
.Fl A
|
|
|
|
.Fl a Op Fl c Ar path
|
|
|
|
.Nm
|
|
|
|
.Fl A
|
|
|
|
.Fl n Ar nickname Op Fl c Ar path
|
|
|
|
.Nm
|
2014-06-18 17:46:34 +00:00
|
|
|
.Fl M
|
|
|
|
.Fl i Ar session-id
|
|
|
|
.Op Fl p Ar portal
|
|
|
|
.Op Fl t Ar target
|
|
|
|
.Op Fl u Ar user
|
|
|
|
.Op Fl s Ar secret
|
2018-12-27 14:44:01 +00:00
|
|
|
.Op Fl e Cm on Ns | Ns Cm off
|
2014-06-18 17:46:34 +00:00
|
|
|
.Nm
|
|
|
|
.Fl M
|
|
|
|
.Fl i Ar session-id
|
|
|
|
.Op Fl n Ar nickname Op Fl c Ar path
|
|
|
|
.Nm
|
2013-09-14 15:29:06 +00:00
|
|
|
.Fl R
|
2013-10-30 11:38:46 +00:00
|
|
|
.Op Fl p Ar portal
|
2013-09-14 15:29:06 +00:00
|
|
|
.Op Fl t Ar target
|
|
|
|
.Nm
|
|
|
|
.Fl R
|
|
|
|
.Fl a
|
|
|
|
.Nm
|
|
|
|
.Fl R
|
|
|
|
.Fl n Ar nickname Op Fl c Ar path
|
|
|
|
.Nm
|
|
|
|
.Fl L
|
|
|
|
.Op Fl v
|
2015-10-17 13:06:52 +00:00
|
|
|
.Op Fl w Ar timeout
|
2013-09-14 15:29:06 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility is used to configure the iSCSI initiator.
|
|
|
|
.Pp
|
|
|
|
The following options are available:
|
2018-12-27 14:44:01 +00:00
|
|
|
.Bl -tag -width "-d discovery-host"
|
2015-12-01 19:18:53 +00:00
|
|
|
.It Fl -libxo
|
|
|
|
Generate output via
|
|
|
|
.Xr libxo 3
|
|
|
|
in a selection of different human and machine readable formats.
|
|
|
|
See
|
|
|
|
.Xr xo_parse_args 3
|
|
|
|
for details on command line arguments.
|
2013-09-14 15:29:06 +00:00
|
|
|
.It Fl A
|
|
|
|
Add session.
|
2014-06-18 17:46:34 +00:00
|
|
|
.It Fl M
|
|
|
|
Modify session.
|
2013-09-14 15:29:06 +00:00
|
|
|
.It Fl R
|
|
|
|
Remove session.
|
|
|
|
.It Fl L
|
|
|
|
List sessions.
|
|
|
|
.It Fl a
|
|
|
|
When adding, add all sessions defined in the configuration file.
|
|
|
|
When removing, remove all currently established sessions.
|
2018-12-27 14:44:01 +00:00
|
|
|
.It Fl c Ar path
|
2013-09-14 15:29:06 +00:00
|
|
|
Path to the configuration file.
|
|
|
|
The default is
|
|
|
|
.Pa /etc/iscsi.conf .
|
2018-12-27 14:44:01 +00:00
|
|
|
.It Fl d Ar discovery-host
|
2013-09-14 15:29:06 +00:00
|
|
|
Target host name or address used for SendTargets discovery.
|
|
|
|
When used, it will add a temporary discovery session.
|
|
|
|
After discovery is done, sessions will be added for each discovered target,
|
2014-07-18 12:51:35 +00:00
|
|
|
and the temporary discovery session will be removed.
|
2018-12-27 14:44:01 +00:00
|
|
|
.It Fl e Cm on Ns | Ns Cm off
|
2016-05-31 11:32:07 +00:00
|
|
|
Enable or disable the session.
|
|
|
|
This is ignored for discovery sessions, but gets passed down to normal
|
|
|
|
sessions they add.
|
2018-12-27 14:44:01 +00:00
|
|
|
.It Fl i Ar session-id
|
2014-06-18 17:46:34 +00:00
|
|
|
Session ID, as displayed by
|
|
|
|
.Nm
|
|
|
|
.Fl v .
|
2018-12-27 14:44:01 +00:00
|
|
|
.It Fl n Ar nickname
|
|
|
|
The
|
|
|
|
.Ar nickname
|
|
|
|
of a session defined in the configuration file.
|
|
|
|
.It Fl p Ar portal
|
|
|
|
Target portal \(em host name or address \(em for statically defined targets.
|
2016-05-06 13:45:42 +00:00
|
|
|
.It Fl r
|
|
|
|
Use iSER (iSCSI over RDMA) instead of plain iSCSI over TCP/IP.
|
2018-12-27 14:44:01 +00:00
|
|
|
.It Fl s Ar secret
|
2014-01-04 09:57:23 +00:00
|
|
|
CHAP secret.
|
2018-12-27 14:44:01 +00:00
|
|
|
.It Fl t Ar target
|
2013-09-14 15:29:06 +00:00
|
|
|
Target name.
|
2018-12-27 14:44:01 +00:00
|
|
|
.It Fl u Ar user
|
2014-01-04 09:57:23 +00:00
|
|
|
CHAP login.
|
2013-09-14 15:29:06 +00:00
|
|
|
.It Fl v
|
|
|
|
Verbose mode.
|
2018-12-27 14:44:01 +00:00
|
|
|
.It Fl w Ar timeout
|
2015-10-17 13:06:52 +00:00
|
|
|
Instead of returning immediately, wait up to
|
|
|
|
.Ar timeout
|
|
|
|
seconds until all configured sessions are successfully established.
|
2013-09-14 15:29:06 +00:00
|
|
|
.El
|
|
|
|
.Pp
|
2014-07-18 12:51:35 +00:00
|
|
|
Certain parameters are necessary when adding a session.
|
2014-02-20 17:23:08 +00:00
|
|
|
One can specify these either via command line (using the
|
|
|
|
.Fl t ,
|
|
|
|
.Fl p ,
|
|
|
|
.Fl u ,
|
|
|
|
and
|
|
|
|
.Fl s
|
|
|
|
options), or configuration file (using the
|
|
|
|
.Fl a
|
|
|
|
or
|
|
|
|
.Fl n
|
|
|
|
options).
|
|
|
|
Some functionality - for example mutual CHAP - is available only
|
|
|
|
via configuration file.
|
|
|
|
.Pp
|
2013-09-14 15:29:06 +00:00
|
|
|
Since connecting to the target is performed in background, non-zero
|
|
|
|
exit status does not mean that the session was successfully established.
|
2015-10-17 13:06:52 +00:00
|
|
|
Use either
|
2013-09-14 15:29:06 +00:00
|
|
|
.Nm Fl L
|
2015-10-17 13:06:52 +00:00
|
|
|
to check the connection status, or the
|
|
|
|
.Fl w
|
|
|
|
flag to wait for session establishment.
|
2013-09-14 15:29:06 +00:00
|
|
|
.Pp
|
2014-04-24 11:27:03 +00:00
|
|
|
Note that in order for the iSCSI initiator to be able to connect to a target,
|
2013-09-14 15:29:06 +00:00
|
|
|
the
|
|
|
|
.Xr iscsid 8
|
|
|
|
daemon must be running.
|
|
|
|
.Pp
|
|
|
|
Also note that
|
|
|
|
.Fx
|
|
|
|
currently supports two different initiators: the old one,
|
|
|
|
.Xr iscsi_initiator 4 ,
|
|
|
|
with its control utility
|
|
|
|
.Xr iscontrol 8 ,
|
|
|
|
and the new one,
|
|
|
|
.Xr iscsi 4 ,
|
|
|
|
with
|
2013-09-14 21:43:18 +00:00
|
|
|
.Nm
|
2013-09-14 15:29:06 +00:00
|
|
|
and
|
|
|
|
.Xr iscsid 8 .
|
|
|
|
The only thing the two have in common is the configuration file,
|
|
|
|
.Xr iscsi.conf 5 .
|
|
|
|
.Sh FILES
|
|
|
|
.Bl -tag -width ".Pa /etc/iscsi.conf" -compact
|
|
|
|
.It Pa /etc/iscsi.conf
|
|
|
|
iSCSI initiator configuration file.
|
|
|
|
.El
|
|
|
|
.Sh EXIT STATUS
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility exits 0 on success, and >0 if an error occurs.
|
|
|
|
.Sh EXAMPLES
|
2013-12-30 21:04:24 +00:00
|
|
|
Attach to target iqn.2012-06.com.example:target0, served by 192.168.1.1:
|
|
|
|
.Dl Nm Fl A Fl t Ar iqn.2012-06.com.example:target0 Fl p Ar 192.168.1.1
|
2013-09-14 15:29:06 +00:00
|
|
|
.Pp
|
2016-05-31 11:32:07 +00:00
|
|
|
Perform discovery on 192.168.1.1, and add disabled sessions for each
|
|
|
|
discovered target; use
|
|
|
|
.Nm -M -e on
|
|
|
|
to connect them:
|
|
|
|
.Dl Nm Fl A Fl d Ar 192.168.1.1 Fl e Ar off
|
|
|
|
.Pp
|
2013-09-14 15:29:06 +00:00
|
|
|
Disconnect all iSCSI sessions:
|
|
|
|
.Dl Nm Fl Ra
|
|
|
|
.Sh SEE ALSO
|
2016-01-18 20:21:38 +00:00
|
|
|
.Xr libxo 3 ,
|
|
|
|
.Xr xo_parse_args 3 ,
|
2014-09-13 18:40:12 +00:00
|
|
|
.Xr iscsi 4 ,
|
2013-09-14 21:43:18 +00:00
|
|
|
.Xr iscsi.conf 5 ,
|
2016-01-18 20:21:38 +00:00
|
|
|
.Xr iscsid 8
|
2013-09-14 15:29:06 +00:00
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
command appeared in
|
|
|
|
.Fx 10.0 .
|
|
|
|
.Sh AUTHORS
|
|
|
|
The
|
|
|
|
.Nm
|
2014-09-13 18:40:12 +00:00
|
|
|
utility was developed by
|
2014-06-23 08:23:05 +00:00
|
|
|
.An Edward Tomasz Napierala Aq Mt trasz@FreeBSD.org
|
2013-09-14 15:29:06 +00:00
|
|
|
under sponsorship from the FreeBSD Foundation.
|