1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
|
'\" te
.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the
.\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH STMFADM 1M "Jul 30, 2009"
.SH NAME
stmfadm \- SCSI target mode framework command line interface
.SH SYNOPSIS
.LP
.nf
\fBstmfadm\fR \fBadd-hg-member\fR \fB-g\fR, \fB--group-name\fR \fIgroup-name\fR \fIgroup-member\fR...
.fi
.LP
.nf
\fBstmfadm\fR \fBadd-tg-member\fR \fB-g\fR, \fB--group-name\fR \fIgroup-name\fR \fIgroup-member\fR...
.fi
.LP
.nf
\fBstmfadm\fR \fBadd-view\fR [\fB-n\fR, \fB--lun\fR \fIlogical-unit-number\fR
\fB-t\fR, \fB--target-group\fR \fIgroup-name\fR \fB-h\fR, \fB--host-group\fR \fIgroup-name\fR] \fIlu-name\fR
.fi
.LP
.nf
\fBstmfadm\fR \fBcreate-hg\fR \fIgroup-name\fR
.fi
.LP
.nf
\fBstmfadm\fR \fBcreate-lu\fR [\fB-p\fR, \fB--lu-prop\fR \fIlogical-unit-property\fR=\fIval\fR
\fB-s\fR, \fB--size\fR \fIsize\fR] \fIlu-file\fR
.fi
.LP
.nf
\fBstmfadm\fR \fBcreate-tg\fR \fIgroup-name\fR
.fi
.LP
.nf
\fBstmfadm\fR \fBdelete-hg\fR \fIgroup-name\fR
.fi
.LP
.nf
\fBstmfadm\fR \fBdelete-lu\fR \fIlu-name\fR
.fi
.LP
.nf
\fBstmfadm\fR \fBdelete-tg\fR \fIgroup-name\fR
.fi
.LP
.nf
\fBstmfadm\fR \fBimport-lu\fR \fIlu-file\fR
.fi
.LP
.nf
\fBstmfadm\fR \fBlist-hg\fR [\fB-v\fR] [\fIhost-group-name\fR...]
.fi
.LP
.nf
\fBstmfadm\fR \fBlist-tg\fR [\fB-v\fR] [\fItarget-group-name\fR...]
.fi
.LP
.nf
\fBstmfadm\fR \fBlist-lu\fR [\fB-v\fR] [\fIlu-name\fR...]
.fi
.LP
.nf
\fBstmfadm\fR \fBlist-target\fR [\fB-v\fR] [\fItarget-name\fR...]
.fi
.LP
.nf
\fBstmfadm\fR \fBlist-view\fR \fB-l\fR, \fB--lu-name\fR \fIlu-name\fR [\fIentry-name\fR...]
.fi
.LP
.nf
\fBstmfadm\fR \fBlist-state\fR
.fi
.LP
.nf
\fBstmfadm\fR \fBmodify-lu\fR [\fB-p\fR, \fB--lu-prop\fR \fIlogical-unit-property\fR=\fIval\fR
\fB-s\fR, \fB--size\fR \fIsize\fR, \fB-f\fR, \fB--file\fR] \fIlu-name\fR|\fIlu-file\fR
.fi
.LP
.nf
\fBstmfadm\fR \fBonline-lu\fR \fIlu-name\fR
.fi
.LP
.nf
\fBstmfadm\fR \fBoffline-lu\fR \fIlu-name\fR
.fi
.LP
.nf
\fBstmfadm\fR \fBonline-lu\fR \fItarget-name\fR
.fi
.LP
.nf
\fBstmfadm\fR \fBoffline-lu\fR \fItarget-name\fR
.fi
.LP
.nf
\fBstmfadm\fR \fBremove-hg-member\fR \fB-g\fR, \fB--group-name\fR \fIgroup-name\fR \fIgroup-member\fR...
.fi
.LP
.nf
\fBstmfadm\fR \fBremove-tg-member\fR \fB-g\fR, \fB--group-name\fR \fIgroup-name\fR \fIgroup-member\fR...
.fi
.LP
.nf
\fBstmfadm\fR \fBremove-view\fR \fB-l\fR, \fB--lu-name\fR \fIlu-name\fR \fIentry-name\fR
.fi
.SH DESCRIPTION
.sp
.LP
The \fBstmfadm\fR command configures logical units within the SCSI Target Mode
Framework (STMF) framework. The framework and this man page use the following
terminology:
.sp
.ne 2
.na
\fB\fBinitiator\fR\fR
.ad
.sp .6
.RS 4n
A device responsible for issuing SCSI I/O commands to a SCSI target and logical
unit.
.RE
.sp
.ne 2
.na
\fB\fBtarget\fR\fR
.ad
.sp .6
.RS 4n
A device responsible for receiving SCSI I/O commands for a logical unit.
.RE
.sp
.ne 2
.na
\fB\fBlogical unit\fR\fR
.ad
.sp .6
.RS 4n
A device within a target responsible for executing SCSI I/O commands.
.RE
.sp
.ne 2
.na
\fB\fBlogical unit number\fR\fR
.ad
.sp .6
.RS 4n
The identifier of a logical unit within a target.
.RE
.sp
.ne 2
.na
\fB\fBinitiator group\fR\fR
.ad
.sp .6
.RS 4n
An initiator group is a set of one or more initiators that are combined for the
purposes of being applied to a \fBview\fR (see below). An initiator cannot be a
member of more than one initiator group.
.RE
.sp
.ne 2
.na
\fB\fBtarget group\fR\fR
.ad
.sp .6
.RS 4n
A target group is a set of one or more SCSI target ports that are treated the
same when creating a \fBview\fR (see below). The set of logical units that a
particular SCSI initiator can see is determined by the combined set of views.
.sp
Each logical unit has a set of view entries, and each view entry specifies a
target group, host group, and a LUN. An initiator from that host group, when
connecting through that target group, is able to identify and connect to that
logical unit using the specified LUN. You can use views to restrict the set of
logical units that a specific initiator can see, and assign the set of LUNs
that will be used.
.RE
.sp
.ne 2
.na
\fB\fBview\fR\fR
.ad
.sp .6
.RS 4n
A view defines the association of an initiator group, a target group, and a
logical unit number with a specified logical unit. Any view entry added to a
logical unit must not be in conflict with existing view entries for that
logical unit. A view entry is considered to be in conflict when an attempt is
made to duplicate the association of any given initiator, target and logical
unit number. As an example, logical unit \fBLU_0\fR has the following view
entry associated with it:
.sp
.in +2
.nf
Logical Unit: LU_0
View Entry: 0
initiator group: HostA
target group: All targets
logical unit number: 32
.fi
.in -2
.sp
If you attempted the following:
.sp
.in +2
.nf
# \fBstmf add-view -n 31 -h HostA LU_0\fR
.fi
.in -2
.sp
\&...the operation would return an error with a message indicating that the
view entry is in conflict with one or more existing view entries. This conflict
arises because the existing view entry, \fB0\fR, already has mapped \fBLU_0\fR
to logical unit number 32 for the initiator group \fBHostA\fR.
.RE
.SH SUB-COMMANDS
.sp
.LP
The \fBstmfadm\fR command supports the subcommands listed below.
.sp
.ne 2
.na
\fB\fBadd-view\fR [\fB-n\fR, \fB--lun\fR \fIlogical-unit-number\fR \fB-t\fR,
\fB--target-group\fR \fIgroup-name\fR \fB-h\fR, \fB--host-group\fR
\fIgroup-name\fR] \fIlu-name\fR\fR
.ad
.sp .6
.RS 4n
Adds a logical unit view entry to a logical unit \fIlu-name\fR, where
\fIlu-name\fR is the STMF name for the logical unit as displayed by the
\fBlist-lu\fR subcommand. The \fBadd-view\fR subcommand provides the user with
a mechanism to implement access control for a logical unit and also provides a
means of assigning a logical unit number to a logical unit for a given set of
initiators and targets. A logical unit will not be available to any initiators
until at least one view is applied. Each view entry gets assigned an entry
name, which can be used to reference the entry in the \fBremove-view\fR and
\fBlist-view\fR subcommands.
.sp
\fBadd-view\fR supports the following options:
.sp
.ne 2
.na
\fB\fB-n\fR, \fB--lun\fR \fIlogical-unit-number\fR\fR
.ad
.sp .6
.RS 4n
\fIlogical-unit-number\fR is an integer in the range 0-16383 to be assigned to
the logical unit for this view entry. If this option is not specified, a
logical unit number will be assigned by the STMF framework.
.RE
.sp
.ne 2
.na
\fB\fB-t\fR, \fB--target-group\fR \fIgroup-name\fR\fR
.ad
.sp .6
.RS 4n
\fIgroup-name\fR is the name of a target group previously created using the
STMF \fBcreate-tg\fR subcommand. If this option is not specified, the logical
unit will be available through all targets.
.RE
.sp
.ne 2
.na
\fB\fB-h\fR, \fB-host-group\fR \fIgroup-name\fR\fR
.ad
.sp .6
.RS 4n
\fIgroup-name\fR is the name of an host group previously created using the STMF
\fBcreate-hg\fR subcommand. If this option is not specified, the logical unit
will be available to all initiators that log in to the STMF framework.
.RE
.RE
.sp
.ne 2
.na
\fB\fBadd-hg-member\fR \fB-g\fR \fIgroup-name\fR \fIgroup member\fR...\fR
.ad
.sp .6
.RS 4n
Add a host group member to a host group. \fIgroup-name\fR must be an existing
group created using the \fBcreate-hg\fR subcommand. \fIgroup member\fR can be
specified as \fIname_type\fR.\fIname_value\fR, where \fIname_type\fR can be one
of the following:
.sp
.in +2
.nf
wwn
iqn
eui
.fi
.in -2
.sp
\&...and \fIname_value\fR is the value of the initiator name. As an example, to
add a fibre channel initiator port world-wide name \fB200000e08b909221\fR to
the host group \fBHostA\fR, the command would be:
.sp
.in +2
.nf
# \fBstmfadm add-hg-member -g HostA wwn.200000e08b909221\fR
.fi
.in -2
.sp
To add an ISCSI initiator node member with the name
\fBiqn.1986-03.com.sun:01.46f7e262\fR to \fBHostA\fR, the command would be:
.sp
.in +2
.nf
# \fBstmfadm add-hg-member -g HostA iqn.1986-03.com.sun:01.46f7e262\fR
.fi
.in -2
.sp
Alternatively, members can be specified using their SCSI name string
identifiers. To add the two initiators above using their SCSI name string
identifiers, the commands would be:
.sp
.in +2
.nf
# \fBstmfadm add-hg-member -g HostA eui.200000e08b909221\fR
# \fBstmfadm add-hg-member -g HostA iqn.1986-03.com.sun:01.46f7e262\fR
.fi
.in -2
.sp
A host group member cannot be a member of more than one host group.
.RE
.sp
.ne 2
.na
\fB\fBadd-tg-member\fR \fB-g\fR \fIgroup-name\fR \fIgroup member\fR...\fR
.ad
.sp .6
.RS 4n
Add a target group member to a target group. \fIgroup-name\fR must be an
existing group created using the \fBcreate-tg\fR subcommand. \fIgroup member\fR
can be specified as \fIname_type\fR.\fIname_value\fR, where \fIname_type\fR can
be one of the following:
.sp
.in +2
.nf
wwn
iqn
eui
.fi
.in -2
.sp
\&...and \fIname_value\fR is the value of the target name. As an example, to
add a fibre channel target port world-wide name \fB501000e092376af7\fR to the
target group \fBTG0\fR, the command would be:
.sp
.in +2
.nf
# \fBstmfadm add-tg-member -g TG0 wwn.501000e092376af7\fR
.fi
.in -2
.sp
To add an ISCSI target member with the name
\fBiqn.1986-03.com.sun:target.01.01110\fR to \fBTG0\fR, the command would be:
.sp
.in +2
.nf
# \fBstmfadm add-tg-member -g TG0 iqn.1986-03.com.sun:target.01.01110\fR
.fi
.in -2
.sp
Alternatively, members can be specified using their SCSI name string
identifiers. To add the two targets above using their SCSI name string
identifiers, the commands would be:
.sp
.in +2
.nf
# \fBstmfadm add-tg-member -g TG0 eui.501000e092376af7\fR
# \fBstmfadm add-tg-member -g TG0 iqn.1986-03.com.sun:target.01.01110\fR
.fi
.in -2
.sp
A target group member cannot be a member of more than one target group.
.RE
.sp
.ne 2
.na
\fB\fBcreate-hg\fR \fIgroup-name\fR\fR
.ad
.sp .6
.RS 4n
Create an initiator group with the name \fIgroup-name\fR. \fIgroup-name\fR is a
string of Unicode characters with a maximum length of 255. The group name must
be unique within the STMF system.
.RE
.sp
.ne 2
.na
\fB\fBcreate-lu\fR [\fB-p\fR, \fB--lu-prop\fR
\fIlogical-unit-property\fR=\fIval\fR \fB--s\fR, \fB--size\fR \fIsize\fR]
\fIlu-file\fR\fR
.ad
.sp .6
.RS 4n
Create a logical unit that can be registered with STMF. For the \fB-p\fR
option, \fIlogical-unit-property\fR can be one of the following properties:
.sp
.ne 2
.na
\fB\fBalias\fR\fR
.ad
.sp .6
.RS 4n
Up to 255 characters, representing a user-defined name for the device. The
default is the name of the backing store.
.RE
.sp
.ne 2
.na
\fB\fBblk\fR\fR
.ad
.sp .6
.RS 4n
Specifies the block size for the device. The default is 512.
.RE
.sp
.ne 2
.na
\fB\fBguid\fR\fR
.ad
.sp .6
.RS 4n
Thirty-two hexadecimal ASCII characters representing a valid NAA Registered
Extended Identifier. The default is set by the STMF to a generated value.
.RE
.sp
.ne 2
.na
\fB\fBmeta\fR\fR
.ad
.sp .6
.RS 4n
Metadata file name. When specified, will be used to hold the SCSI metadata for
the logical unit. There is no default.
.RE
.sp
.ne 2
.na
\fB\fBmgmt-url\fR\fR
.ad
.sp .6
.RS 4n
Up to 1024 characters representing a Management Network Address URL. More than
one URL can be passed as a single parameter by using space-delimited URLs
enclosed inside a single pair of quotation marks (\fB"\fR).
.RE
.sp
.ne 2
.na
\fB\fBoui\fR\fR
.ad
.sp .6
.RS 4n
Organizational Unique Identifier. Six hexadecimal ASCII characters representing
the IEEE OUI company ID assignment. This will be used to generate the device
identifier (GUID). The default is \fB00144F\fR.
.RE
.sp
.ne 2
.na
\fB\fBpid\fR\fR
.ad
.sp .6
.RS 4n
Sixteen characters of product identification SCSI SPC-3. This value will be
reflected in the Standard \fBINQUIRY\fR data returned for the device. The
default is \fBCOMSTAR\fR.
.RE
.sp
.ne 2
.na
\fB\fBserial\fR\fR
.ad
.sp .6
.RS 4n
Serial Number. Specifies the SCSI Vital Product Data Serial Number (page
\fB80h\fR). It is a character value up to 252 bytes in length. There is no
default value.
.RE
.sp
.ne 2
.na
\fB\fBvid\fR\fR
.ad
.sp .6
.RS 4n
Eight characters of vendor identification per SCSI SPC-3. This value will be
reflected in the Standard \fBINQUIRY\fR data returned for the device. The
default is \fBSUN\fR.
.RE
.sp
.ne 2
.na
\fB\fBwcd\fR\fR
.ad
.sp .6
.RS 4n
Write-back cache disable. Specify \fBtrue\fR or \fBfalse\fRto determine
write-back cache disable behavior. The default is the write-back cache setting
of the backing store device specified by the \fIlu-file\fR argument.
.RE
.sp
.ne 2
.na
\fB\fBwp\fR\fR
.ad
.sp .6
.RS 4n
Write-protect bit. Specify \fBtrue\fR or \fBfalse\fR to determine whether the
device reports as write-protected. The default is \fBfalse\fR.
.RE
For the \fB-s\fR option, \fIsize\fR is an integer followed by one of the
following letters, to indicate a unit of size:
.sp
.ne 2
.na
\fB\fBk\fR\fR
.ad
.RS 5n
kilobyte
.RE
.sp
.ne 2
.na
\fB\fBm\fR\fR
.ad
.RS 5n
megabyte
.RE
.sp
.ne 2
.na
\fB\fBg\fR\fR
.ad
.RS 5n
gigabyte
.RE
.sp
.ne 2
.na
\fB\fBt\fR\fR
.ad
.RS 5n
terabyte
.RE
.sp
.ne 2
.na
\fB\fBp\fR\fR
.ad
.RS 5n
petabyte
.RE
.sp
.ne 2
.na
\fB\fBe\fR\fR
.ad
.RS 5n
exabyte
.RE
\fIlu-file\fR is the file to be used as the backing store for the logical unit.
If the \fB-s\fR option is not specified, the size of the specified
\fIlu-file\fR will be used as the size of the logical unit. Logical units
registered with the STMF require space for the metadata to be stored. When a
\fBzvol\fR is specified as the backing store device, the default will be to use
a special property of the \fBzvol\fR to contain the metadata. For all other
devices, the default behavior will be to use the first 64k of the device. An
alternative approach would be to use the \fBmeta\fR property in a
\fBcreate-lu\fR command to specify an alternate file to contain the metadata.
It is advisable to use a file that can provide sufficient storage of the
logical unit metadata, preferably 64k.
.RE
.sp
.ne 2
.na
\fB\fBcreate-tg\fR \fIgroup-name\fR\fR
.ad
.sp .6
.RS 4n
Create a target group with the name \fIgroup-name\fR. \fIgroup-name\fR is a
string of Unicode characters with a maximum length of 255. The group name must
be unique within the STMF system.
.RE
.sp
.ne 2
.na
\fB\fBdelete-hg\fR \fIgroup-name\fR\fR
.ad
.sp .6
.RS 4n
Delete the host group that identified by \fIgroup-name\fR.
.RE
.sp
.ne 2
.na
\fB\fBdelete-lu\fR \fIlu-name\fR\fR
.ad
.sp .6
.RS 4n
Deletes an existing logical unit that was created using \fBstmfadm
create-lu\fR. This effectively unloads the logical unit from the STMF
framework. Any existing data on the logical unit remains intact.
.RE
.sp
.ne 2
.na
\fB\fBdelete-tg\fR \fIgroup-name\fR\fR
.ad
.sp .6
.RS 4n
Delete the target group that identified by \fIgroup-name\fR.
.RE
.sp
.ne 2
.na
\fB\fBimport-lu\fR \fIlu-file\fR\fR
.ad
.sp .6
.RS 4n
Imports and loads a logical unit into the STMF that was previously created
using \fBstmfadm create-lu\fR and was then deleted from the STMF using
\fBstmfadm delete-lu\fR. On success, the logical unit is again made available
to the STMF. \fIlu-file\fR is the filename used in the \fBstmfadm create-lu\fR
command. If this logical unit is using a separate metadata file, the filename
in the \fBmeta\fR property value that was used in the \fBstmfadm create-lu\fR
command must be used here.
.RE
.sp
.ne 2
.na
\fB\fBlist-hg\fR [\fB-v\fR,\fB--verbose\fR] [\fIhost-group-name\fR...]\fR
.ad
.sp .6
.RS 4n
Lists information for the host group in the system referenced by
\fIhost-group-name\fR. If \fIhost-group-name\fR is not specified, all host
groups in the system will be listed. If the \fB--v\fR or \fB--verbose\fR option
is specified, all members within a host group are displayed.
.RE
.sp
.ne 2
.na
\fB\fBlist-lu\fR [\fB-v\fR,\fB--verbose\fR] [\fIlu-name\fR...]\fR
.ad
.sp .6
.RS 4n
Lists information for the logical unit in the system referenced by
\fIlu-name\fR. If \fIlu-name\fR is not specified, all logical units in the
system will be listed. If the \fB-v\fR or \fB--verbose\fR option is specified,
additional information about the logical unit will be displayed.
.RE
.sp
.ne 2
.na
\fB\fBlist-target\fR [\fB-v\fR,\fB--verbose\fR] [\fItarget-name\fR...]\fR
.ad
.sp .6
.RS 4n
Lists information for the target port in the system referenced by
\fItarget-name\fR. If target name is not specified, all target ports in the
system will be listed. If the \fB-v\fR or \fB--verbose\fR option is specified,
additional information about the target along with SCSI session information for
logged-in initiators is displayed.
.RE
.sp
.ne 2
.na
\fB\fBlist-tg\fR [\fB-v\fR,\fB--verbose\fR] [\fItarget-group-name\fR...]\fR
.ad
.sp .6
.RS 4n
Lists information for the target group in the system referenced by
\fItarget-group-name\fR. If \fItarget-group-name\fR is not specified, all
target groups in the system will be listed. If the \fB--v\fR or \fB--verbose\fR
option is specified, all members within a target group are displayed.
.RE
.sp
.ne 2
.na
\fB\fBlist-view\fR \fB--l\fR, \fB--lu-name\fR \fIlu-name\fR
[\fIentry-name\fR...]\fR
.ad
.sp .6
.RS 4n
Lists the view entry for the logical unit referenced by \fIlu-name\fR. If
\fIentry-name\fR is not specified, all view entries for the specified logical
unit will be listed.
.RE
.sp
.ne 2
.na
\fB\fBmodify-lu\fR [\fB-p\fR, \fB--lu-prop\fR
\fIlogical-unit-property\fR=\fIval\fR \fB--s\fR, \fB--size\fR \fIsize\fR,
\fB-f\fR, \fB--file\fR] \fIlu-name\fR|\fIlu-file\fR\fR
.ad
.sp .6
.RS 4n
Modifies attributes of a logical unit created using the \fBstmfadm create-lu\fR
command. For the \fB-p\fR option, \fIlogical-unit-property\fR can be one of the
following properties:
.sp
.ne 2
.na
\fB\fBalias\fR\fR
.ad
.sp .6
.RS 4n
Up to 255 characters, representing a user-defined name for the device. The
default is the name of the backing store.
.RE
.sp
.ne 2
.na
\fB\fBmgmt-url\fR\fR
.ad
.sp .6
.RS 4n
Up to 1024 characters representing a Management Network Address URL. More than
one URL can be passed as a single parameter by using space-delimited URLs
enclosed inside a single pair of quotation marks (\fB"\fR).
.RE
.sp
.ne 2
.na
\fB\fBwcd\fR\fR
.ad
.sp .6
.RS 4n
Write-back cache disable. Specify \fBtrue\fR or \fBfalse\fRto determine
write-back cache disable behavior. The default is the write-back cache setting
of the backing store device specified by the \fIlu-file\fR argument.
.RE
.sp
.ne 2
.na
\fB\fBwp\fR\fR
.ad
.sp .6
.RS 4n
Write-protect bit. Specify \fBtrue\fR or \fBfalse\fR to determine whether the
device reports as write-protected. The default is \fBfalse\fR.
.RE
For the \fB-s\fR option, \fIsize\fR is an integer followed by one of the
following letters, to indicate a unit of size:
.sp
.ne 2
.na
\fB\fBk\fR\fR
.ad
.RS 5n
kilobyte
.RE
.sp
.ne 2
.na
\fB\fBm\fR\fR
.ad
.RS 5n
megabyte
.RE
.sp
.ne 2
.na
\fB\fBg\fR\fR
.ad
.RS 5n
gigabyte
.RE
.sp
.ne 2
.na
\fB\fBt\fR\fR
.ad
.RS 5n
terabyte
.RE
.sp
.ne 2
.na
\fB\fBp\fR\fR
.ad
.RS 5n
petabyte
.RE
.sp
.ne 2
.na
\fB\fBe\fR\fR
.ad
.RS 5n
exabyte
.RE
\fIlu-name\fR is the \fBguid\fR of the logical unit to be modified. If the
\fB-f\fR option is specified, the operand is interpreted as a file name. This
provides the ability to modify a logical unit that is not currently imported
into the STMF.
.RE
.sp
.ne 2
.na
\fB\fBonline-lu\fR \fIlu-name\fR\fR
.ad
.sp .6
.RS 4n
Online a logical unit currently registered with the STMF.
.RE
.sp
.ne 2
.na
\fB\fBonline-target\fR \fItarget-name\fR\fR
.ad
.sp .6
.RS 4n
Online the specified target.
.RE
.sp
.ne 2
.na
\fB\fBoffline-lu\fR \fIlu-name\fR\fR
.ad
.sp .6
.RS 4n
Offline a logical unit currently registered with the STMF.
.RE
.sp
.ne 2
.na
\fB\fBoffline-target\fR \fItarget-name\fR\fR
.ad
.sp .6
.RS 4n
Online the specified target.
.RE
.sp
.ne 2
.na
\fB\fBlist-state\fR\fR
.ad
.sp .6
.RS 4n
Lists the operational and configuration state of the STMF.
.RE
.sp
.ne 2
.na
\fB\fBremove-hg-member\fR \fB-g\fR \fIgroup-name\fR \fIgroup member\fR\fR
.ad
.sp .6
.RS 4n
Removes a host group member from a host group. \fIgroup-name\fR must be an
existing group created using the \fBcreate-hg\fR subcommand. \fIgroup member\fR
can be specified as \fIname_type\fR.\fIname_value\fR, where \fIname_type\fR can
be one of the following:
.sp
.in +2
.nf
wwn
iqn
eui
.fi
.in -2
.sp
\&...and \fIname_value\fR is the value of the initiator name. As an example, to
remove the fibre channel initiator port world-wide name \fB200000e08b909221\fR
from the host group \fBHostA\fR, the command would be:
.sp
.in +2
.nf
# \fBstmfadm remove-hg-member -g HostA wwn.200000e08b909221\fR
.fi
.in -2
.sp
To remove the ISCSI initiator node member with the name
\fBiqn.1986-03.com.sun:01.46f7e262\fR from \fBHostA\fR, the command would be:
.sp
.in +2
.nf
# \fBstmfadm remove-hg-member -g HostA iqn.1986-03.com.sun:01.46f7e262\fR
.fi
.in -2
.sp
Alternatively, members can be specified using their SCSI name string
identifiers. To remove the two initiators above using their SCSI name string
identifiers, the commands would be:
.sp
.in +2
.nf
# \fBstmfadm remove-hg-member -g HostA eui.200000e08b909221\fR
# \fBstmfadm remove-hg-member -g HostA iqn.1986-03.com.sun:01.46f7e262\fR
.fi
.in -2
.sp
.RE
.sp
.ne 2
.na
\fB\fBremove-tg-member\fR \fB-g\fR \fIgroup-name\fR \fIgroup member\fR\fR
.ad
.sp .6
.RS 4n
Removes a target group member from a target group. \fIgroup-name\fR must be an
existing group created using the \fBcreate-tg\fR subcommand. \fIgroup member\fR
can be specified as \fIname_type\fR.\fIname_value\fR, where \fIname_type\fR can
be one of the following:
.sp
.in +2
.nf
wwn
iqn
eui
.fi
.in -2
.sp
\&...and \fIname_value\fR is the value of the target name. As an example, to
remove the fibre channel target port world-wide name \fB501000e092376af7\fR
from the target group \fBTG0\fR, the command would be:
.sp
.in +2
.nf
# \fBstmfadm remove-tg-member -g TG0 wwn.501000e092376af7\fR
.fi
.in -2
.sp
To remove the ISCSI target member with the name
\fBiqn.1986-03.com.sun:target.01.01110\fR from \fBTG0\fR, the command would be:
.sp
.in +2
.nf
# \fBstmfadm remove-tg-member -g TG0 iqn.1986-03.com.sun:target.01.01110\fR
.fi
.in -2
.sp
Alternatively, members can be specified using their SCSI name string
identifiers. To remove the two targets above using their SCSI name string
identifiers, the commands would be:
.sp
.in +2
.nf
# \fBstmfadm remove-tg-member -g TG0 eui.501000e092376af7\fR
# \fBstmfadm remove-tg-member -g TG0 iqn.1986-03.com.sun:target.01.01110\fR
.fi
.in -2
.sp
.RE
.sp
.ne 2
.na
\fB\fBremove-view\fR \fB--l\fR, \fB--lu-name\fR \fIlu-name\fR
\fIentry-name\fR\fR
.ad
.sp .6
.RS 4n
Removes one or more logical unit view entries from a logical unit.
.RE
.SH EXAMPLES
.LP
\fBExample 1 \fRCreating a Host group with Two Initiator Ports
.sp
.LP
The following commands use the \fBcreate-hg\fR and \fBadd-hg-member\fR
subcommands to create a host group and add two initiator ports to that host
group.
.sp
.in +2
.nf
# \fBstmfadm create-hg host-group-a\fR
# \fBstmfadm add-hg-member -g host-group-a wwn.210105b0000d92d0\fR
.fi
.in -2
.sp
.LP
\fBExample 2 \fRAdding a View Entry to a Logical Unit
.sp
.LP
The following command uses the \fBadd-view\fR subcommand to allow access from
\fBhost-group-a\fR to a logical unit.
.sp
.in +2
.nf
# \fBstmfadm add-view -h host-group-a 6000AE40C5000000000046FC4FEA001C\fR
.fi
.in -2
.sp
.LP
\fBExample 3 \fRListing a View Entry
.sp
.LP
The following command uses the \fBlist-view\fR subcommand to list all view
entries for the specified logical unit.
.sp
.in +2
.nf
# \fBstmfadm list-view -l 6000AE40C5000000000046FC4FEA001C\fR
View Entry: 0
Host group : host-group-a
Target group : All
LUN : 0
.fi
.in -2
.sp
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE ATTRIBUTE VALUE
_
Interface Stability Committed
.TE
.SH SEE ALSO
.sp
.LP
\fBsbdadm\fR(1M), \fBattributes\fR(5)
|