'\" 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 "Aug 20, 2009" .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 .sp .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 SUB-COMMANDS .sp .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 .sp .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 .sp .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 .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 Obsolete Committed .TE .SH SEE ALSO .sp .LP \fBstmfadm\fR(1M), \fBattributes\fR(5)