SCSI Block Disk Provider for COMSTAR [PSARC/2008/235 FastTrack]
John Forte
jforte at sac.sfbay.sun.com
Tue Apr 1 17:11:06 PDT 2008
I am sponsoring this fasttrack for Sumit Gupta. Requested binding is Patch,
timeout is 04/09/2008
- John
Template Version: @(#)sac_nextcase 1.64 07/13/07 SMI
This information is Copyright 2008 Sun Microsystems
1. Introduction
1.1. Project/Component Working Name:
SCSI Block Disk Provider for COMSTAR
1.2. Name of Document Author/Supplier:
Author: Sumit Gupta
1.3 Date of This Document:
01 April, 2008
4. Technical Description
SCSI Block Disk Provider for COMSTAR
1. Summary
This command (sbdadm) and associated driver (sbd) will provide SCSI block disk
device support for COMSTAR (PSARC/2007/523). The command sbdadm(1M) will
provide support for creating logical units utilizing any file or raw block
device as the backing store. Logical units created with sbdadm will be
available to the COMSTAR framework and can be further managed and provisioned
to storage clients in the network using stmfadm(1M). Logical units created
with sbdadm(1M) are persistent across reboots.
2. Documentation
NAME
sbdadm - SCSI Block Disk Command Line Interface
SYNOPSIS
sbdadm create-lu [-s, --size <size>] <filename>
sbdadm delete-lu <lu_name>
sbdadm import-lu <lu_name>
sbdadm list-lu
sbdadm modify-lu [-s, --size <size>] <lu_name>|<filename>
DESCRIPTION
The sbdadm command provides the ability to create SCSI disk type
Logical Units and register them with the SCSI Target Mode Framework
described by stmf(7D) so that they can be exposed outside of the
Solaris host to other initiators on the storage network.
The SCSI Logical Unit thus created uses the specified file as its
backing store to store the logical unit data. The size of the
Logical Unit is derived from the size of the file minus 64K
to store the control information for the Logical Unit. The size
of the Logical unit can also be specified by the command line
option in which case it is possible to create Logical Units
without initially occupying any physical storage. The maximum
supported size for a Logical Unit is 8 Exabytes.
filename Name of an existing file or a fully qualified path to a
raw block device.
lu_name The 32-byte hexadecimal representation of the logical
unit. This is available in the output of "sbdadm create-lu"
or from "sbdadm list-lu". This 32-byte hexadecimal
representation will also be available using the stmfadm(1M)
command.
SUBCOMMANDS
sbdadm -?
sbdadm create-lu [-s, --size <size>] <filename>
Create a logical unit that can be registered with stmf(7D).
-s, --size <size>
<size> is an integer value which can be followed by
one of the following letters to indicate :
k kilobyte
m megabyte
g gigabyte
t terabyte
p petabyte
e exabyte
If this option is not specified, <size> defaults to
the size of <filename>.
The size specified may exceed the size of the file or
device.
sbdadm delete-lu <lu_name>
Delete an existing logical unit that was created using "sbdadm
create". This removes the logical unit from stmf. Any
existing data on the logical unit remains intact.
sbdadm import-lu <filename>
Imports and loads a logical unit into stmf that was previously
created using "sbdadm create" and since deleted from stmf
using "sbdadm delete". On success, the logical unit is again
made available to stmf. filename is the filename that was used
in the sbdadm create-lu command for this logical unit.
sbdadm list-lu
List all logical units that were created using the "sbdadm
create" command.
sbdadm modify-lu [-s, --size <lun_sizek/m/g/t>] <lu_name>|<filename>
Modifies attributes of an existing logical unit created using
the "sbdadm create" command.
-s, --size <size>
lun_size is an integer value followed by one of the
following letters to indicate :
k kilobyte
m megabyte
g gigabyte
t terabyte
p petabyte
e exabyte
When this option is specified, the existing size of the
logical unit is modified to the new size.
The size specified may exceed the size of the file or
device.
EXAMPLES
Example 1 Creating a logical unit specifying a size.
The following commands create a file and then a logical unit using the
-s option to specify a size:
# touch /export/lun/0
# sbdadm create-lu -s 10g /export/lun/0
Created the following LU:
GUID DATA SIZE SOURCE
------------------------------------ ---------------- ----------------
6000ae401d000000000047f2a6320001 10737418240 /export/lun/0
Example 2 Creating a logical unit using the existing size of the
backing store.
The following command creates a logical unit using the existing size of
the backing store:
# sbdadm create-lu /dev/rdsk/c1t1d0s0
Created the following LU:
GUID DATA SIZE SOURCE
------------------------------------ ---------------- ----------------
6000ae4000144f21d92c47b0de300032 134283264 /dev/rdsk/c1t1d0s0
Example 3 Listing logical units
The following command will list all logical units that have been
registered with stmf(7D):
# sbdadm list-lu
Found 2 LU(s)
GUID DATA SIZE SOURCE
------------------------------------ ----------------- ----------------
6000ae401d000000000047f2a6320001 10737418240 /export/lun/0
6000ae4000144f21d92c47b0de300032 134283264 /dev/rdsk/c1t1d0s0
Example 4 Exporting a logical unit
The following commands create and then export a logical unit using
stmfadm(1M):
# sbdadm create-lu -s 10g /export/lun/0
Created the following LU:
GUID DATA SIZE SOURCE
------------------------------------ ---------------- ----------------
6000ae401d000000000047f2a6320001 10737418240 /export/lun/0
# stmfadm add-view 6000ae401d000000000047f2a6320001
Example 5 Deleting a logical unit and view entries
The following command will delete the logical unit as well as any view
entries that were created using stmfadm(1M):
# sbdadm delete-lu 6000ae401d000000000047f2a6320001
Example 6 Deleting a logical unit and keeping view entries
The following command will delete the logical unit but keep any view
entries that were created using stmfadm(1M):
# sbdadm delete-lu -k 6000ae401d000000000047f2a6320001
EXIT STATUS
0 Operation was successful
>0 An error occurred.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Availability | SUNWkdcu |
|_____________________________|_____________________________|
| Interface Stability | See below |
|_____________________________|_____________________________|
The command line interface (CLI) is Uncommitted. The CLI output is Not
an Interface.
SEE ALSO
stmfadm(1M), stmf(7D)
3. Interface table:
Interfaces Imported
-------------+--------------------+-------------------------
Interface | Classification | Comments
-------------+--------------------+-------------------------
kernel/fs | Consolidation | vn_open
| Private | vn_rdwr
| | VOP_FSYNC
| | VOP_GETATTR
| | VOP_PATHCONF
| | VOP_CLOSE
| |
| | contract-sbd in case directory
| |
stmf | Committed | Framework functions for LU
| | providers and port providers.
| | PSARC 2007/523
| |
libstmf | Committed | user library interfaces for
| | PSARC 2007/523
Interfaces Exported
-------------+--------------------+-------------------------
Interface | Classification | Comments
-------------+--------------------+-------------------------
sbdadm | Committed | CLI command and options
sbdadm output| Not an interface |
4. References
PSARC 2007/523 COMSTAR: Common Multiprotocol SCSI Target
6. Resources and Schedule
6.4. Steering Committee requested information
6.4.1. Consolidation C-team Name:
NWSC
6.5. ARC review type: FastTrack
6.6. ARC Exposure: open
More information about the opensolaris-arc
mailing list