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
|
'\" te
.\" Copyright (c) 2008, 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 SBDADM 1M "April 9, 2016"
.SH NAME
sbdadm \- SCSI Block Disk command line interface
.SH SYNOPSIS
.LP
.nf
\fBsbdadm\fR \fBcreate-lu\fR [\fB-s\fR, \fB--size\fR \fIsize\fR] \fIfilename\fR
.fi
.LP
.nf
\fBsbdadm\fR \fBdelete-lu\fR \fIlu_name\fR
.fi
.LP
.nf
\fBsbdadm\fR \fBimport-lu\fR \fIlu_name\fR
.fi
.LP
.nf
\fBsbdadm\fR \fBlist-lu\fR \fIlu_name\fR
.fi
.LP
.nf
\fBsbdadm\fR \fBmodify-lu\fR [\fB-s\fR, \fB--size\fR \fIsize\fR] \fIlu_name\fR | \fIfilename\fR
.fi
.SH DESCRIPTION
.LP
The \fBsbdadm\fR command creates and manages SCSI-block-device-based logical
units that are registered with the SCSI Target Mode Framework (STMF).
.SH SUBCOMMANDS
.LP
The \fBsbdadm\fR command supports the subcommands listed below. Note that if
you enter a question mark as an argument to the command (\fBsbdadm ?\fR),
\fBsbdadm\fR responds with a help display.
.sp
.ne 2
.na
\fB\fBcreate-lu\fR [\fB-s\fR, \fB--size\fR \fIsize\fR] \fIfilename\fR\fR
.ad
.sp .6
.RS 4n
Create a logical unit that can be registered with the STMF. 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
If you do not specify \fIsize\fR, the size defaults to the size of
\fIfilename\fR.
.sp
The size specified can exceed the size of the file or device.
.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 \fBsbdadm 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\fBimport-lu\fR \fIlu_name\fR\fR
.ad
.sp .6
.RS 4n
Imports and loads a logical unit into the STMF that was previously created
using \fBsbdadm create-lu\fR and was since deleted from the STMF using
\fBsbdadm delete-lu\fR. On success, the logical unit is again made available to
the STMF. \fIfilename\fR is the filename used in the \fBsbdadm create-lu\fR
command for this logical unit.
.RE
.sp
.ne 2
.na
\fB\fBlist-lu\fR\fR
.ad
.sp .6
.RS 4n
List all logical units that were created using the \fBsbdadm create-lu\fR
command.
.RE
.sp
.ne 2
.na
\fB\fBmodify-lu\fR [\fB-s\fR, \fB--size\fR \fIsize\fR] \fIlu_name\fR |
\fIfilename\fR\fR
.ad
.sp .6
.RS 4n
Modifies attributes of an logical unit created using the \fBsbdadm create-lu\fR
command. For the \fB-s\fR option, \fIsize\fR is an integer value followed by a
unit specifier. The unit specifiers are as described above under
\fBcreate-lu\fR. When this option is specified, the existing size of the
logical unit is changed to the new size.
.sp
The size specified can exceed the size of the file or device represented by
\fIlu_name\fR.
.RE
.SH OPERANDS
.LP
\fBsbdadm\fR use the following operands:
.sp
.ne 2
.na
\fB\fIfilename\fR\fR
.ad
.sp .6
.RS 4n
Name of an existing file or a fully qualified path to a raw block device.
.RE
.sp
.ne 2
.na
\fB\fIlu_name\fR\fR
.ad
.sp .6
.RS 4n
The 32-byte hexadecimal representation of the logical unit.
.RE
.SH EXAMPLES
.LP
\fBExample 1 \fRCreating a Logical Unit
.sp
.LP
The following series of commands creates a 10-gigabyte logical unit.
.sp
.in +2
.nf
# \fBtouch /export/lun/0\fR
# \fBsbdadm create-lu -s 10g /export/lun/0\fR
# \fBsbdadm create-lu /dev/rdsk/c1t1d0s0\fR
.fi
.in -2
.sp
.LP
\fBExample 2 \fRListing Logical Units
.sp
.LP
The following command lists all logical units.
.sp
.in +2
.nf
# \fBsbdadm list-lu\fR
Found 2 LU(s)
GUID DATA SIZE SOURCE
-------------------------------- ----------- ------
6000ae4000144f21d92c47b0dd650002 10737352704 /export/lun/0
6000ae4000144f21d92c47b0de300032 134283264 /dev/rdsk/c1t1d0s0
.fi
.in -2
.sp
.SH EXIT STATUS
.ne 2
.na
\fB\fB0\fR\fR
.ad
.sp .6
.RS 4n
Successful completion.
.RE
.sp
.ne 2
.na
\fB\fBnon-zero\fR\fR
.ad
.sp .6
.RS 4n
An error occurred.
.RE
.SH ATTRIBUTES
.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 Obsolete Committed
.TE
.SH SEE ALSO
.LP
\fBstmfadm\fR(1M), \fBattributes\fR(5)
|