SunVTS 3.0 Test Reference Manual

Chapter 40 Tape Drive Test (tapetest)

The tapetest synchronous I/O test writes a pattern to a specified number of blocks (or, for a SCSI tape, writes to the end of the tape). The tapetest then rewinds the tape and reads and compares the data just written. The tapetest asynchronous I/O test sends a series of up to five asynchronous read/write requests to the tape drive, writing to the tape and then reading and comparing the data. The tapetest file test writes four files to the tape and then reads them back, comparing the data. For tape library testing, the pass count is incremented only after all tapes in the library have been tested.


Note -

If you have a tape drive in your system, load a blank writable tape (scratch tape) before you start SunVTS. If you fail to do this, the tapetest option displays drive type:unknown on the option menu for the tapetest.


tapetest Options

tapetest supports 4-mm, 8-mm, DLT, 1/4-inch cartridge, and 1/2-inch front-load tape drive testing. The options available for each of the tape devices differ slightly. An example of the option pop-up menu for a device is shown in Figure 40-1.

The Async I/O subtest uses the asynchronous read and write feature of the Solaris tape driver to exercise tape drives. In read-only mode the test sends a maximum of four asynchronous read packets, each with a random size and a random offset, to the tape drive. The test then waits for all outstanding I/O activity to complete before issuing another round of packets. This process continues until the whole area being tested has been covered. In read-write mode, one write packet is issued for every four read packets to ensure a spot check of the write operation. The area of the tape to be tested is written to first in order for the test to work correctly. This test is only supported under Solaris 2.6, Solaris 7 and compatible releases.

Figure 40-1 tapetest Option Menu (4-mm tape drives)

Graphic


Note -

This test does not immediately stop after being disabled.


Figure 40-1 shows an example of the options menu for a 4-mm tape drive.


Note -

The option menus for the 1/4-inch, 1/2-inch, DLT, and 8-mm tape drives differ slightly from Figure 40-1.


Table 40-1 tapetest Options

tapetest Options

Description 

Type 

Normal tape drive or tape library (stacker). 

# of Tapes 

The number of tapes in the tape library. tapetest registers a single tape library pass only after all tapes in the library pass.

Density 

The following settings are available for most tape drives: 

-Low: Tests the l tape device.

-Medium: Tests the m tape device.

-Compression: Tests the c tape device.

-All: Tests the l, m, and c tape devices.

For half-inch tape drives, the available settings are 800, 1600, and 6250 BPI (blocks per inch). 

For certain QIC drives select QIC-11 (1-byte block ID) mode, QIC-24 (4-byte block ID) mode, or both. 

Mode 

If you enable Write/Read mode, the test first writes to the tape and then reads it back to compare. If you enable Read_Only mode, the test assumes the tape has been properly written and merely reads and compares. This mode is useful to check proper head alignment. 

Length 

The amount of the tape to be tested. The choices are: 

-EOT: The default; tests to the entire tape.

-Long: The SCSI tape tests 70,000 blocks of the tape.

-Short: Only the first 1000 blocks are tested.

-Specified: You must type the number of blocks to be tested in the # of blocks field.

# of Blocks 

If you select Specified under the Length option, you must type the number of blocks you want to test. 

Blocksize 

Block size specification. This option is only available for Tandberg QIC tape drives. There are two possible values; 512-bytes for use with older tape media that have transfer size restrictions, or 64-kbytes for use with current, high-capacity tape media. 

File Test 

The tape file test sequence is as follows: 

-Writes three files  

-Rewinds 

-Reads part of the first file 

-Forward spaces to the start of the second file 

-Reads the second file 

-Forward spaces to the start of the third file 

-Tries to read to the end of that file for SCSI tapes only, the tape file test tries to backspace to the start of the second file and read it 

Retension 

When enable is selected, the program retensions the tape. 

Media Test Method 

Sync I/O: tapetest reads and or writes the number of blocks selected in Length. 

Async I/O: tapetest makes four asynchronous read requests to the tape drive. If read and write testing is selected, one asynchronous write request is also sent. The test continues after completing the requests. 

Note - When testing Tandberg QIC drives, Async I/O testing is restricted to read-only due to asynchronous behavior differences with other tape drives. 

tapetest Test Modes

The tapetest supports all three modes. It performs different test schemes on the tape device, according to the mode you select.

Table 40-2 tapetest Test Modes

Test Mode 

Description 

Connection Test 

In this mode, tapetest verifies that the drive can be opened and that the drive type can be determined. If both checks are successful, or if the drive is currently busy, then the test passes. The tapetest fails if the open operation is unsuccessful for any reason other than the drive is busy.

Functional Test 

tapetest checks the status, rewinds the tape, erases and retensions it. If the device is a cartridge tape, tapetest writes a pattern to nblks or eot (default), rewinds the tape, and then reads and compares of the pattern.

