6324 Add an `ndp' tool for manipulating the neighbors table
[illumos-gate.git] / usr / src / man / man1m / sbdadm.1m
blob10468d5f9705148e0baf84f7be7cd7b56b3f7bfd
1 '\" te
2 .\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved
3 .\" 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.
4 .\" 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.
5 .\" 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]
6 .TH SBDADM 1M "Aug 20, 2009"
7 .SH NAME
8 sbdadm \- SCSI Block Disk command line interface
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBsbdadm\fR \fBcreate-lu\fR [\fB-s\fR, \fB--size\fR \fIsize\fR] \fIfilename\fR
13 .fi
15 .LP
16 .nf
17 \fBsbdadm\fR \fBdelete-lu\fR \fIlu_name\fR
18 .fi
20 .LP
21 .nf
22 \fBsbdadm\fR \fBimport-lu\fR \fIlu_name\fR
23 .fi
25 .LP
26 .nf
27 \fBsbdadm\fR \fBlist-lu\fR \fIlu_name\fR
28 .fi
30 .LP
31 .nf
32 \fBsbdadm\fR \fBmodify-lu\fR [\fB-s\fR, \fB--size\fR \fIsize\fR] \fIlu_name\fR | \fIfilename\fR
33 .fi
35 .SH DESCRIPTION
36 .sp
37 .LP
38 The \fBsbdadm\fR command creates and manages SCSI-block-device-based logical
39 units that are registered with the SCSI Target Mode Framework (STMF).
40 .SH SUB-COMMANDS
41 .sp
42 .LP
43 The \fBsbdadm\fR command supports the subcommands listed below. Note that if
44 you enter a question mark as an argument to the command (\fBsbdadm ?\fR),
45 \fBsbdadm\fR responds with a help display.
46 .sp
47 .ne 2
48 .na
49 \fB\fBcreate-lu\fR [\fB-s\fR, \fB--size\fR \fIsize\fR] \fIfilename\fR\fR
50 .ad
51 .sp .6
52 .RS 4n
53 Create a logical unit that can be registered with the STMF. For the \fB-s\fR
54 option, \fIsize\fR is an integer followed by one of the following letters, to
55 indicate a unit of size:
56 .sp
57 .ne 2
58 .na
59 \fB\fBk\fR\fR
60 .ad
61 .RS 5n
62 kilobyte
63 .RE
65 .sp
66 .ne 2
67 .na
68 \fB\fBm\fR\fR
69 .ad
70 .RS 5n
71 megabyte
72 .RE
74 .sp
75 .ne 2
76 .na
77 \fB\fBg\fR\fR
78 .ad
79 .RS 5n
80 gigabyte
81 .RE
83 .sp
84 .ne 2
85 .na
86 \fB\fBt\fR\fR
87 .ad
88 .RS 5n
89 terabyte
90 .RE
92 .sp
93 .ne 2
94 .na
95 \fB\fBp\fR\fR
96 .ad
97 .RS 5n
98 petabyte
99 .RE
102 .ne 2
104 \fB\fBe\fR\fR
106 .RS 5n
107 exabyte
110 If you do not specify \fIsize\fR, the size defaults to the size of
111 \fIfilename\fR.
113 The size specified can exceed the size of the file or device.
117 .ne 2
119 \fB\fBdelete-lu\fR \fIlu_name\fR\fR
121 .sp .6
122 .RS 4n
123 Deletes an existing logical unit that was created using \fBsbdadm create-lu\fR.
124 This effectively unloads the logical unit from the STMF framework. Any existing
125 data on the logical unit remains intact.
129 .ne 2
131 \fB\fBimport-lu\fR \fIlu_name\fR\fR
133 .sp .6
134 .RS 4n
135 Imports and loads a logical unit into the STMF that was previously created
136 using \fBsbdadm create-lu\fR and was since deleted from the STMF using
137 \fBsbdadm delete-lu\fR. On success, the logical unit is again made available to
138 the STMF. \fIfilename\fR is the filename used in the \fBsbdadm create-lu\fR
139 command for this logical unit.
143 .ne 2
145 \fB\fBlist-lu\fR\fR
147 .sp .6
148 .RS 4n
149 List all logical units that were created using the \fBsbdadm create-lu\fR
150 command.
154 .ne 2
156 \fB\fBmodify-lu\fR [\fB-s\fR, \fB--size\fR \fIsize\fR] \fIlu_name\fR |
157 \fIfilename\fR\fR
159 .sp .6
160 .RS 4n
161 Modifies attributes of an logical unit created using the \fBsbdadm create-lu\fR
162 command. For the \fB-s\fR option, \fIsize\fR is an integer value followed by a
163 unit specifier. The unit specifiers are as described above under
164 \fBcreate-lu\fR. When this option is specified, the existing size of the
165 logical unit is changed to the new size.
167 The size specified can exceed the size of the file or device represented by
168 \fIlu_name\fR.
171 .SH OPERANDS
174 \fBsbdadm\fR use the following operands:
176 .ne 2
178 \fB\fIfilename\fR\fR
180 .sp .6
181 .RS 4n
182 Name of an existing file or a fully qualified path to a raw block device.
186 .ne 2
188 \fB\fIlu_name\fR\fR
190 .sp .6
191 .RS 4n
192 The 32-byte hexadecimal representation of the logical unit.
195 .SH EXAMPLES
197 \fBExample 1 \fRCreating a Logical Unit
200 The following series of commands creates a 10-gigabyte logical unit.
203 .in +2
205 # \fBtouch /export/lun/0\fR
206 # \fBsbdadm create-lu -s 10g /export/lun/0\fR
207 # \fBsbdadm create-lu /dev/rdsk/c1t1d0s0\fR
209 .in -2
213 \fBExample 2 \fRListing Logical Units
216 The following command lists all logical units.
219 .in +2
221 # \fBsbdadm list-lu\fR
222 Found 2 LU(s)
224                 GUID               DATA SIZE    SOURCE
225 --------------------------------  -----------  ------
226 6000ae4000144f21d92c47b0dd650002  10737352704  /export/lun/0
227 6000ae4000144f21d92c47b0de300032  134283264    /dev/rdsk/c1t1d0s0
229 .in -2
232 .SH EXIT STATUS
234 .ne 2
236 \fB\fB0\fR\fR
238 .sp .6
239 .RS 4n
240 Successful completion.
244 .ne 2
246 \fB\fBnon-zero\fR\fR
248 .sp .6
249 .RS 4n
250 An error occurred.
253 .SH ATTRIBUTES
256 See \fBattributes\fR(5) for descriptions of the following attributes:
261 box;
262 c | c
263 l | l .
264 ATTRIBUTE TYPE  ATTRIBUTE VALUE
266 Interface Stability     Obsolete Committed
269 .SH SEE ALSO
272 \fBstmfadm\fR(1M), \fBattributes\fR(5)