OpenSolaris Project: Object Storage Device (OSD) support for Solaris
View the leaders for this project
Project Observers
Endorsing communities
NFS
Storage
Welcome to the Solaris Object Storage Device (OSD) Project home page.
This project consists of the Solaris SCSA-compliant device drivers and
related software to provide both initiator and target support for
storage devices that adhere to the SCSI Object-Based Storage Device
(OSD) command protocol, as per the T10/1729-D Revision 03 specification
(available on the T10 web site).
Please feel free to subscribe to the osd-discuss email discussion list for this
project and post any/all questions and inquiries there.
Thank you for your interest and support!
Based on this design the project will deliver the following components:
- Target Driver: sosd
- Kernel Module: scsi_osd
Current development is focused on design, documentation and implementation of scsi_osd kernel module, that supports the API described in the Design document below. The existing sosd target driver is being reworked to interact with scsi_osd.
The source code below is the early version of the OSD support and includes both the sosd target driver (on the initiator side).
Initiator Support
The following tarball files are available on the 'Files' page for this
project:
osd-bin-20061211.sparc.tar.bz2 - OSD project binary
files
osd-src-20061211.sparc.tar.bz2 - OSD project source
code files
These tarballs contain the following project files:
OPENSOLARIS.LICENSE.txt - CDDL license file
sosd - Solaris OSD target driver binary file
sosd.c - OSD target driver source code file
sosd.h - OSD target driver header file
mksosd - script to compile sosd driver
osd.h - project header file
scsi_osd.h - project header file for T10 spec info
osdtest.c - source code for userland test program
using uscsi(7I)
osdtest - executable binary for userland test program
SUNW_sosd_link.so - device node link generator
iscsi - iscsi driver binarr file with extended CDB
support
All files are available under the CDDL license version 1.0. See the 'Notes' section below for additional information.
Setup Procedure
1. System and Software Requirements:
- SPARC system, Ultra 60 or higher
- Solaris Express, build 47 or later
- SUNWonbld package, 20060918 or later
- Sun Studio11 compiler, 20060829 or later
2. Install Solaris Express build 47 or later.
3. Enable network services:
# netservices open
4. Edit /etc/auto_master as follows, then reboot:
#
# Master map for automounter
#
/opt -null
<<ADD THIS LINE>>
+auto_master
/net
-hosts
-nosuid,nobrowse
/home
auto_home -nobrowse
5. Install OpenSolaris onbld package (20060918 or later):
# cp SUNWonbld-20060918.sparc.tar.bz2 /var/tmp
# cd /var/tmp
# bzip2 -cd
/var/tmp/SUNWonbld-20060918.sparc.tar.bz2 | tar xf -
# pkgadd -d onbld SUNWonbld
<<output>>
Installation of <SUNWonbld> was
successful.
6. Install OSD project files:
# mkdir /osd
# cp osd-bin-20061211.sparc.tar.bz2
osd-src-20061211.sparc.tar.bz2 /osd
# cd /osd
# bzip2 -cd osd-bin-20061211.sparc.tar.bz2 | tar xf -
# bzip2 -cd osd-src-20061211.sparc.tar.bz2 | tar xf -
# mv /kernel/drv/sparcv9/iscsi
/kernel/drv/sparcv9/iscsi.`date '+saved_%m-%d-%y_%H:%M:%S'`
# cp -p iscsi /kernel/drv/sparcv9/iscsi
# cp -p sosd /kernel/drv/sparcv9/sosd
# cp -p SUNW_sosd_link.so
/usr/lib/devfsadm/linkmod/SUNW_sosd_link.so
# cp -p scsi_osd.h /usr/include/sys/scsi/scsi_osd.h
# cd /kernel/drv/sparcv9
# add_drv -i '"scsiclass,11"' sosd
<<May get the following warning,
this is OK:>>
Warning: Driver (sosd)
successfully added to system but failed to attach
# reboot
7a. Connect to OSD target (iscsi-based example, static configuration)
# iscsiadm modify discovery --static enable
# iscsiadm add static-config <Target
Name>,<Target IP Address>
<<possible driver
output here>>
# devfsadm -v <<This creates the
/dev/osd links>>
<<possible driver
output here>>
# ls -al /devices/iscsi
<<output>>
# ls -al /dev/osd
<<output>>
# iscsiadm list target -v
<<output>>
7b. Connect to OSD target (iscsi-based example using SendTargets)
# iscsiadm add discovery-address <Target IP Address>
# iscsiadm modify discovery -t enable
# devfsadm -v <<This creates the
/dev/osd links>>
<<possible driver
output here>>
# ls -al /devices/iscsi
<<output>>
# ls -al /dev/osd
<<output>>
# iscsiadm list target -v
<<output>>
8. Run default 'osdtest' test program binary
# cd /osd
# ./osdtest /dev/osd/osd0,root
<<output>>
9. Install the Studio11 compiler:
# cp sunstudio11-ii-20060829-sol-sparc.tar.Z /var/tmp
# cd /opt
# mkdir SUNWspro
# cd SUNWspro
# /usr/sfw/bin/gtar -zxvf
/var/tmp/sunstudio11-ii-20060829-sol-sparc.tar.Z
<<output>>
10. Recompile & run the test program:
# PATH=/opt/SUNWspro/bin:$PATH ; export PATH
# echo $PATH
/opt/SUNWspro/bin:/usr/sbin:/usr/bin
# which cc
/opt/SUNWspro/bin/cc
# cd /osd
# cc -I /usr/include/sys/scsi -o osdtest.new
osdtest.c
# ./osdtest.new /dev/osd/osd0,root
<<output>>
11. Recompile & reload sosd driver
# ./mksosd
/opt/SUNWspro/bin:/usr/sbin:/usr/bin
/opt/SUNWspro/bin/cc
# cp -p sosd /kernel/drv/sparcv9/sosd
# modinfo | grep sosd
209 7b630000 138b8 303
1 sosd (Solaris SCSI OSD Target Driver )
# modunload -i 209
<<output>>
# modload sosd
<<output>>
# ./osdtest.new /dev/osd/osd0,root
<<output>>
Notes:
- Solaris Express, the SUNWonbld package, and the Sun Studio11
compiler
must be downloaded from the relevant OpenSolaris web pages.
- Installation & setup are performed as 'root'.
- No specific OSD target device is presumed.
- Limitations of the current implementation include:
- NOSEC security mode only.
- OSD capabilities are not supported.
- Bididrectional data transfers are not
supported.
Multi-segment Data-IN and Data-OUT buffers are not supported.
- Not all OSD service actions are
supported/tested. In particular,
the PERFORM SCSI COMMAND, PERFORM TASK
MANAGEMENT FUNCTION, SET
KEY, and SET MASTER KEY service actions
are not supported.
- SCSI Sense Data may be limited to 20 bytes maximum
in certain cases.
- I/O operations are subject to system limitations
such as maximum
I/O data transfer lengths.
- This software is provided solely on an "as-is" basis and is
intended for developmental purposes only. Any and
all interfaces
exported by the software in this project are subject to
change
at any time without notice.
Target Support
iscsitgtd usage with OSD support has been deprecated. osdt, which is a COMSTAR lu provider is now being used as an OSD target. Details of this project will be available shortly on COMSTAR website -> Related Projects section.
|