If you invoke SunVTS through SyMON, the following Functional test description applies: tapetest opens the device and reads several blocks from it. If the read operation is successful, the test passes. On the other hand, if the device is busy or if no tape cartridge can be found in the drive, the test cannot run and fails.

tapetest Command Line Syntax

/opt/SUNWvts/bin/tapetest standard_arguments -o dev=device_name,s=block_count,d=density,m=mode,l=length,method=method,ft=enables/disables,ret=enables/disables,dat=dat_type,8mm=8mm_type,num=magazine_size,blocksize=block_size

Table 40-3 tapetest Command Line Syntax

Argument 

Explanation 

dev=device_name

Specifies the device_name of the tape drive (required).

s=block_count

Specifies the number of blocks to be tested. 

d=density

Specifies the density of the tape to open. 

m=mode

Enables either the Write_Read or Read_Only tests. 

l=length

Specifies the length of the test (EOT, Specified, Long, or Short). 

method=method

Specifies the media test method (SyncI/O and or AsyncI/O) used. 

ft=enables/disables

Enables or disables the file test. 

ret=enables/disables

Enable or disables tape retention. 

dat=dat_type

If you are testing a digital audio tape drive, specify whether it is a regular DAT drive or a DAT stacker. The choices are DAT and DAT_Stacker.

8mm=8mm_type

If you are testing an 8-mm tape drive, specify whether it is a regular 8-mm tape drive or a tape library. The command line choices are 8mm and 8mm_Library.

num=magazine_size

If you are testing a tape library, specify the magazine size. 

blocksize=block_size

If you are testing a Tandberg QIC drive, specify whether to use a 64 kbyte block transfer or a 512 byte block transfer. Use 512 bytes when testing older media in the drive. 


Note -

64-bit tests are located in the sparcv9 subdirectory: /opt/SUNWvts/bin/sparcv9/testname. If a test is not present in this directory, then it may only be available as a 32-bit test. For more information refer to "32-Bit and 64-Bit Tests".


tapetest Error Messages

Table 40-4 tapetest Error Messages

 

Error Message 

Probable Cause(s) 

Recommended Action 

6000

Missing device name

No device name is specified. 

Retry test with correct device name specification. 

6001

failed ioctl on unload and load next tape: err_code = number!

This stacker/library unit may lack the Automatic Cycle option. 

Run the test with Single Pass Option enabled. 

6002

Cannot open device_name: error_message

No tape media in drive. 

Load tape media and retry test. 

6005

Cannot close device_name: error_message

Bad drive. 

Retry test; if problem persists, check or replace the drive. 

6006

text write failed on error_message, block number: EOF reached

EOF reached prematurely. 

Retry test with reduced blocksize specification or until EOF. 

6007

text write failed on device_name, block number: error_message, sense key(0xvalue) = text

Drive needs attention. 

Perform action to reset sense key and retry the test. 

6008

text read failed on device_name, block number: EOF reached

EOF reached prematurely. 

Retry test with reduced blocksize specification or until EOF. 

6009

text read failed on device_name, block number: error_message, sense key(0xvalue) = text

Drive needs attention. 

Perform action to reset sense key and retry test. 

6010

text compare failed on device_name, block number, offset number, pattern 0xvalue, data= 0xvalue

Bad drive. 

Retry test; if problem persists, check or replace the drive. 

6011

device_name tape MTIOCGETDRIVETYPE ioctl: number

Bad drive. 

Retry test; if problem persists, check or replace the drive. 

6012

text failed on device_name: error_message

Bad drive. 

Retry test; if problem persists, check or replace the drive. 

6013

Failed Connection test on device_name:error_message

Broken cable. 

Check or replace the cable. 

Bad drive. 

Check or replace the drive. 

6014

Failed Online test:device_name

Device may be in use. 

Retry later. 

6015

Failed Online test:device_name:error_message

No tape media in drive. 

Load tape media and retry test. 

6016

Online test was unsuccessful:device_name

No tape media in drive. 

Load tape media and retry test. 

6017

Failed Online read test:device_name

Bad drive. 

Retry test; if problem persists, check or replace the drive. 

6018

Open Failed on device_name: error_message

Broken cable. 

Check or replace the cable. 

Bad drive. 

Check or replace the drive. 

6018

recon: No Corresponding SCSI disk device

 

 

6019

Needs both SCSI disk and SCSI tape to run the test

 

 

6020

Couldn't retension 'device_name'

 

 

6021

Couldn't read file 'device_name'

 

 

6022

SCSI disconnect/reconnect failed

 

 

6023

Spurious signal received from child

 

 

2005 

Tandberg QIC Read/Write media failure. 

Incorrect test settings for older QIC tape media. 

Retry the test and specify a 512-byte blocksize. 

Retry the test with a read-only setting. 

Use the highest capacity tape media that the drive will allow (refer to tape drive documentation for QIC media compatibilities.).