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]
sbdadm create-lu [-s, --size size] filename
sbdadm delete-lu lu_name
sbdadm import-lu lu_name
sbdadm list-lu lu_name
sbdadm modify-lu [-s, --size size] lu_name | filename
The sbdadm command creates and manages SCSI-block-device-based logical units that are registered with the SCSI Target Mode Framework (STMF).
The sbdadm command supports the subcommands listed below. Note that if you enter a question mark as an argument to the command (sbdadm ?), sbdadm responds with a help display. create-lu [-s, --size size] filename
Create a logical unit that can be registered with the STMF. For the -s option, size is an integer followed by one of the following letters, to indicate a unit of size: k
kilobyte
megabyte
gigabyte
terabyte
petabyte
exabyte
Deletes an existing logical unit that was created using sbdadm create-lu. This effectively unloads the logical unit from the STMF framework. Any existing data on the logical unit remains intact.
Imports and loads a logical unit into the STMF that was previously created using sbdadm create-lu and was since deleted from the STMF using sbdadm delete-lu. On success, the logical unit is again made available to the STMF. filename is the filename used in the sbdadm create-lu command for this logical unit.
List all logical units that were created using the sbdadm create-lu command.
Modifies attributes of an logical unit created using the sbdadm create-lu command. For the -s option, size is an integer value followed by a unit specifier. The unit specifiers are as described above under create-lu. When this option is specified, the existing size of the logical unit is changed to the new size. The size specified can exceed the size of the file or device represented by lu_name.
sbdadm use the following operands: filename
Name of an existing file or a fully qualified path to a raw block device.
The 32-byte hexadecimal representation of the logical unit.
Example 1 Creating a Logical Unit
The following series of commands creates a 10-gigabyte logical unit.
# touch /export/lun/0 # sbdadm create-lu -s 10g /export/lun/0 # sbdadm create-lu /dev/rdsk/c1t1d0s0
Example 2 Listing Logical Units
The following command lists all logical units.
# sbdadm list-lu Found 2 LU(s) GUID DATA SIZE SOURCE -------------------------------- ----------- ------ 6000ae4000144f21d92c47b0dd650002 10737352704 /export/lun/0 6000ae4000144f21d92c47b0de300032 134283264 /dev/rdsk/c1t1d0s0
Successful completion.
An error occurred.
See attributes(7) for descriptions of the following attributes:
ATTRIBUTE TYPE ATTRIBUTE VALUE |
Interface Stability Obsolete Committed |
attributes (7), stmfadm (8)