1iscsiadm(1M) System Administration Commands iscsiadm(1M)
2
3
4
6 iscsiadm - enable management of iSCSI initiators
7
9 iscsiadm subcommand direct-object [options] [operand]
10
11
13 The iscsiadm command enables management of the iSCSI (Internet SCSI)
14 initiator on a host. iscsiadm is implemented as a set of subcommands,
15 many with their own options, which are described in the section for
16 that subcommand. Options not associated with a particular subcommand
17 are described under OPTIONS.
18
19
20 iscsiadm works only when the following service is online:
21
22 svc:/network/iscsi/initiator:default
23
24
25
26
27 The iscsiadm command supports the following subcommands, which are
28 described in detail in subsections that follow:
29
30 add Adds element(s) to an object.
31
32
33 list Lists element(s) of an object.
34
35
36 modify Modifies attributes of an object.
37
38
39 remove Removes an element from an object.
40
41
42
43 The iscsiadm subcommands operate on a direct-object. These are
44 described in the section for each subcommand.
45
46
47 The iscsiadm command supports the Internet Storage Name Service (iSNS)
48 for the discovery of iSCSI targets. The command supports the Challenge
49 Handshake Authentication Protocol (CHAP) for authentication.
50
51 add Subcommand
52 The syntax for the add subcommand is:
53
54 # iscsiadm add direct_object [operands...]
55
56
57
58 The add subcommand adds the following direct_objects:
59
60 discovery-address discovery-address [...]
61
62 Adds a target to a list of discovery addresses. A discovery address
63 (as in the syntax shown below) is an IP address:port combination
64 used in a SendTargets discovery session. Using this discovery
65 approach, a target device can inform an initiator of the target
66 address and target name of each target exposed by that device. Con‐
67 nection to a target is not attempted unless the SendTargets method
68 of discovery has been enabled on the host. You enable this method
69 with the modify subcommand.
70
71 The discovery-address parameter is formatted as:
72
73 <IP address>[:port]
74
75 If port is not specified, the default of 3260 will be used.
76
77
78 isns-server isns-server [...]
79
80 Add an iSNS server to the list of iSNS server addresses. An iSNS
81 server address (specified in the syntax shown below) is an IP
82 address-port combination used in an iSNS discovery session. By
83 using iSNS discovery, an iSNS server can provide an initiator with
84 information about a portal and the name of each target that belongs
85 to the same discovery domain as that of the initiator. Connection
86 to the iSNS server is not attempted unless the iSNS method of dis‐
87 covery has been enabled on the host. You enable this method with
88 the modify subcommand, described below.
89
90 The isns-server parameter is formatted as:
91
92 IP_address[:port]
93
94 If a port is not specified, the default of 3205 is used.
95
96
97 static-config static_target [...]
98
99 Adds a target to the list of statically configured targets. A con‐
100 nection to the target will not be attempted unless the static con‐
101 figuration method of discovery has been enabled.
102
103 The static_target parameter is formatted as:
104
105 <target-name>,<target address>[:port-number][,tpgt]
106
107 <target-name> can be up to 223 characters.
108
109
110 list Subcommand
111 The syntax for the list subcommand is:
112
113 # iscsiadm list direct-object [options]
114
115
116
117 The list subcommand displays data for the following direct-objects:
118
119 discovery
120
121 Lists the discovery methods and their current activation state,
122 enabled or disabled. Discovery methods are:
123
124 o iSNS (Internet Storage Name Service)
125
126 o Static
127
128 o SendTargets
129
130
131 initiator-node
132
133 Lists information for the initiator node on the host. The iSCSI
134 initiator node represents a logical HBA and is a logical host con‐
135 nection point for iSCSI targets. The parameter values listed in the
136 response are default parameter settings for the initiator. Each
137 connected target for an initiator can have parameter values that
138 differ from the parameter values on the initiator node.
139
140
141 static-config [static_target[, ...]]
142
143 Lists the target name and address for specified targets or, if no
144 static targets are specified, all statically discovered targets.
145
146
147 target [-S] [-v] [target[, ...]]
148
149 Lists a target's current parameters, connection state, and which
150 method was used for the target's discovery. Reports information for
151 specified targets or, if no targets are specified, all targets that
152 have been discovered or have had parameters modified by the modify
153 target subcommand.
154
155 When used with the -S option for a specified target, this subcom‐
156 mand returns:
157
158 o target name
159
160 o logical unit number
161
162 o vendor ID
163
164 o product ID
165
166 o OS device name (for example, /dev/rdsk/c0t2d0s0)
167 The -v options gives more details, such as the current login param‐
168 eters, the detailed connection information, and the discovery
169 method used to discover the target.
170
171 A return of NA as the discovery method parameter indicates that the
172 target was created with a iscsiadm modify target-param command and
173 does not exist as a discovered object. To remove such targets, use
174 iscsiadm remove target-param.
175
176
177 target-param [-v] target [...]
178
179 Lists a target's default and user-defined parameters.
180
181
182 discovery-address [-v] [discovery-address[, ...]]
183
184 Lists the discovery-address objects that have been added using the
185 iscsiadm add discovery-address subcommand.
186
187 When used with the -v option, lists all known targets at a speci‐
188 fied discovery-address. The -v option returns one or more target
189 names along with zero or more target addresses and associated tar‐
190 get portal group tags (TPGT), if applicable.
191
192
193 isns-server [-v] [isns-server[, ...]]
194
195 Lists the isns-server objects that have been added using the iscsi‐
196 adm add isns-server subcommand.
197
198 When used with the -v option, this subcommand lists all known tar‐
199 gets at a specified isns-server address. The -v option returns one
200 of more target names along with zero or more target addresses and
201 associated target portal group tags, if applicable.
202
203
204 modify Subcommand
205 The syntax for the modify subcommand is:
206
207 # iscsiadm modify direct_object [options]
208
209
210
211 The modify subcommand supports the following direct_objects:
212
213 discovery [options]
214
215 Enabling a discovery method initiates a discovery using that
216 method. Disabling a discovery method that is currently enabled does
217 not affect connections to any targets that have already been dis‐
218 covered by that method.
219
220 Options for modify discovery are as follows:
221
222 -i, -iSNS enable | disable
223
224 Enable or disable iSNS discovery.
225
226
227 -s, --static enable | disable
228
229 Enable or disable static discovery.
230
231
232 -t, --sendtargets enable | disable
233
234 Enable or disable SendTargets discovery.
235
236
237
238 initiator-node [options]
239
240 Modifies an initiator's properties. If a target is currently con‐
241 nected, this operation can succeed. However, the modified set of
242 parameters will not be in effect for that target until an existing
243 connection session no longer exists and a new connection has been
244 established. The options -C and --CHAP-secret require a CHAP secret
245 entry in response to a prompt.
246
247 For iSCSI booting when the Solaris I/O multipathing feature (for‐
248 merly known as Sun StorEdge Traffic Manager [STMS] or MPxIO) is
249 disabled, you can modify only the following initiator-node options:
250
251 o -r, --radius-server
252
253 o -R, --radius-access
254
255 o -P, --radius-shared-secret
256 For iSCSI booting when the Solaris I/O multipathing feature is
257 enabled, you can modify only the following initiator-node options:
258
259 o -h, --headerdigest
260
261 o -d, --datadigest
262
263 o -c, --configured-sessions
264 Options for modify initiator-node are as follows:
265
266 -A, --node-alias <initiator node alias>
267
268 Modifies the initiator node alias. Maximum length of 223 char‐
269 acters.
270
271
272 -a, --authentication chap | none
273
274 Sets the authentication mode.
275
276
277 -C, --CHAP-secret
278
279 Sets the CHAP secret value. There is no default value. Maximum
280 length is 16 characters; minimum required length is 12 charac‐
281 ters.
282
283
284 -c, --configured-sessions <num_sessions> | <IP address>[,<IP
285 address>...]
286
287 Sets the number of configured iSCSI sessions that will be cre‐
288 ated for each iSCSI target. The feature should be used in com‐
289 bination with the Solaris I/O multipathing feature described in
290 scsi_vhci(7D).
291
292
293 -d, --datadigest none | CRC32
294
295 Sets whether CRC32 is enabled to check SCSI data transfers.
296
297
298 -H, --CHAP-name CHAP name
299
300 Specifies a CHAP username. If you do not use this option, upon
301 initialization, the CHAP name is set to the initiator node
302 name. When the authentication method is set to CHAP (see
303 -a/--authentication option, above), the CHAP username is dis‐
304 played with the command iscsiadm list initiator-node.
305
306
307 -h, --headerdigest none | CRC32
308
309 Sets whether CRC32 is enabled to check SCSI packet headers.
310
311
312 -N, --node-name <initiator node name>
313
314 Modifies the initiator node name. Maximum of 223 characters.
315
316 Note -
317
318 During Solaris installation, the initiator node name is set
319 to a globally unique value. Changing this value can adversely
320 affect operation within the iSCSI network.
321
322
323 -P, --radius-shared-secret (exclusive)
324
325 Sets the RADIUS shared secret.
326
327
328 -R, --radius-access enable | disable
329
330 Sets whether a RADIUS server will be used.
331
332
333 -r, --radius-server <IP address>[:<port>]
334
335 Sets the IP address and port of the radius server to be used.
336
337
338 -T, --tunable-param <<tunable-prop>=<value>, ...>
339
340 Specify one or more tunable parameters for all targets that
341 initiator node connected.
342
343 Note -
344
345 These values should only be modified by an administrator with
346 a good working knowledge of the parameter's impact within the
347 iSCSI network.
348 Supported tunable-prop options are:
349
350 recv-login-rsp-timeout
351
352 Session Login Response Time
353
354 The recv-login-rsp-timeout option specifies how long iSCSI
355 initiator will wait for the response of iSCSI session login
356 request from the iSCSI target. Valid value is from 0 to
357 60*60, default to 60 seconds.
358
359
360 conn-login-max
361
362 Maximized Connection Retry Time
363
364 The conn-login-max option lets the iSCSI initiator reestab‐
365 lish the connection to the target in case of IO timeout or
366 connection failure during the given time window. Valid
367 value is from 0 to 60*60, default to 180 seconds.
368
369
370 polling-login-delay
371
372 Login Retry Time Interval
373
374 The polling-login-delay option specifies the time interval
375 between each login retry when iSCSI initiator to target IO
376 timeout or connection failure. Valid value is from 0 to
377 60*60, default to 60 seconds.
378
379
380
381
382 target-param [options] target
383
384 Modifies a target's parameters. If a target is currently connected,
385 the modify operation will succeed, although the modified settings
386 might not take effect for a few seconds. To confirm that these set‐
387 tings are active, use iscsiadm list target -v. If a specified tar‐
388 get is not associated with any discovery method, a target object is
389 created with the specified parameters. After using this command to
390 modify a target's parameters, the new parameters will persist until
391 they are modified or removed with a iscsiadm remove target-param
392 command on that target. The options -C and --CHAP-secret require a
393 CHAP secret entry in response to a prompt.
394
395 Options for modify target-param are as follows:
396
397 -B, --bi-directional-authentication enable | disable
398
399 Sets the bidirectional option. If set to enable, the initiator
400 performs bidirectional authentication for the specified target.
401
402
403 -C, --CHAP-secret
404
405 Sets the target's CHAP secret value. There is no default value.
406 Maximum acceptable length is 16 characters.
407
408
409 -c, --configured-sessions <num_sessions> | <IP address>[,<IP
410 address>...]
411
412 Sets the number of configured iSCSI sessions that will be cre‐
413 ated for each iSCSI target. The feature should be used in com‐
414 bination with the Solaris I/O multipathing feature described in
415 scsi_vhci(7D).
416
417
418 -d, --datadigest none | CRC32
419
420 Sets whether CRC32 is enabled or disabled for the data.
421
422
423 -H, --CHAP-name CHAP name
424
425 Sets a CHAP username. If you do not use this option, upon ini‐
426 tialization, the CHAP name is set to the target name. When the
427 authentication method is set to CHAP (see -a/--authentication
428 option, under the initiator-node direct object, above), the
429 CHAP username is displayed with the command iscsiadm list ini‐
430 tiator-node.
431
432
433 -h, --headerdigest none | CRC32
434
435 Sets whether CRC32 is enabled or disabled for the header.
436
437
438 -p, --login-param
439
440 Specify one or more login parameter settings.
441
442 Note -
443
444 These values should only be modified by an administrator with
445 a good working knowledge of the parameter's impact within the
446 iSCSI network.
447 The login parameters are derived from iSCSI proposed standard
448 RFC 3720. Valid values are:
449
450 dataseqinorder yes or no
451
452
453 defaulttime2retain 0-3600
454
455
456 defaulttime2wait 0-3600
457
458
459 firstburstlength 512 to 2^24-1
460
461
462 immediatedata yes or no
463
464
465 initialr2t yes or no
466
467
468 maxburstlength 512 to 2^24-1
469
470
471 datapduinorder yes or no
472
473
474 maxoutstandingr2t 1 to 65535
475
476
477 maxrecvdataseglen 512 to 2^24-1
478
479
480
481 -T, --tunable-param <<tunable-prop>=<value>, ...>
482
483 Specify one or more tunable parameters for all targets that
484 initiator node connected.
485
486 Note -
487
488 Tunable values should only be modified by an administrator
489 with a good working knowledge of the parameter's impact
490 within the iSCSI network.
491 Supported tunable-prop options are:
492
493 recv-login-rsp-timeout
494
495 Session Login Response Time
496
497 The recv-login-rsp-timeout option specifies how long iSCSI
498 initiator will wait for the response of iSCSI session login
499 request from the iSCSI target. Valid value is from 0 to
500 60*60, default to 60 seconds.
501
502
503 conn-login-max
504
505 Maximized Connection Retry Time
506
507 The conn-login-max option lets the iSCSI initiator reestab‐
508 lish the connection to the target in case of IO timeout or
509 connection failure during the given time window. Valid
510 value is from 0 to 60*60, default to 180 seconds.
511
512
513 polling-login-delay
514
515 Login Retry Time Interval
516
517 The polling-login-delay option specifies the time interval
518 between each login retry when iSCSI initiator to target IO
519 timeout or connection failure. Valid value is from 0 to
520 60*60, default to 60 seconds.
521
522
523
524
525 remove Subcommand
526 The syntax for the remove subcommand is:
527
528 # iscsiadm remove direct_object
529
530
531
532 The remove subcommand supports the following direct_objects:
533
534 discovery-address discovery-address, ...
535
536 Removes a target device from the list of discovery addresses. A
537 discovery address (as in the syntax shown below) is an IP address-
538 port combination used in a SendTargets discovery session. Using
539 this discovery approach, a target device can inform an initiator of
540 the target address and target name of each target exposed by that
541 device. If any target exposed by the discovery address is currently
542 mounted or there is active I/O on the device, an error of "logical
543 unit in use" is returned and the operation fails. If the associated
544 devices are not in use, they are removed.
545
546 discovery-address must be formatted as:
547
548 <IP address>[:<port>]
549
550 There are no options associated with this direct object.
551
552
553 isns-server isns-server, ...
554
555 Removes an iSNS server from the list of iSNS server addresses. An
556 iSNS server address (specified in the syntax shown below) is an IP
557 address-port combination used in an iSNS discovery session. By
558 using iSNS discovery, an iSNS server can provide an initiator with
559 information about a portal and the name of each target that belongs
560 to the same discovery domain as that of the initiator. If any tar‐
561 get discovered by means of iSNS is currently mounted or there is
562 active I/O on the device, an error of "logical unit in use" is
563 returned and the operation fails. If the associated devices are not
564 in use, they are removed.
565
566 isns-server must be formatted as:
567
568 IP_address[:port]
569
570 There are no options associated with this direct object.
571
572
573 static-config static_target, ...
574
575 Removes a target from the list of statically discovered targets. If
576 the target being removed is currently mounted or there is active
577 I/O on the device, an error of "logical unit in use" is returned
578 and the operation fails. If a device is not in use, it will be
579 removed.
580
581 static_target must be formatted as:
582
583 <target-name>,<target-address>[:port-number][,tpgt]
584
585 There are no options associated with this direct object.
586
587
588 target-param target-name
589
590 Removes target specified by target-name. The target name is format‐
591 ted as:
592
593 <target-name>
594
595 There are no options associated with this direct object. For iSCSI
596 booting when the Solaris I/O multipathing feature (formerly known
597 as Sun StorEdge Traffic Manager [STMS] or MPxIO) is enabled, you
598 cannot remove the target.
599
600
601 Proper Use of Discovery Methods
602 Do not configure a target to be discovered by both static and dynamic
603 discovery methods. The consequence of using redundant discovery methods
604 might be slow performance when communicating with the iSCSI target
605 device.
606
608 The following generic options are supported:
609
610 -V, --version Displays version information. Stops interpretation of
611 subsequent arguments.
612
613
614 -?, --help Displays help information. Can be used following an
615 iscsiadm command with no arguments, following a sub‐
616 command, or following a subcommand-direct object com‐
617 bination. Responds with help information appropriate
618 for your entry. For example, if you enter:
619
620 # iscsiadm modify initiator-node --help
621
622
623 ...iscsiadm responds with a display of the options
624 available for that combination of subcommand and
625 direct object.
626
627
629 Example 1 Adding a Discovery Address
630
631
632 The following command uses the add subcommand to add a discovery
633 address.
634
635
636 # iscsiadm add discovery-address 10.0.0.1:3260 10.0.0.2:3260
637
638
639
640 Example 2 Adding a Static Target
641
642
643 The following command uses the add subcommand to add a static target.
644
645
646 # iscsiadm add static-config \
647 iqn.1999-08.com.array:sn.01234567,10.0.0.1:3260
648
649
650
651 Example 3 Listing Current Discovery Settings
652
653
654 The following command uses the list subcommand to list current discov‐
655 ery settings.
656
657
658 # iscsiadm list discovery
659 Discovery:
660 Static: enabled
661 Send Targets: disabled
662 iSNS: enabled
663
664
665
666 Example 4 Obtaining Verbose Discovery Output
667
668
669 The following commands uses the -v option (one with, one without) with
670 the list subcommand to obtain verbose output.
671
672
673 # iscsiadm list discovery-address
674 Discovery Address: 10.0.0.1:3260
675 Discovery Address: 10.0.0.2:3260
676
677 # iscsiadm list discovery-address -v 10.0.0.1:3260
678 Discovery Address: 10.0.0.1:3260
679 Target name: eui.210000203787d1f7
680 Target address: 10.0.0.1:3260
681 Target name: eui.210000203787a693
682 Target address: 10.0.0.1:3260
683
684
685
686 Example 5 Displaying Information on the Initiator
687
688
689 The following command uses the list subcommand to display information
690 on the initiator.
691
692
693 # iscsiadm list initiator-node
694 Initiator node name: iqn.1986-03.com.company.central.interopv20-1
695 Initiator node alias: interopv20-1
696 Login Parameters (Default/Configured):
697 Header Digest: NONE/NONE
698 Data Digest: NONE/NONE
699 Authentication Type: CHAP
700 CHAP Name: iqn.1986-03.com.company.central.interopv20-1
701 RADIUS Server: NONE
702 RADIUS access: disabled
703 Tunable Parameters (Default/Configured):
704 Session Login Response Time: 60/-
705 Maximum Connection Retry Time: 180/-
706 Login Retry Time Interval: 60/-
707 Configured Sessions: 1
708
709
710
711 Example 6 Displaying Static Configuration Information
712
713
714 The following command uses the list subcommand to display information
715 about static configurations.
716
717
718 # iscsiadm list static-config
719 Static target: eui.210000203787a693,10.0.0.1:3260
720
721
722
723 Example 7 Displaying Target Information
724
725
726 The following commands show the use of the list subcommand with various
727 options to display information about targets.
728
729
730 # iscsiadm list target
731 Target: iqn.2004-05.com.abcStorage:Tgt-1
732 Alias: -
733 TPGT: 12288
734 ISID: 4000002a0000
735 Connections: 1# iscsiadm list target -v iqn.2004-05.com.abcStorage:Tgt-1
736 Target: iqn.2004-05.com.abcStorage:Tgt-1
737 Alias: -
738 TPGT: 12288
739 ISID: 4000002a0000
740 Connections: 1
741 CID: 0
742 IP address (Local): 10.4.52.158:32803
743 IP address (Peer): 10.4.49.70:3260
744 Discovery Method: SendTargets
745 Login Parameters (Negotiated):
746 Data Sequence In Order: yes
747 Data PDU In Order: yes
748 Default Time To Retain: 20
749 Default Time To Wait: 2
750 Error Recovery Level: 0
751 First Burst Length: 65536
752 Immediate Data: yes
753 Initial Ready To Transfer (R2T): yes
754 Max Burst Length: 262144
755 Max Outstanding R2T: 1
756 Max Receive Data Segment Length: 65536
757 Max Connections: 1
758 Header Digest: NONE
759 Data Digest: NONE
760 # iscsiadm list target -S iqn.2004-05.com.abcStorage:Tgt-1
761 Target: iqn.2004-05.com.abcStorage:Tgt-1
762 Alias: -
763 TPGT: 12288
764 ISID: 4000002a0000
765 Connections: 1
766 LUN: 6
767 Vendor: ABCStorage
768 Product: iSCSI Target
769 OS Device Name: /dev/rdsk/c3t1d0s2
770 LUN: 5
771 Vendor: ABCStorage
772 Product: iSCSI Target
773 OS Device Name: /dev/rdsk/c3t0d0s2
774
775
776
777 Example 8 Displaying Target Parameter Information
778
779
780 The following command uses the list subcommand to display target infor‐
781 mation for a specific target.
782
783
784 # iscsiadm list target-param -v iqn.2004-05.com.abcStorage:Tgt-1
785 Target: iqn.2004-05.com.abcStorage:Tgt-1
786 Alias: -
787 Bi-directional Authentication: disabled
788 Authentication Type: NONE
789 Login Parameters (Default/Configured):
790 Data Sequence In Order: yes/-
791 Data PDU In Order: yes/-
792 Default Time To Retain: 20/-
793 Default Time To Wait: 2/-
794 Error Recovery Level: 0/-
795 First Burst Length: 65536/-
796 Immediate Data: yes/-
797 Initial Ready To Transfer (R2T): yes/-
798 Max Burst Length: 262144/-
799 Max Outstanding R2T: 1/-
800 Max Receive Data Segment Length: 65536/-
801 Max Connections: 1/-
802 Header Digest: NONE/-
803 Data Digest: NONE/-
804 Tunable Parameters (Default/Configured):
805 Session Login Response Time: 60/-
806 Maximum Connection Retry Time: 180/-
807 Login Retry Time Interval: 60/-
808 Configured Sessions: 1
809
810
811
812 Example 9 Enabling Static Discovery Method
813
814
815 The following command uses the modify subcommand to enable the static
816 discovery method.
817
818
819 # iscsiadm modify discovery --static enable
820
821
822
823 Example 10 Setting the IP Address for the Radius Server
824
825
826 The following command uses the modify subcommand to set the IP address
827 for the radius server, which will be used for CHAP authentication.
828
829
830 # iscsiadm modify initiator --radius-server 10.0.0.1
831
832
833
834 Example 11 Setting the Node Name for Initiator
835
836
837 The following command uses the modify subcommand to set the node name
838 for the initiator node.
839
840
841 # iscsiadm modify initiator-node -N iqn.2004-10.com.SUN.host-1
842
843
844
845 Example 12 Changing Target Parameters
846
847
848 The following command uses the modify subcommand to change the target
849 parameters for a specified target.
850
851
852 # iscsiadm modify target-param -d none -h none eui.210000203787a693
853
854
855
856 Example 13 Removing a Discovery Address
857
858
859 The following command uses the remove subcommand to remove a discovery
860 address.
861
862
863 # iscsiadm remove discovery-address 10.0.0.1:3260
864
865
866
867 Example 14 Removing Target Parameters
868
869
870 The following command uses the remove subcommand to remove a set of
871 target parameters.
872
873
874 # iscsiadm remove target-param eui.210000203787a693
875
876
877
879 See attributes(5) for descriptions of the following attributes:
880
881
882
883
884 ┌─────────────────────────────┬─────────────────────────────┐
885 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
886 ├─────────────────────────────┼─────────────────────────────┤
887 │Availability │SUNWiscsiu │
888 ├─────────────────────────────┼─────────────────────────────┤
889 │Interface Stability │Committed │
890 └─────────────────────────────┴─────────────────────────────┘
891
893 attributes(5), iscsi(7D), scsi_vhci(7D)
894
895
896 System Administration Guide: Devices and File Systems
897
898
899
900SunOS 5.11 16 Jul 2009 iscsiadm(1M)