xref: /illumos-gate/usr/src/man/man8/stmfadm.8 (revision bbf215553c7233fbab8a0afdf1fac74c44781867)
1*bbf21555SRichard Lowe.\"
2*bbf21555SRichard Lowe.\" The contents of this file are subject to the terms of the
3*bbf21555SRichard Lowe.\" Common Development and Distribution License (the "License").
4*bbf21555SRichard Lowe.\" You may not use this file except in compliance with the License.
5*bbf21555SRichard Lowe.\"
6*bbf21555SRichard Lowe.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7*bbf21555SRichard Lowe.\" or http://www.opensolaris.org/os/licensing.
8*bbf21555SRichard Lowe.\" See the License for the specific language governing permissions
9*bbf21555SRichard Lowe.\" and limitations under the License.
10*bbf21555SRichard Lowe.\"
11*bbf21555SRichard Lowe.\" When distributing Covered Code, include this CDDL HEADER in each
12*bbf21555SRichard Lowe.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
13*bbf21555SRichard Lowe.\" If applicable, add the following below this CDDL HEADER, with the
14*bbf21555SRichard Lowe.\" fields enclosed by brackets "[]" replaced with your own identifying
15*bbf21555SRichard Lowe.\" information: Portions Copyright [yyyy] [name of copyright owner]
16*bbf21555SRichard Lowe.\"
17*bbf21555SRichard Lowe.\"
18*bbf21555SRichard Lowe.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
19*bbf21555SRichard Lowe.\" Copyright 2017 Nexenta Systems, Inc.
20*bbf21555SRichard Lowe.\"
21*bbf21555SRichard Lowe.Dd March 1, 2016
22*bbf21555SRichard Lowe.Dt STMFADM 8
23*bbf21555SRichard Lowe.Os
24*bbf21555SRichard Lowe.Sh NAME
25*bbf21555SRichard Lowe.Nm stmfadm
26*bbf21555SRichard Lowe.Nd SCSI target mode framework command line interface
27*bbf21555SRichard Lowe.Sh SYNOPSIS
28*bbf21555SRichard Lowe.Nm
29*bbf21555SRichard Lowe.Cm add-hg-member
30*bbf21555SRichard Lowe.Fl g Ar host-group
31*bbf21555SRichard Lowe.Ar initiator Ns ...
32*bbf21555SRichard Lowe.Nm
33*bbf21555SRichard Lowe.Cm add-tg-member
34*bbf21555SRichard Lowe.Fl g Ar target-group
35*bbf21555SRichard Lowe.Ar target Ns ...
36*bbf21555SRichard Lowe.Nm
37*bbf21555SRichard Lowe.Cm add-view
38*bbf21555SRichard Lowe.Op Fl h Ar host-group
39*bbf21555SRichard Lowe.Op Fl n Ar lu-number
40*bbf21555SRichard Lowe.Op Fl t Ar target-group
41*bbf21555SRichard Lowe.Ar lu-name
42*bbf21555SRichard Lowe.Nm
43*bbf21555SRichard Lowe.Cm create-hg
44*bbf21555SRichard Lowe.Ar group-name
45*bbf21555SRichard Lowe.Nm
46*bbf21555SRichard Lowe.Cm create-lu
47*bbf21555SRichard Lowe.Oo Fl p Ar property Ns = Ns Ar value Oc Ns ...
48*bbf21555SRichard Lowe.Op Fl s Ar size
49*bbf21555SRichard Lowe.Ar lu-file
50*bbf21555SRichard Lowe.Nm
51*bbf21555SRichard Lowe.Cm create-tg
52*bbf21555SRichard Lowe.Ar group-name
53*bbf21555SRichard Lowe.Nm
54*bbf21555SRichard Lowe.Cm delete-hg
55*bbf21555SRichard Lowe.Ar group-name
56*bbf21555SRichard Lowe.Nm
57*bbf21555SRichard Lowe.Cm delete-lu
58*bbf21555SRichard Lowe.Op Fl k
59*bbf21555SRichard Lowe.Ar lu-name
60*bbf21555SRichard Lowe.Nm
61*bbf21555SRichard Lowe.Cm delete-tg
62*bbf21555SRichard Lowe.Ar group-name
63*bbf21555SRichard Lowe.Nm
64*bbf21555SRichard Lowe.Cm import-lu
65*bbf21555SRichard Lowe.Ar lu-file
66*bbf21555SRichard Lowe.Nm
67*bbf21555SRichard Lowe.Cm list-hg
68*bbf21555SRichard Lowe.Op Fl v
69*bbf21555SRichard Lowe.Oo Ar host-group Oc Ns ...
70*bbf21555SRichard Lowe.Nm
71*bbf21555SRichard Lowe.Cm list-lu
72*bbf21555SRichard Lowe.Op Fl v
73*bbf21555SRichard Lowe.Oo Ar lu-name Oc Ns ...
74*bbf21555SRichard Lowe.Nm
75*bbf21555SRichard Lowe.Cm list-state
76*bbf21555SRichard Lowe.Nm
77*bbf21555SRichard Lowe.Cm list-target
78*bbf21555SRichard Lowe.Op Fl v
79*bbf21555SRichard Lowe.Oo Ar target Oc Ns ...
80*bbf21555SRichard Lowe.Nm
81*bbf21555SRichard Lowe.Cm list-tg
82*bbf21555SRichard Lowe.Op Fl v
83*bbf21555SRichard Lowe.Oo Ar target-group Oc Ns ...
84*bbf21555SRichard Lowe.Nm
85*bbf21555SRichard Lowe.Cm list-view
86*bbf21555SRichard Lowe.Fl l Ar lu-name
87*bbf21555SRichard Lowe.Oo Ar view Oc Ns ...
88*bbf21555SRichard Lowe.Nm
89*bbf21555SRichard Lowe.Cm modify-lu
90*bbf21555SRichard Lowe.Op Fl f
91*bbf21555SRichard Lowe.Oo Fl p Ar property Ns = Ns Ar value Oc Ns ...
92*bbf21555SRichard Lowe.Op Fl s Ar size
93*bbf21555SRichard Lowe.Ar lu-arg
94*bbf21555SRichard Lowe.Nm
95*bbf21555SRichard Lowe.Cm offline-lu
96*bbf21555SRichard Lowe.Ar lu-name
97*bbf21555SRichard Lowe.Nm
98*bbf21555SRichard Lowe.Cm offline-target
99*bbf21555SRichard Lowe.Ar target
100*bbf21555SRichard Lowe.Nm
101*bbf21555SRichard Lowe.Cm online-lu
102*bbf21555SRichard Lowe.Ar lu-name
103*bbf21555SRichard Lowe.Nm
104*bbf21555SRichard Lowe.Cm online-target
105*bbf21555SRichard Lowe.Ar target
106*bbf21555SRichard Lowe.Nm
107*bbf21555SRichard Lowe.Cm remove-hg-member
108*bbf21555SRichard Lowe.Fl g Ar host-group
109*bbf21555SRichard Lowe.Ar initiator Ns ...
110*bbf21555SRichard Lowe.Nm
111*bbf21555SRichard Lowe.Cm remove-tg-member
112*bbf21555SRichard Lowe.Fl g Ar target-group
113*bbf21555SRichard Lowe.Ar target Ns ...
114*bbf21555SRichard Lowe.Nm
115*bbf21555SRichard Lowe.Cm remove-view
116*bbf21555SRichard Lowe.Op Fl a
117*bbf21555SRichard Lowe.Fl l Ar lu-name
118*bbf21555SRichard Lowe.Ar view Ns ...
119*bbf21555SRichard Lowe.Sh DESCRIPTION
120*bbf21555SRichard LoweThe
121*bbf21555SRichard Lowe.Nm
122*bbf21555SRichard Lowecommand configures logical units within the SCSI Target Mode Framework
123*bbf21555SRichard Lowe.Pq STMF
124*bbf21555SRichard Loweframework.
125*bbf21555SRichard LoweThe framework and this man page use the following terminology:
126*bbf21555SRichard Lowe.Bl -tag -width Ds
127*bbf21555SRichard Lowe.It Sy initiator
128*bbf21555SRichard LoweA device responsible for issuing SCSI I/O commands to a SCSI target and logical
129*bbf21555SRichard Loweunit.
130*bbf21555SRichard Lowe.It Sy target
131*bbf21555SRichard LoweA device responsible for receiving SCSI I/O commands for a logical unit.
132*bbf21555SRichard Lowe.It Sy logical unit
133*bbf21555SRichard LoweA device within a target responsible for executing SCSI I/O commands.
134*bbf21555SRichard Lowe.It Sy logical unit number
135*bbf21555SRichard LoweThe identifier of a logical unit within a target.
136*bbf21555SRichard Lowe.It Sy host group
137*bbf21555SRichard LoweAn host group is a set of one or more initiators that are combined for the
138*bbf21555SRichard Lowepurposes of being applied to a
139*bbf21555SRichard Lowe.Sy view
140*bbf21555SRichard Lowe.Pq see below .
141*bbf21555SRichard LoweAn initiator cannot be a member of more than one host group.
142*bbf21555SRichard Lowe.It Sy target group
143*bbf21555SRichard LoweA target group is a set of one or more SCSI target ports that are treated the
144*bbf21555SRichard Lowesame when creating a
145*bbf21555SRichard Lowe.Sy view
146*bbf21555SRichard Lowe.Pq see below .
147*bbf21555SRichard LoweThe set of logical units that a particular SCSI initiator can see is determined
148*bbf21555SRichard Loweby the combined set of views.
149*bbf21555SRichard Lowe.Pp
150*bbf21555SRichard LoweEach logical unit has a set of view entries, and each view entry specifies a
151*bbf21555SRichard Lowetarget group, host group, and a LUN.
152*bbf21555SRichard LoweAn initiator from that host group, when connecting through that target group, is
153*bbf21555SRichard Loweable to identify and connect to that logical unit using the specified LUN.
154*bbf21555SRichard LoweYou can use views to restrict the set of logical units that a specific initiator
155*bbf21555SRichard Lowecan see, and assign the set of LUNs that will be used.
156*bbf21555SRichard Lowe.It Sy view
157*bbf21555SRichard LoweA view defines the association of a host group, a target group, and a logical
158*bbf21555SRichard Loweunit number with a specified logical unit.
159*bbf21555SRichard LoweAny view entry added to a logical unit must not be in conflict with existing
160*bbf21555SRichard Loweview entries for that logical unit.
161*bbf21555SRichard LoweA view entry is considered to be in conflict when an attempt is made to
162*bbf21555SRichard Loweduplicate the association of any given host, target and logical unit number.
163*bbf21555SRichard Lowe.El
164*bbf21555SRichard Lowe.Ss Logical Unit Properties
165*bbf21555SRichard LoweThe following logical unit properties can be set only when creating LU using
166*bbf21555SRichard Lowe.Cm create-lu
167*bbf21555SRichard Lowesubcommand:
168*bbf21555SRichard Lowe.Bl -tag -width Ds
169*bbf21555SRichard Lowe.It Sy blk Ns = Ns Ar num
170*bbf21555SRichard LoweSpecifies the block size for the device.
171*bbf21555SRichard LoweThe default is 512.
172*bbf21555SRichard Lowe.It Sy guid Ns = Ns Ar string
173*bbf21555SRichard Lowe32 hexadecimal ASCII characters representing a valid NAA Registered Extended
174*bbf21555SRichard LoweIdentifier.
175*bbf21555SRichard LoweThe default is set by the STMF to a generated value.
176*bbf21555SRichard Lowe.It Sy meta Ns = Ns Ar path
177*bbf21555SRichard LoweMetadata file name.
178*bbf21555SRichard LoweWhen specified, will be used to hold the SCSI metadata for the logical unit.
179*bbf21555SRichard LoweThere is no default.
180*bbf21555SRichard Lowe.It Sy oui Ns = Ns Ar string
181*bbf21555SRichard LoweOrganizational Unique Identifier.
182*bbf21555SRichard LoweSix hexadecimal ASCII characters representing the IEEE OUI company ID
183*bbf21555SRichard Loweassignment.
184*bbf21555SRichard LoweThis will be used to generate the device identifier
185*bbf21555SRichard Lowe.Pq GUID .
186*bbf21555SRichard LoweThe default is
187*bbf21555SRichard Lowe.Sy 00144F .
188*bbf21555SRichard Lowe.It Sy pid Ns = Ns Ar string
189*bbf21555SRichard Lowe16 bytes ASCII string defining Product ID per SCSI SPC-3.
190*bbf21555SRichard LoweThis value will be reflected in the Standard INQUIRY data returned for the
191*bbf21555SRichard Lowedevice.
192*bbf21555SRichard LoweThe default is
193*bbf21555SRichard Lowe.Sy COMSTAR .
194*bbf21555SRichard Lowe.It Sy serial Ns = Ns Ar string
195*bbf21555SRichard LoweSerial Number.
196*bbf21555SRichard LoweSpecifies the SCSI Vital Product Data Serial Number
197*bbf21555SRichard Lowe.Pq page 80h .
198*bbf21555SRichard LoweIt is a character value up to 252 bytes in length.
199*bbf21555SRichard LoweThere is no default value.
200*bbf21555SRichard Lowe.It Sy vid Ns = Ns Ar string
201*bbf21555SRichard Lowe8 bytes ASCII string defining Vendor ID per SCSI SPC-3.
202*bbf21555SRichard LoweThis value will be reflected in the Standard INQUIRY data returned for the
203*bbf21555SRichard Lowedevice.
204*bbf21555SRichard LoweThe default is
205*bbf21555SRichard Lowe.Sy SUN .
206*bbf21555SRichard Lowe.El
207*bbf21555SRichard Lowe.Pp
208*bbf21555SRichard LoweThe following logical unit properties can be set when creating LU using
209*bbf21555SRichard Lowe.Cm create-lu
210*bbf21555SRichard Lowesubcommand or modified using
211*bbf21555SRichard Lowe.Cm modify-lu
212*bbf21555SRichard Lowesubcommand:
213*bbf21555SRichard Lowe.Bl -tag -width Ds
214*bbf21555SRichard Lowe.It Sy alias Ns = Ns Ar string
215*bbf21555SRichard LoweUp to 255 characters, representing a user-defined name for the device.
216*bbf21555SRichard LoweThe default is the name of the backing store.
217*bbf21555SRichard Lowe.It Sy mgmt-url Ns = Ns Ar string
218*bbf21555SRichard LoweUp to 1024 characters representing a Management Network Address URL.
219*bbf21555SRichard LoweMore than one URL can be passed as a single parameter by using space-delimited
220*bbf21555SRichard LoweURLs enclosed inside a single pair of quotation marks
221*bbf21555SRichard Lowe.Pq Sy \(dq .
222*bbf21555SRichard Lowe.It Sy wcd Ns = Ns Sy true Ns | Ns Sy false
223*bbf21555SRichard LoweWrite-back cache disable.
224*bbf21555SRichard LoweDetermines write-back cache disable behavior.
225*bbf21555SRichard LoweThe default is the write-back cache setting of the backing store device
226*bbf21555SRichard Lowespecified by the
227*bbf21555SRichard Lowe.Ar lu-file
228*bbf21555SRichard Loweargument.
229*bbf21555SRichard Lowe.It Sy wp Ns = Ns Sy true Ns | Ns Sy false
230*bbf21555SRichard LoweWrite-protect bit.
231*bbf21555SRichard LoweDetermines whether the device reports as write-protected.
232*bbf21555SRichard LoweThe default is
233*bbf21555SRichard Lowe.Sy false .
234*bbf21555SRichard Lowe.El
235*bbf21555SRichard Lowe.Ss Subcommands
236*bbf21555SRichard LoweThe
237*bbf21555SRichard Lowe.Nm
238*bbf21555SRichard Lowecommand supports the subcommands listed below.
239*bbf21555SRichard Lowe.Bl -tag -width Ds
240*bbf21555SRichard Lowe.It Xo
241*bbf21555SRichard Lowe.Nm
242*bbf21555SRichard Lowe.Cm add-hg-member
243*bbf21555SRichard Lowe.Fl g Ar host-group
244*bbf21555SRichard Lowe.Ar initiator Ns ...
245*bbf21555SRichard Lowe.Xc
246*bbf21555SRichard LoweAdd a host group member to a host group.
247*bbf21555SRichard Lowe.Pp
248*bbf21555SRichard LoweAn initiator cannot be a member of more than one host group.
249*bbf21555SRichard Lowe.Bl -tag -width Ds
250*bbf21555SRichard Lowe.It Fl g Ns \&, Ns Fl -group-name Ar host-group
251*bbf21555SRichard LoweSpecifies group name.
252*bbf21555SRichard Lowe.Ar host-group
253*bbf21555SRichard Lowemust be an existing group created using the
254*bbf21555SRichard Lowe.Cm create-hg
255*bbf21555SRichard Lowesubcommand.
256*bbf21555SRichard Lowe.El
257*bbf21555SRichard Lowe.It Xo
258*bbf21555SRichard Lowe.Nm
259*bbf21555SRichard Lowe.Cm add-tg-member
260*bbf21555SRichard Lowe.Fl g Ar target-group
261*bbf21555SRichard Lowe.Ar target Ns ...
262*bbf21555SRichard Lowe.Xc
263*bbf21555SRichard LoweAdd a target group member to a target group.
264*bbf21555SRichard Lowe.Pp
265*bbf21555SRichard LoweA target cannot be a member of more than one target group.
266*bbf21555SRichard Lowe.Bl -tag -width Ds
267*bbf21555SRichard Lowe.It Fl g Ns \&, Ns Fl -group-name Ar target-group
268*bbf21555SRichard LoweSpecifies group name.
269*bbf21555SRichard Lowe.Ar target-group
270*bbf21555SRichard Lowemust be an existing group created using the
271*bbf21555SRichard Lowe.Cm create-tg
272*bbf21555SRichard Lowesubcommand.
273*bbf21555SRichard Lowe.El
274*bbf21555SRichard Lowe.It Xo
275*bbf21555SRichard Lowe.Nm
276*bbf21555SRichard Lowe.Cm add-view
277*bbf21555SRichard Lowe.Op Fl h Ar host-group
278*bbf21555SRichard Lowe.Op Fl n Ar lu-number
279*bbf21555SRichard Lowe.Op Fl t Ar target-group
280*bbf21555SRichard Lowe.Ar lu-name
281*bbf21555SRichard Lowe.Xc
282*bbf21555SRichard LoweAdd a logical unit view entry to a logical unit
283*bbf21555SRichard Lowe.Ar lu-name ,
284*bbf21555SRichard Lowewhere
285*bbf21555SRichard Lowe.Ar lu-name
286*bbf21555SRichard Loweis the STMF name for the logical unit as displayed by the
287*bbf21555SRichard Lowe.Cm list-lu
288*bbf21555SRichard Lowesubcommand.
289*bbf21555SRichard LoweThe
290*bbf21555SRichard Lowe.Cm add-view
291*bbf21555SRichard Lowesubcommand provides the user with a mechanism to implement access control for a
292*bbf21555SRichard Lowelogical unit and also provides a means of assigning a logical unit number to a
293*bbf21555SRichard Lowelogical unit for a given set of initiators and targets.
294*bbf21555SRichard LoweA logical unit will not be available to any initiators until at least one view
295*bbf21555SRichard Loweis applied.
296*bbf21555SRichard LoweEach view entry gets assigned an entry name, which can be used to reference the
297*bbf21555SRichard Loweentry in the
298*bbf21555SRichard Lowe.Cm list-view
299*bbf21555SRichard Loweand
300*bbf21555SRichard Lowe.Cm remove-view
301*bbf21555SRichard Lowesubcommands.
302*bbf21555SRichard Lowe.Bl -tag -width Ds
303*bbf21555SRichard Lowe.It Fl h Ns \&, Ns Fl -host-group Ar host-group
304*bbf21555SRichard Lowe.Ar host-group
305*bbf21555SRichard Loweis the name of an host group previously created using
306*bbf21555SRichard Lowe.Cm create-hg
307*bbf21555SRichard Lowesubcommand.
308*bbf21555SRichard LoweIf this option is not specified, the logical unit will be available to all
309*bbf21555SRichard Loweinitiators that log in to the STMF framework.
310*bbf21555SRichard Lowe.It Fl n Ns \&, Ns Fl -lun Ar lu-number
311*bbf21555SRichard Lowe.Ar lu-number
312*bbf21555SRichard Loweis an integer in the range 0-16383 to be assigned to the logical unit for this
313*bbf21555SRichard Loweview entry.
314*bbf21555SRichard LoweIf this option is not specified, a logical unit number will be assigned by the
315*bbf21555SRichard LoweSTMF framework.
316*bbf21555SRichard Lowe.It Fl t Ns \&, Ns Fl -target-group Ar target-group
317*bbf21555SRichard Lowe.Ar target-group
318*bbf21555SRichard Loweis the name of a target group previously created using
319*bbf21555SRichard Lowe.Cm create-tg
320*bbf21555SRichard Lowesubcommand.
321*bbf21555SRichard LoweIf this option is not specified, the logical unit will be available through all
322*bbf21555SRichard Lowetargets.
323*bbf21555SRichard Lowe.El
324*bbf21555SRichard Lowe.It Xo
325*bbf21555SRichard Lowe.Nm
326*bbf21555SRichard Lowe.Cm create-hg
327*bbf21555SRichard Lowe.Ar group-name
328*bbf21555SRichard Lowe.Xc
329*bbf21555SRichard LoweCreate a host group with the name
330*bbf21555SRichard Lowe.Ar group-name .
331*bbf21555SRichard Lowe.Ar group-name
332*bbf21555SRichard Loweis a string of Unicode characters with a maximum length of 255.
333*bbf21555SRichard LoweThe group name must be unique within the STMF system.
334*bbf21555SRichard Lowe.It Xo
335*bbf21555SRichard Lowe.Nm
336*bbf21555SRichard Lowe.Cm create-lu
337*bbf21555SRichard Lowe.Oo Fl p Ar property Ns = Ns Ar value Oc Ns ...
338*bbf21555SRichard Lowe.Op Fl s Ar size
339*bbf21555SRichard Lowe.Ar lu-file
340*bbf21555SRichard Lowe.Xc
341*bbf21555SRichard LoweCreate a logical unit that can be registered with STMF.
342*bbf21555SRichard Lowe.Ar lu-file
343*bbf21555SRichard Loweis the file to be used as the backing store for the logical unit.
344*bbf21555SRichard LoweIf the
345*bbf21555SRichard Lowe.Fl s
346*bbf21555SRichard Loweoption is not specified, the size of the specified
347*bbf21555SRichard Lowe.Ar lu-file
348*bbf21555SRichard Lowewill be used as the size of the logical unit.
349*bbf21555SRichard Lowe.Pp
350*bbf21555SRichard LoweLogical units registered with the STMF require space for the metadata to be
351*bbf21555SRichard Lowestored.
352*bbf21555SRichard LoweWhen a
353*bbf21555SRichard Lowe.Sy zvol
354*bbf21555SRichard Loweis specified as the backing store device, the default will be to use a special
355*bbf21555SRichard Loweproperty of the
356*bbf21555SRichard Lowe.Sy zvol
357*bbf21555SRichard Loweto contain the metadata.
358*bbf21555SRichard LoweFor all other devices, the default behavior will be to use the first 64k of the
359*bbf21555SRichard Lowedevice.
360*bbf21555SRichard LoweAn alternative approach would be to use the
361*bbf21555SRichard Lowe.Sy meta
362*bbf21555SRichard Loweproperty in a
363*bbf21555SRichard Lowe.Cm create-lu
364*bbf21555SRichard Lowesubcommand to specify an alternate file to contain the metadata.
365*bbf21555SRichard LoweIt is advisable to use a file that can provide sufficient storage of the logical
366*bbf21555SRichard Loweunit metadata, preferably 64k.
367*bbf21555SRichard Lowe.Bl -tag -width Ds
368*bbf21555SRichard Lowe.It Fl p Ns \&, Ns Fl -lu-prop Ar property Ns = Ns Ar value
369*bbf21555SRichard LoweSet specified logical unit property.
370*bbf21555SRichard LoweCheck
371*bbf21555SRichard Lowe.Sx Logical Unit Properties
372*bbf21555SRichard Lowefor the list of available properties.
373*bbf21555SRichard Lowe.It Fl s Ns \&, Ns Fl -size Ar size
374*bbf21555SRichard Lowe.Ar size
375*bbf21555SRichard Loweis an integer followed by one of the following letters, to indicate a unit of
376*bbf21555SRichard Lowesize:
377*bbf21555SRichard Lowe.Sy k , m , g , t , p , e ,
378*bbf21555SRichard Lowespecifying kilobyte, megabyte, gigabyte, terabyte, petabyte and exabyte
379*bbf21555SRichard Lowerespectively.
380*bbf21555SRichard Lowe.El
381*bbf21555SRichard Lowe.It Xo
382*bbf21555SRichard Lowe.Nm
383*bbf21555SRichard Lowe.Cm create-tg
384*bbf21555SRichard Lowe.Ar group-name
385*bbf21555SRichard Lowe.Xc
386*bbf21555SRichard LoweCreate a target group with the name
387*bbf21555SRichard Lowe.Ar group-name .
388*bbf21555SRichard Lowe.Ar group-name
389*bbf21555SRichard Loweis a string of Unicode characters with a maximum length of 255.
390*bbf21555SRichard LoweThe group name must be unique within the STMF system.
391*bbf21555SRichard Lowe.It Xo
392*bbf21555SRichard Lowe.Nm
393*bbf21555SRichard Lowe.Cm delete-hg
394*bbf21555SRichard Lowe.Ar group-name
395*bbf21555SRichard Lowe.Xc
396*bbf21555SRichard LoweDelete the host group identified by
397*bbf21555SRichard Lowe.Ar group-name .
398*bbf21555SRichard Lowe.It Xo
399*bbf21555SRichard Lowe.Nm
400*bbf21555SRichard Lowe.Cm delete-lu
401*bbf21555SRichard Lowe.Op Fl k
402*bbf21555SRichard Lowe.Ar lu-name
403*bbf21555SRichard Lowe.Xc
404*bbf21555SRichard LoweDelete an existing logical unit that was created using
405*bbf21555SRichard Lowe.Cm create-lu
406*bbf21555SRichard Lowesubcommand.
407*bbf21555SRichard LoweThis effectively unloads the logical unit from the STMF framework.
408*bbf21555SRichard LoweAny existing data on the logical unit remains intact.
409*bbf21555SRichard Lowe.Bl -tag -width Ds
410*bbf21555SRichard Lowe.It Fl k Ns \&, Ns Fl -keep-views
411*bbf21555SRichard LoweKeep view entries for this logical unit.
412*bbf21555SRichard Lowe.El
413*bbf21555SRichard Lowe.It Xo
414*bbf21555SRichard Lowe.Nm
415*bbf21555SRichard Lowe.Cm delete-tg
416*bbf21555SRichard Lowe.Ar group-name
417*bbf21555SRichard Lowe.Xc
418*bbf21555SRichard LoweDelete the target group identified by
419*bbf21555SRichard Lowe.Ar group-name .
420*bbf21555SRichard Lowe.It Xo
421*bbf21555SRichard Lowe.Nm
422*bbf21555SRichard Lowe.Cm import-lu
423*bbf21555SRichard Lowe.Ar lu-file
424*bbf21555SRichard Lowe.Xc
425*bbf21555SRichard LoweImport and load a logical unit into the STMF that was previously created using
426*bbf21555SRichard Lowe.Cm create-lu
427*bbf21555SRichard Lowesubcommand and was then deleted from the STMF using
428*bbf21555SRichard Lowe.Cm delete-lu
429*bbf21555SRichard Lowesubcommand.
430*bbf21555SRichard LoweOn success, the logical unit is again made available to the STMF.
431*bbf21555SRichard Lowe.Ar lu-file
432*bbf21555SRichard Loweis the filename used in the
433*bbf21555SRichard Lowe.Cm create-lu
434*bbf21555SRichard Lowesubcommand.
435*bbf21555SRichard LoweIf this logical unit is using a separate metadata file, the filename in the
436*bbf21555SRichard Lowe.Sy meta
437*bbf21555SRichard Loweproperty value that was used in the
438*bbf21555SRichard Lowe.Cm create-lu
439*bbf21555SRichard Lowesubcommand must be used here.
440*bbf21555SRichard Lowe.It Xo
441*bbf21555SRichard Lowe.Nm
442*bbf21555SRichard Lowe.Cm list-hg
443*bbf21555SRichard Lowe.Op Fl v
444*bbf21555SRichard Lowe.Oo Ar host-group Oc Ns ...
445*bbf21555SRichard Lowe.Xc
446*bbf21555SRichard LoweList information for the host group in the system referenced by
447*bbf21555SRichard Lowe.Ar host-group .
448*bbf21555SRichard LoweIf
449*bbf21555SRichard Lowe.Ar host-group
450*bbf21555SRichard Loweis not specified, all host groups in the system will be listed.
451*bbf21555SRichard Lowe.Bl -tag -width Ds
452*bbf21555SRichard Lowe.It Fl v Ns \&, Ns Fl -verbose
453*bbf21555SRichard LoweDisplay all host group members.
454*bbf21555SRichard Lowe.El
455*bbf21555SRichard Lowe.It Xo
456*bbf21555SRichard Lowe.Nm
457*bbf21555SRichard Lowe.Cm list-lu
458*bbf21555SRichard Lowe.Op Fl v
459*bbf21555SRichard Lowe.Oo Ar lu-name Oc Ns ...
460*bbf21555SRichard Lowe.Xc
461*bbf21555SRichard LoweList information for the logical unit in the system referenced by
462*bbf21555SRichard Lowe.Ar lu-name .
463*bbf21555SRichard LoweIf
464*bbf21555SRichard Lowe.Ar lu-name
465*bbf21555SRichard Loweis not specified, all logical units in the system will be listed.
466*bbf21555SRichard Lowe.Bl -tag -width Ds
467*bbf21555SRichard Lowe.It Fl v Ns \&, Ns Fl -verbose
468*bbf21555SRichard LoweDisplay verbose information about the logical unit.
469*bbf21555SRichard Lowe.El
470*bbf21555SRichard Lowe.It Xo
471*bbf21555SRichard Lowe.Nm
472*bbf21555SRichard Lowe.Cm list-state
473*bbf21555SRichard Lowe.Xc
474*bbf21555SRichard LoweList the operational and configuration state of the STMF.
475*bbf21555SRichard Lowe.It Xo
476*bbf21555SRichard Lowe.Nm
477*bbf21555SRichard Lowe.Cm list-target
478*bbf21555SRichard Lowe.Op Fl v
479*bbf21555SRichard Lowe.Oo Ar target Oc Ns ...
480*bbf21555SRichard Lowe.Xc
481*bbf21555SRichard LoweList information for the target port in the system referenced by
482*bbf21555SRichard Lowe.Ar target .
483*bbf21555SRichard LoweIf target name is not specified, all target ports in the system will be listed.
484*bbf21555SRichard Lowe.Bl -tag -width Ds
485*bbf21555SRichard Lowe.It Fl v Ns \&, Ns Fl -verbose
486*bbf21555SRichard LoweDisplay verbose information about the target along with SCSI session information
487*bbf21555SRichard Lowefor logged-in initiators.
488*bbf21555SRichard Lowe.El
489*bbf21555SRichard Lowe.It Xo
490*bbf21555SRichard Lowe.Nm
491*bbf21555SRichard Lowe.Cm list-tg
492*bbf21555SRichard Lowe.Op Fl v
493*bbf21555SRichard Lowe.Oo Ar target-group Oc Ns ...
494*bbf21555SRichard Lowe.Xc
495*bbf21555SRichard LoweList information for the target group in the system referenced by
496*bbf21555SRichard Lowe.Ar target-group .
497*bbf21555SRichard LoweIf
498*bbf21555SRichard Lowe.Ar target-group
499*bbf21555SRichard Loweis not specified, all target groups in the system will be listed.
500*bbf21555SRichard Lowe.Bl -tag -width Ds
501*bbf21555SRichard Lowe.It Fl v Ns \&, Ns Fl -verbose
502*bbf21555SRichard LoweDisplay all group members.
503*bbf21555SRichard Lowe.El
504*bbf21555SRichard Lowe.It Xo
505*bbf21555SRichard Lowe.Nm
506*bbf21555SRichard Lowe.Cm list-view
507*bbf21555SRichard Lowe.Fl l Ar lu-name
508*bbf21555SRichard Lowe.Oo Ar view Oc Ns ...
509*bbf21555SRichard Lowe.Xc
510*bbf21555SRichard LoweList the view entry for the logical unit referenced by
511*bbf21555SRichard Lowe.Ar lu-name .
512*bbf21555SRichard LoweIf
513*bbf21555SRichard Lowe.Ar view
514*bbf21555SRichard Loweis not specified, all view entries for the specified logical unit will be
515*bbf21555SRichard Lowelisted.
516*bbf21555SRichard Lowe.Bl -tag -width Ds
517*bbf21555SRichard Lowe.It Fl l Ns \&, Ns Fl -lu-name Ar lu-name
518*bbf21555SRichard LoweSpecify logical unit.
519*bbf21555SRichard Lowe.El
520*bbf21555SRichard Lowe.It Xo
521*bbf21555SRichard Lowe.Nm
522*bbf21555SRichard Lowe.Cm modify-lu
523*bbf21555SRichard Lowe.Op Fl f
524*bbf21555SRichard Lowe.Oo Fl p Ar property Ns = Ns Ar value Oc Ns ...
525*bbf21555SRichard Lowe.Op Fl s Ar size
526*bbf21555SRichard Lowe.Ar lu-arg
527*bbf21555SRichard Lowe.Xc
528*bbf21555SRichard LoweModify attributes of a logical unit created using the
529*bbf21555SRichard Lowe.Cm create-lu
530*bbf21555SRichard Lowesubcommand.
531*bbf21555SRichard LoweIf
532*bbf21555SRichard Lowe.Fl f
533*bbf21555SRichard Loweis not specified,
534*bbf21555SRichard Lowe.Ar lu-arg
535*bbf21555SRichard Loweis interpreted as
536*bbf21555SRichard Lowe.Ar lu-name.
537*bbf21555SRichard Lowe.Bl -tag -width Ds
538*bbf21555SRichard Lowe.It Fl f Ns \&, Ns Fl -file
539*bbf21555SRichard LoweIf specified,
540*bbf21555SRichard Lowe.Ar lu-arg
541*bbf21555SRichard Loweis interpreted as file name.
542*bbf21555SRichard LoweThis provides the ability to modify a logical unit that is not currently
543*bbf21555SRichard Loweimported into the STMF.
544*bbf21555SRichard Lowe.It Fl p Ns \&, Ns Fl -lu-prop Ar property
545*bbf21555SRichard LoweModify specified logical unit property.
546*bbf21555SRichard LoweSee
547*bbf21555SRichard Lowe.Sx Logical Unit Properties
548*bbf21555SRichard Lowefor the list of available properties.
549*bbf21555SRichard Lowe.It Fl s Ns \&, Ns Fl -size Ar size
550*bbf21555SRichard Lowe.Ar size
551*bbf21555SRichard Loweis an integer followed by one of the following letters, to indicate a unit of
552*bbf21555SRichard Lowesize:
553*bbf21555SRichard Lowe.Sy k , m , g , t , p , e ,
554*bbf21555SRichard Lowespecifying kilobyte, megabyte, gigabyte, terabyte, petabyte and exabyte
555*bbf21555SRichard Lowerespectively.
556*bbf21555SRichard Lowe.El
557*bbf21555SRichard Lowe.It Xo
558*bbf21555SRichard Lowe.Nm
559*bbf21555SRichard Lowe.Cm offline-lu
560*bbf21555SRichard Lowe.Ar lu-name
561*bbf21555SRichard Lowe.Xc
562*bbf21555SRichard LoweOffline a logical unit currently registered with the STMF.
563*bbf21555SRichard Lowe.It Xo
564*bbf21555SRichard Lowe.Nm
565*bbf21555SRichard Lowe.Cm offline-target
566*bbf21555SRichard Lowe.Ar target-name
567*bbf21555SRichard Lowe.Xc
568*bbf21555SRichard LoweOffline the specified target.
569*bbf21555SRichard Lowe.It Xo
570*bbf21555SRichard Lowe.Nm
571*bbf21555SRichard Lowe.Cm online-lu
572*bbf21555SRichard Lowe.Ar lu-name
573*bbf21555SRichard Lowe.Xc
574*bbf21555SRichard LoweOnline a logical unit currently registered with the STMF.
575*bbf21555SRichard Lowe.It Xo
576*bbf21555SRichard Lowe.Nm
577*bbf21555SRichard Lowe.Cm online-target
578*bbf21555SRichard Lowe.Ar target
579*bbf21555SRichard Lowe.Xc
580*bbf21555SRichard LoweOnline the specified target.
581*bbf21555SRichard Lowe.It Xo
582*bbf21555SRichard Lowe.Nm
583*bbf21555SRichard Lowe.Cm remove-hg-member
584*bbf21555SRichard Lowe.Fl g Ar host-group
585*bbf21555SRichard Lowe.Ar initiator
586*bbf21555SRichard Lowe.Xc
587*bbf21555SRichard LoweRemove specified
588*bbf21555SRichard Lowe.Ar initiator
589*bbf21555SRichard Lowefrom host group
590*bbf21555SRichard Lowe.Bl -tag -width Ds
591*bbf21555SRichard Lowe.It Fl g Ns \&, Ns Fl -group-name Ar host-group
592*bbf21555SRichard LoweSpecifies group name.
593*bbf21555SRichard Lowe.Ar host-group
594*bbf21555SRichard Lowemust be an existing group created using the
595*bbf21555SRichard Lowe.Cm create-hg
596*bbf21555SRichard Lowesubcommand.
597*bbf21555SRichard Lowe.El
598*bbf21555SRichard Lowe.It Xo
599*bbf21555SRichard Lowe.Nm
600*bbf21555SRichard Lowe.Cm remove-tg-member
601*bbf21555SRichard Lowe.Fl g Ar target-group
602*bbf21555SRichard Lowe.Ar target
603*bbf21555SRichard Lowe.Xc
604*bbf21555SRichard LoweRemove specified
605*bbf21555SRichard Lowe.Ar target
606*bbf21555SRichard Lowefrom target group.
607*bbf21555SRichard Lowe.Bl -tag -width Ds
608*bbf21555SRichard Lowe.It Fl g Ns \&, Ns Fl -group-name Ar taget-group
609*bbf21555SRichard LoweSpecifies group name.
610*bbf21555SRichard Lowe.Ar target-group
611*bbf21555SRichard Lowemust be an existing group created using the
612*bbf21555SRichard Lowe.Cm create-tg
613*bbf21555SRichard Lowesubcommand.
614*bbf21555SRichard Lowe.El
615*bbf21555SRichard Lowe.It Xo
616*bbf21555SRichard Lowe.Nm
617*bbf21555SRichard Lowe.Cm remove-view
618*bbf21555SRichard Lowe.Op Fl a
619*bbf21555SRichard Lowe.Fl l Ar lu-name
620*bbf21555SRichard Lowe.Ar view Ns ...
621*bbf21555SRichard Lowe.Xc
622*bbf21555SRichard LoweRemove one or more view entries from a logical unit.
623*bbf21555SRichard Lowe.Bl -tag -width Ds
624*bbf21555SRichard Lowe.It Fl a Ns \&, Ns Fl -all
625*bbf21555SRichard LoweRemove all view entries for this logical unit.
626*bbf21555SRichard Lowe.It Fl l Ns \&, Ns Fl -lu-name
627*bbf21555SRichard LoweSpecify logical unit.
628*bbf21555SRichard Lowe.El
629*bbf21555SRichard Lowe.El
630*bbf21555SRichard Lowe.Sh EXAMPLES
631*bbf21555SRichard Lowe.Bl -tag -width Ds
632*bbf21555SRichard Lowe.It Sy Example 1 No Creating a Host group with Two Initiator Ports
633*bbf21555SRichard LoweThe following commands use the
634*bbf21555SRichard Lowe.Cm create-hg
635*bbf21555SRichard Loweand
636*bbf21555SRichard Lowe.Cm add-hg-member
637*bbf21555SRichard Lowesubcommands to create a host group and add two initiator ports to that host
638*bbf21555SRichard Lowegroup.
639*bbf21555SRichard Lowe.Bd -literal
640*bbf21555SRichard Lowe# stmfadm create-hg HostA
641*bbf21555SRichard Lowe# stmfadm add-hg-member -g HostA wwn.210105b0000d92d0
642*bbf21555SRichard Lowe.Ed
643*bbf21555SRichard Lowe.It Sy Example 2 No Adding a View Entry to a Logical Unit
644*bbf21555SRichard LoweThe following command uses the
645*bbf21555SRichard Lowe.Cm add-view
646*bbf21555SRichard Lowesubcommand to allow access from
647*bbf21555SRichard Lowe.Sy HostA
648*bbf21555SRichard Loweto a logical unit.
649*bbf21555SRichard Lowe.Bd -literal
650*bbf21555SRichard Lowe# stmfadm add-view -h HostA 6000AE40C5000000000046FC4FEA001C
651*bbf21555SRichard Lowe.Ed
652*bbf21555SRichard Lowe.It Sy Example 3 No Listing a View Entry
653*bbf21555SRichard LoweThe following command uses the
654*bbf21555SRichard Lowe.Cm list-view
655*bbf21555SRichard Lowesubcommand to list all view entries for the specified logical unit.
656*bbf21555SRichard Lowe.Bd -literal
657*bbf21555SRichard Lowe# stmfadm list-view -l 6000AE40C5000000000046FC4FEA001C
658*bbf21555SRichard LoweView Entry: 0
659*bbf21555SRichard Lowe    Host group   : HostA
660*bbf21555SRichard Lowe    Target group : All
661*bbf21555SRichard Lowe    LUN          : 0
662*bbf21555SRichard Lowe.Ed
663*bbf21555SRichard Lowe.El
664*bbf21555SRichard Lowe.Sh INTERFACE STABILITY
665*bbf21555SRichard Lowe.Sy Committed
666*bbf21555SRichard Lowe.Sh SEE ALSO
667*bbf21555SRichard Lowe.Xr attributes 7 ,
668*bbf21555SRichard Lowe.Xr sbdadm 8
669