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"
8 sbdadm \- SCSI Block Disk command line interface
12 \fBsbdadm\fR \fBcreate-lu\fR [\fB-s\fR, \fB--size\fR \fIsize\fR] \fIfilename\fR
17 \fBsbdadm\fR \fBdelete-lu\fR \fIlu_name\fR
22 \fBsbdadm\fR \fBimport-lu\fR \fIlu_name\fR
27 \fBsbdadm\fR \fBlist-lu\fR \fIlu_name\fR
32 \fBsbdadm\fR \fBmodify-lu\fR [\fB-s\fR, \fB--size\fR \fIsize\fR] \fIlu_name\fR | \fIfilename\fR
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).
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.
49 \fB\fBcreate-lu\fR [\fB-s\fR, \fB--size\fR \fIsize\fR] \fIfilename\fR\fR
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:
110 If you do not specify \fIsize\fR, the size defaults to the size of
113 The size specified can exceed the size of the file or device.
119 \fB\fBdelete-lu\fR \fIlu_name\fR\fR
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.
131 \fB\fBimport-lu\fR \fIlu_name\fR\fR
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.
149 List all logical units that were created using the \fBsbdadm create-lu\fR
156 \fB\fBmodify-lu\fR [\fB-s\fR, \fB--size\fR \fIsize\fR] \fIlu_name\fR |
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
174 \fBsbdadm\fR use the following operands:
182 Name of an existing file or a fully qualified path to a raw block device.
192 The 32-byte hexadecimal representation of the logical unit.
197 \fBExample 1 \fRCreating a Logical Unit
200 The following series of commands creates a 10-gigabyte logical unit.
205 # \fBtouch /export/lun/0\fR
206 # \fBsbdadm create-lu -s 10g /export/lun/0\fR
207 # \fBsbdadm create-lu /dev/rdsk/c1t1d0s0\fR
213 \fBExample 2 \fRListing Logical Units
216 The following command lists all logical units.
221 # \fBsbdadm list-lu\fR
224 GUID DATA SIZE SOURCE
225 -------------------------------- ----------- ------
226 6000ae4000144f21d92c47b0dd650002 10737352704 /export/lun/0
227 6000ae4000144f21d92c47b0de300032 134283264 /dev/rdsk/c1t1d0s0
240 Successful completion.
256 See \fBattributes\fR(5) for descriptions of the following attributes:
264 ATTRIBUTE TYPE ATTRIBUTE VALUE
266 Interface Stability Obsolete Committed
272 \fBstmfadm\fR(1M), \fBattributes\fR(5)