]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - usr.bin/iscsictl/iscsictl.8
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / usr.bin / iscsictl / iscsictl.8
1 .\" Copyright (c) 2012 The FreeBSD Foundation
2 .\" All rights reserved.
3 .\"
4 .\" This software was developed by Edward Tomasz Napierala under sponsorship
5 .\" from the FreeBSD Foundation.
6 .\"
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
9 .\" are met:
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\"    notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\"    notice, this list of conditions and the following disclaimer in the
14 .\"    documentation and/or other materials provided with the distribution.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" SUCH DAMAGE.
27 .\"
28 .\" $FreeBSD$
29 .\"
30 .Dd September 12, 2014
31 .Dt ISCSICTL 8
32 .Os
33 .Sh NAME
34 .Nm iscsictl
35 .Nd iSCSI initiator management utility
36 .Sh SYNOPSIS
37 .Nm
38 .Fl A
39 .Fl p Ar portal Fl t Ar target Op Fl u Ar user Fl s Ar secret
40 .Nm
41 .Fl A
42 .Fl d Ar discovery-host Op Fl u Ar user Fl s Ar secret
43 .Nm
44 .Fl A
45 .Fl a Op Fl c Ar path
46 .Nm
47 .Fl A
48 .Fl n Ar nickname Op Fl c Ar path
49 .Nm
50 .Fl M
51 .Fl i Ar session-id
52 .Op Fl p Ar portal
53 .Op Fl t Ar target
54 .Op Fl u Ar user
55 .Op Fl s Ar secret
56 .Nm
57 .Fl M
58 .Fl i Ar session-id
59 .Op Fl n Ar nickname Op Fl c Ar path
60 .Nm
61 .Fl R
62 .Op Fl p Ar portal
63 .Op Fl t Ar target
64 .Nm
65 .Fl R
66 .Fl a
67 .Nm
68 .Fl R
69 .Fl n Ar nickname Op Fl c Ar path
70 .Nm
71 .Fl L
72 .Op Fl v
73 .Sh DESCRIPTION
74 The
75 .Nm
76 utility is used to configure the iSCSI initiator.
77 .Pp
78 The following options are available:
79 .Bl -tag -width ".Fl A"
80 .It Fl A
81 Add session.
82 .It Fl M
83 Modify session.
84 .It Fl R
85 Remove session.
86 .It Fl L
87 List sessions.
88 .It Fl a
89 When adding, add all sessions defined in the configuration file.
90 When removing, remove all currently established sessions.
91 .It Fl c
92 Path to the configuration file.
93 The default is
94 .Pa /etc/iscsi.conf .
95 .It Fl d
96 Target host name or address used for SendTargets discovery.
97 When used, it will add a temporary discovery session.
98 After discovery is done, sessions will be added for each discovered target,
99 and the temporary discovery session will be removed.
100 .It Fl i
101 Session ID, as displayed by
102 .Nm
103 .Fl v .
104 .It Fl n
105 The "nickname" of session defined in the configuration file.
106 .It Fl p
107 Target portal - host name or address - for statically defined targets.
108 .It Fl s
109 CHAP secret.
110 .It Fl t
111 Target name.
112 .It Fl u
113 CHAP login.
114 .It Fl v
115 Verbose mode.
116 .El
117 .Pp
118 Certain parameters are necessary when adding a session.
119 One can specify these either via command line (using the
120 .Fl t ,
121 .Fl p ,
122 .Fl u ,
123 and
124 .Fl s
125 options), or configuration file (using the
126 .Fl a
127 or
128 .Fl n
129 options).
130 Some functionality - for example mutual CHAP - is available only
131 via configuration file.
132 .Pp
133 Since connecting to the target is performed in background, non-zero
134 exit status does not mean that the session was successfully established.
135 Use
136 .Nm Fl L
137 to check the connection status.
138 .Pp
139 Note that in order for the iSCSI initiator to be able to connect to a target,
140 the
141 .Xr iscsid 8
142 daemon must be running.
143 .Pp
144 Also note that
145 .Fx
146 currently supports two different initiators: the old one,
147 .Xr iscsi_initiator 4 ,
148 with its control utility
149 .Xr iscontrol 8 ,
150 and the new one,
151 .Xr iscsi 4 ,
152 with
153 .Nm
154 and
155 .Xr iscsid 8 .
156 The only thing the two have in common is the configuration file,
157 .Xr iscsi.conf 5 .
158 .Sh FILES
159 .Bl -tag -width ".Pa /etc/iscsi.conf" -compact
160 .It Pa /etc/iscsi.conf
161 iSCSI initiator configuration file.
162 .El
163 .Sh EXIT STATUS
164 The
165 .Nm
166 utility exits 0 on success, and >0 if an error occurs.
167 .Sh EXAMPLES
168 Attach to target iqn.2012-06.com.example:target0, served by 192.168.1.1:
169 .Dl Nm Fl A Fl t Ar iqn.2012-06.com.example:target0 Fl p Ar 192.168.1.1
170 .Pp
171 Disconnect all iSCSI sessions:
172 .Dl Nm Fl Ra
173 .Sh SEE ALSO
174 .Xr iscsi 4 ,
175 .Xr iscsi.conf 5 ,
176 .Xr iscsid 8
177 .Sh HISTORY
178 The
179 .Nm
180 command appeared in
181 .Fx 10.0 .
182 .Sh AUTHORS
183 The
184 .Nm
185 utility was developed by
186 .An Edward Tomasz Napierala Aq trasz@FreeBSD.org
187 under sponsorship from the FreeBSD Foundation.