|
Learn to use tape drive self-identification to automatically configure tape drives in the Solaris OS.
Contents
Overview
This article describes the existing methods of configuring SCSI tape drives in the Solaris OS and introduces tape drive self-identification: a new standards-based mechanism that automates the tape drive configuration process in the Solaris OS. Using tape drive self-identification, the Solaris SCSI tape driver st(7D) dynamically retrieves all the information needed to configure the tape drive. The SCSI command interface between the tape drive and the st driver is specified at the end of this article.
Tape Drive Support in the Solaris OS: The Traditional Way
To support a given tape drive, the Solaris OS needs to know its type, media density, supported options, and timeout values for different SCSI commands such as READ, WRITE, ERASE, and so on.
Traditionally in the Solaris OS, the above parameters are statically supplied using one of the following methods:
- User-editable configuration file: The parameters can be added in the
st.conf file.
- Built-in configuration table: The table can be pre-compiled from
st_conf.c into the st driver.
- Default values: Default values are used if
st cannot find matching parameters from the above file or table.
The default configuration is always available. Refer to st(7D) for more information about modifying the st.conf file.
For a new tape drive that is not part of the built-in configuration table, the user must gather all the parameters from the device manual and input these parameters into the st driver configuration file (st.conf). It is a very tedious and error-prone job.
Tape Drive Self-Identification: The New Way
Tape drive self-identification configures the tape automatically, using the parameters provided by the tape drive. It really rescues the user from diving into the device manual. Tape drive self-identification uses a few SCSI commands to directly query the required parameters from the tape drive. When the st driver gets all the answers, the tape drive is ready to use them in the Solaris OS. To maintain backward compatibility, st.conf takes precedence over tape drive self-identification. So the user is able to override the self-identification configuration.
Tape drive self-identification has these advantages over the traditional file-based configuration:
- Simpler: No user intervention needed.
- Faster: Automatic support for new tape drives in the Solaris OS.
- Standards-based: The interface is easy to adopt.
However, to use tape drive self-identification the tape drive needs to support this function in its firmware.
The commands that the tape devices need to support tape drive self-identification are listed in the following table.
 |
INQUIRY (12h)
|
0 |
Mandatory |
spc4r06, page 155 |
INQUIRY (12h)
|
0xB0 |
Optional |
ssc3r03, page 147
Sequential-access device
capabilities VPD page |
MODE SENSE (15h)
|
0x10 |
Mandatory |
spc4r06, page 324
ssc3r03c, page 132 |
MODE SENSE (15h)
|
0x0F |
Mandatory |
ssc3r03c, page 128 |
READ BLOCK LIMITS (05h)
|
N/A |
Mandatory |
ssc3r03c, page 93 |
REPORT DENSITY SUPPORT (44h)
|
N/A |
Mandatory |
ssc3r03c, page 102 |
REPORT SUPPORTED OPERATION CODES (A3h)
|
N/A |
Optional |
spc4r06, page 229
spc4r06, page 234 |
INQUIRY
Standard inquiry data should include T10 VENDOR IDENTIFICATION and PRODUCT IDENTIFICATION. Page 0xB0 should include the WORM bit to report if the tape device supports WORM mode operation.
MODE SENSE
In the mode parameter header, MEDIUM TYPE should be reported. And in the Block descriptor, DENSITY CODE and NUMBER OF BLOCKS should be reported. If the tape devices support variable block size, NUMBER OF BLOCKS should be zero, or, if NUMBER OF BLOCKS is greater than 64512, then the tape device should support variable block size and NUMBER OF BLOCKS should be allowed to set to zero by MODE SELECT.
READ BLOCK LIMITS
The tape drive should report the maximum block length limit using this command.
REPORT DENSITY SUPPORT
PRIMARY DENSITY CODE should be reported. If the tape device supports multiple density values, it should report multiple density support data descriptor blocks.
ASSIGNING ORGANIZATION
This value should be reported. It is used to determine the tape type. Tape drives with one of the following ASSIGNING ORGANIZATION values can be self-identified:
REPORT SUPPORTED OPERATION CODES
One_command parameter data format with Command timeouts descriptor should be reported. The commands for which a timeout value should be reported are:
ERASE
READ
WRITE
SPACE
LOAD
REWIND
INQUIRY
For More Information
T10 Technical Committee: Provides information about SCSI Storage Interfaces
About the Author
Larry Liu is a software engineer in the Storage Platform Software Group at Sun Microsystems Inc., developing iSCSI, Fibre Channel, MPxIO and Target device drivers. Larry Liu has an M.S. from Loughborough University in the U. K. and has been working for Sun since September 2005. Larry has various software and hardware development experience in the telecommunications and computer industries.
Grant Zhang is a software engineering manager in the Solaris Storage Group at Sun Microsystems Inc., developing storage platform software for the Solaris OS. Grant has an M.S. in Computer Engineering from Queen's University in Canada and currently is pursuing an M.B.A. degree at Peking University. Before joining Sun, Grant held various software development and architecture roles in Canada and China.
|