1ISCSIADM(8) Linux Administrator's Manual ISCSIADM(8)
2
3
4
6 iscsiadm - open-iscsi administration utility
7
9 iscsiadm -m discovery [ -hV ] [ -d debug_level ] [ -P printlevel ] [ -I
10 iface -t type -p ip:port [ -l ] ] | [ -o operation ] [ -n name ] [ -v
11 value ]
12
13 iscsiadm -m node [ -hV ] [ -d debug_level ] [ -P printlevel ] [ -L
14 all,manual,automatic ] [ -U all,manual,automatic ] [ -S ] [ [ -T tar‐
15 getname -p ip:port -I iface ] [ -l | -u | -R | -s] ] [ [ -o operation ]
16 [ -n name ] [ -v value ] [ -p ip:port ] ]
17
18 iscsiadm -m session [ -hV ] [ -d debug_level ] [ -P printlevel ] [ -r
19 sessionid | sysfsdir [ -R ] [ -u | -s ] ]
20
21 iscsiadm -m iface [ -hV ] [ -d debug_level ] [ -P printlevel ] [ -I
22 ifacename ] [ [ -o operation ] [ -n name ] [ -v value ] ]
23
24
26 The iscsiadm utility is a command-line tool allowing discovery and
27 login to iSCSI targets, as well as access and management of the open-
28 iscsi database.
29
30 Open-iscsi does not use the term node as defined by the iSCSI RFC,
31 where a node is a single iSCSI initiator or target. Open-iscsi uses the
32 term node to refer to a portal on a target.
33
34 For session mode, a session id (sid) is used. The sid of a session can
35 be found by running iscsiadm -m session -P 1. The session id and sysfs
36 path are not currently persistent and is partially determined by when
37 the session is setup.
38
39
40 Note that many of the node and discovery operations require that the
41 iSCSI daemon (iscsid) be running.
42
43
45 -d, --debug=debug_level
46 print debugging information. Valid values for debug_level are 0
47 to 8.
48
49
50 -h, --help
51 display help text and exit
52
53
54 -I, --interface[iface]
55 The interface argument specifies the iSCSI interface to use for
56 the operation. iSCSI interfaces (iface) are defined in
57 /etc/iscsi/ifaces. For hardware or offload, the iface config
58 must have the hardware address (iface.hwaddress) and the
59 driver/transport_name (iface.transport_name). The iface's name
60 is then the filename of the iface config. For software iSCSI,
61 the iface config must have either the hardware address
62 (iface.hwaddress), or the network layer's interface name
63 (iface.net_ifacename), or the IP address of the NIC (iface.ipad‐
64 dress), and it must have the driver/transport_name (iface.trans‐
65 port_name). Note that for software iSCSI using specifying the IP
66 address does not bind the session through a specific NIC. We
67 allow the network layer to decide which NIC to use, but packets
68 from this host will use the address specific.
69
70 The available drivers/iscsi_transports are tcp (software iSCSI
71 over TCP/IP), iser (software iSCSI over infinniband), or qla4xxx
72 (Qlogic 4XXXX HBAs). The hwaddress is the MAC address or for
73 software iSCSI it may be the special value "default" which
74 directs the initiator to not bind the session to a specific
75 hardware resource and instead allow the network or infinniband
76 layer to decide what to do. There is no need to create a iface
77 config with the default behavior. If you do not specify a iface,
78 then the default behavior is used.
79
80 In discovery mode multiple interfaces can be specific by passing
81 in multiple -I/--interface instances. For example,
82
83 "iscsiadm -m discovery -t st -p mytarget -I iface0 -I iface2"
84
85 Will direct iscsiadm to setup the node db to create records
86 which will create sessions though the two intefaces passed in.
87
88 In node mode, only a single interface is supported in each call
89 to iscsiadm.
90
91 This option is valid for discovery, node and iface mode.
92
93
94
95 -l, --login
96 For node mode, login to a specified record. For discovery mode,
97 login to all discovered targets.
98
99 This option is only valid for discovery and node modes.
100
101
102 -L, --loginall==[all|manual|automatic]
103 For node mode, login all sessions with the node or conn startup
104 values passed in or all running sesssion, except ones marked
105 onboot, if all is passed in.
106
107 This option is only valid for node mode (it is valid but not
108 functional for session mode).
109
110
111
112 -m, --mode op
113 specify the mode. op must be one of discovery, node, or session.
114
115 If no other options are specified: for discovery and node, all
116 of their respective records are displayed; for session, all
117 active sessions and connections are displayed.
118
119
120 -n, --name=name
121 Specify a field name in a record. For use with the update opera‐
122 tor.
123
124 -o, --op=op
125 Specifies a database operator op. op must be one of new, delete,
126 update or show.
127
128 This option is only valid for all modes, but delete should not
129 be used on a running session.
130
131 new is currently valid only for node, session and iface mode. It
132 creates a new database record for a given portal (IP address and
133 port number).
134
135 delete deletes a specified recid.
136
137 update is currently valid only for node, session, and iface
138 mode. It updates a specified recid with name to the specified
139 value.
140
141 show is the default behaviour for node, discovery and iface
142 mode. It is also used when there are no commands passed into
143 session mode and a running sid is passed in. name and value are
144 currently ignored when used with show.
145
146
147 -p, --portal=ip[:port]
148 Use target portal with ip-address ip and port, the default port
149 value is 3260.
150
151 This option is only valid for discovery, or for node operations
152 with the new operator.
153
154 This should be used along with --target in node mode, to specify
155 what the open-iscsi docs refer to as a node or node record.
156 Note: open-iscsi's use of the word node, does not match the
157 iSCSI RFC's iSCSI Node term.
158
159
160 -P, --print=printlevel
161 If in node mode print nodes in tree format. If in session mode
162 print sessions in tree format. If in discovery mode print the
163 nodes in tree format.
164
165
166 -T, --targetname=targetname
167 Use target targetname.
168
169 This should be used along with --portal in node mode, to specify
170 what the open-iscsi docs refer to as a node or node record.
171 Note: open-iscsi's use of the word node, does not match the
172 iSCSI RFC's iSCSI Node term.
173
174
175 -r, --sid=sid | sysfsdir
176 Use session ID sid. The sid of a session can be found from run‐
177 ning iscsiadm in session mode with the --info argument.
178
179 Instead of sid, a sysfs path containing the session can be used.
180 For example using one of the following: /sys/devices/plat‐
181 form/hostH/sessionS/targetH:B:I/H:B:I:L, /sys/devices/plat‐
182 form/hostH/sessionS/targetH:B:I, or /sys/devices/plat‐
183 form/hostH/sessionS, for the sysfsdir argument would result in
184 the session with sid S to be used.
185
186 sid | sysfsdir is only required for session mode.
187
188
189 -R, --rescan
190 In session mode, if sid is also passed in rescan the session. If
191 no sid has been passed in rescan all running sessions.
192
193 In node mode, rescan a session running through the target, por‐
194 tal, iface tuple passed in.
195
196
197 -s, --stats
198 Display session statistics.
199
200
201 -S, --show
202 When displaying records, do not hide masked values, such as the
203 CHAP secret (password).
204
205 This option is only valid for node and session mode.
206
207
208 -t, --type=type
209 type must be sendtargets (or abbreviated as st), slp, or isns.
210 Currently only sendtargets and iSNS is supported, see the DIS‐
211 COVERY TYPES section.
212
213 This option is only valid for discovery mode.
214
215
216 -u, --logout
217 logout for a specified record.
218
219 This option is only valid for node and session mode.
220
221
222 -U, --logoutall==[all,manual,automatic]
223 logout all sessions with the node or conn startup values passed
224 in or all running sesssion, except ones marked onboot, if all is
225 passed in.
226
227 This option is only valid for node mode (it is valid but not
228 functional for session mode).
229
230
231 -v, --value=value
232 Specify a value for use with the update operator.
233
234 This option is only valid for node mode.
235
236
237 -V, --version
238 display version and exit
239
240
242 iSCSI defines 3 discovery types: SendTargets, SLP, and iSNS.
243
244
245 SendTargets
246 A native iSCSI protocol which allows each iSCSI target to send a
247 list of available targets to the initiator.
248
249
250 SLP Optionally an iSCSI target can use the Service Location Protocol
251 (SLP) to announce the available targets. The initiator can
252 either implement SLP queries directly or can use a separate tool
253 to acquire the information about available targets.
254
255
256 iSNS iSNS (Internet Storage Name Service) records information about
257 storage volumes within a larger network. To utilize iSNS, the
258 address of the iSNS server must be set in iscsid.conf using the
259 "isns.address" value, and iscsiadm must be run in discovery mode
260 with the "isns" discovery type.
261
262 iSNS support in open-iscsi is experimental. The iscsid.conf set‐
263 tings, iscsiadm syntax and node DB layout may change.
264
265
266 iscsiadm supports the iSNS (isns) or SendTargets (st) discovery type.
267 An SLP implementation is under development.
268
269
271 Discover targets at a given IP address:
272
273 iscsiadm --mode discovery --type sendtargets --portal 192.168.1.10
274
275 Login, must use a node record id found by the discovery:
276
277 iscsiadm --mode node --targetname iqn.2001-05.com.doe:test --portal 192.168.1.1:3260 --login
278
279 Logout:
280
281 iscsiadm --mode node --targetname iqn.2001-05.com.doe:test --portal 192.168.1.1:3260 --logout
282
283 List node records:
284
285 iscsiadm --mode node
286
287
288 Display all data for a given node record:
289
290 iscsiadm --mode node --targetname iqn.2001-05.com.doe:test --portal 192.168.1.1:3260
291
292
294 /etc/iscsi/iscsid.conf
295 The configuration file read by iscsid and iscsiadm on startup.
296
297 /etc/iscsi/initiatorname.iscsi
298 The file containing the iSCSI InitiatorName and InitiatorAlias
299 read by iscsid and iscsiadm on startup.
300
301 /etc/iscsi/nodes/
302 This directory contains the nodes with their targets.
303
304 /etc/iscsi/send_targets
305 This directory contains the portals.
306
307
309 iscsid(8)
310
311
313 Open-iSCSI project <http://www.open-iscsi.org/>
314 Alex Aizman <itn780@yahoo.com>
315 Dmitry Yusupov <dmitry_yus@yahoo.com>
316
317
318
319 Sep 2006 ISCSIADM(8)