1 .\" Copyright (c) 2012 The FreeBSD Foundation
3 .\" This software was developed by Edward Tomasz Napierala under sponsorship
4 .\" from the FreeBSD Foundation.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
16 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
19 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 .Nd iSCSI initiator management utility
38 .Fl p Ar portal Fl t Ar target
39 .Op Fl u Ar user Fl s Ar secret
42 .Op Fl e Cm on Ns | Ns Cm off
45 .Fl d Ar discovery-host
46 .Op Fl u Ar user Fl s Ar secret
48 .Op Fl e Cm on Ns | Ns Cm off
54 .Fl n Ar nickname Op Fl c Ar path
62 .Op Fl e Cm on Ns | Ns Cm off
66 .Op Fl n Ar nickname Op Fl c Ar path
76 .Fl n Ar nickname Op Fl c Ar path
84 utility is used to configure the iSCSI initiator.
86 The following options are available:
87 .Bl -tag -width "-d discovery-host"
91 in a selection of different human and machine readable formats.
94 for details on command line arguments.
104 When adding, add all sessions defined in the configuration file.
105 When removing, remove all currently established sessions.
107 Path to the configuration file.
109 .Pa /etc/iscsi.conf .
110 .It Fl d Ar discovery-host
111 Target host name or address used for SendTargets discovery.
112 When used, it will add a temporary discovery session.
113 After discovery is done, sessions will be added for each discovered target,
114 and the temporary discovery session will be removed.
115 .It Fl e Cm on Ns | Ns Cm off
116 Enable or disable the session.
117 This is ignored for discovery sessions, but gets passed down to normal
119 .It Fl i Ar session-id
120 Session ID, as displayed by
126 of a session defined in the configuration file.
128 Target portal \(em host name or address \(em for statically defined targets.
130 Use iSER (iSCSI over RDMA) instead of plain iSCSI over TCP/IP.
140 Instead of returning immediately, wait up to
142 seconds until all configured sessions are successfully established.
145 Certain parameters are necessary when adding a session.
146 One can specify these either via command line (using the
152 options), or configuration file (using the
157 Some functionality - for example mutual CHAP - is available only
158 via configuration file.
160 Since connecting to the target is performed in background, non-zero
161 exit status does not mean that the session was successfully established.
164 to check the connection status, or the
166 flag to wait for session establishment.
168 Note that in order for the iSCSI initiator to be able to connect to a target,
171 daemon must be running.
175 currently supports two different initiators: the old one,
176 .Xr iscsi_initiator 4 ,
177 with its control utility
185 The only thing the two have in common is the configuration file,
188 .Bl -tag -width ".Pa /etc/iscsi.conf" -compact
189 .It Pa /etc/iscsi.conf
190 iSCSI initiator configuration file.
195 utility exits 0 on success, and >0 if an error occurs.
197 Attach to target iqn.2012-06.com.example:target0, served by 192.168.1.1:
198 .Dl Nm Fl A Fl t Ar iqn.2012-06.com.example:target0 Fl p Ar 192.168.1.1
200 Perform discovery on 192.168.1.1, and add disabled sessions for each
201 discovered target; use
204 .Dl Nm Fl A Fl d Ar 192.168.1.1 Fl e Ar off
206 Disconnect all iSCSI sessions:
210 .Xr xo_parse_args 3 ,
222 utility was developed by
223 .An Edward Tomasz Napierala Aq Mt trasz@FreeBSD.org
224 under sponsorship from the FreeBSD Foundation.