DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

st01(HW)


st01 -- Storage Device Interface (SDI) tape target driver

Description

The st01 tape driver receives command requests from the kernel through the read(S), write(S), and ioctl(S) system calls. The st01 driver generates the appropriate commands and passes them through the host adapter driver to the tape device. When command execution is complete, the host adapter driver notifies st01 through an interrupt. After this notification, st01 performs any required error recovery, and indicates to the kernel that the input/output (I/O) request is complete. The st01 driver operates independent of the hardware used to communicate with the HBA bus.

I/O requests must be in length a multiple of the tape block length if the tape drive is in fixed-block mode. The default value for tape block length is whatever block length the tape hardware defaults to when it is powered on. I/O requests may be variable in length if the tape drive is set to variable block mode. See tapecntl(ADM) for details on setting the mode and block size of the tape drive. It is the responsibility of the user to ensure that the tape drive is set to the appropriate block size and fixed or variable block mode before attempting I/O to the tape device.

Only raw character interface files are provided. When opened, the tape is assumed to be positioned as desired. If a retension-on-open special file is opened, the tape is retensioned before any I/O is performed. When a T_RWD, T_RETENSION, T_LOAD, or T_UNLOAD ioctl is requested and the tape has been written, two file marks are written before the ioctl is executed.

The open(S) on a tape device will fail if a tape is not inserted, resulting in the error report EIO. An open(S) can also fail if the tape controller associated with the special file is not detected by the driver. In this case, the error reported is ENXIO.

The following table lists the actions that occur on close, depending on whether the file is designated as rewind or no-rewind, and if the tape was written or read:

Rewind on Tape Tape Action on
Close? Read? Written? Close
Yes Yes N/A Rewind tape
Yes N/A Yes Write two file marks and rewind tape
Yes No No Rewind tape
No No No No tape movement
No Yes N/A Position tape after next file mark
No N/A Yes Write one file mark and position tape after this file mark

 Rewind on   Tape    Tape       Action on
 Close?      Read?   Written?   Close
 Yes         Yes     N/A        Rewind tape
 Yes         N/A     Yes        Write two file marks and rewind tape
 Yes         No      No         Rewind tape
 No          No      No         No tape movement
 No          Yes     N/A        Position tape after next file mark
 No          N/A     Yes        Write one file mark and position
                                tape after this file mark

A read occurring when the tape is positioned immediately before a file mark returns zero bytes, and the tape is positioned after the file mark. As with other raw devices, seeks are ignored. Some tape devices allow both reads and writes to occur between rewinds; the st01 driver supports these devices.

ioctl calls

The ioctl(S) calls used by the st01 driver are documented on the sdi(HW) manual page.

Files

The following tape special files are provided for SCO Open Server Release 6.0.0. In the following table, 'C' is the controller number of the Host Adapter that the tape drive is attached to, 'B' is the bus or channel number that the tape drive is attached to, 'T' is the target ID of the tape drive and 'L' is the logical unit number of the tape drive. Also, 'U' is the tape drive's number in the system, starting at 0 ( zero ). For example, the first tape drive in the system could be referenced as /dev/rmt/ctape0

Tape Special File Action

 
/dev/rmt/cCbBtTlL Rewind tape on close
/dev/rmt/ctapeU  
/dev/rmt/cUs0  
/dev/rctU  
/dev/rStpU  
/dev/xctU  
/dev/xStpU  
/dev/rmt/cCbBtTlLn Don't rewind tape on close
/dev/rmt/ntapeU  
/dev/rmt/cUs0n  
/dev/nrctU  
/dev/nrStpU  
/dev/rmt/cCbBtTlLr Retension tape on open
/dev/rmt/rtapeU and rewind tape on close
/dev/rmt/cUs0r  
/dev/erctU  
/dev/rmt/cCbBtTlLnr Retension tape on open
/dev/rmt/nrtapeU and don't rewind tape on close
/dev/rmt/cUs0nr  
/dev/rmt/cCbBtTlLu Unload tape on close
/dev/rmt/utapeU  

 Tape Special File       Action
 /dev/rmt/cCbBtTlL       Rewind tape on close
 /dev/rmt/ctapeU
 /dev/rmt/cUs0
 /dev/rctU
 /dev/rStpU
 /dev/xctU
 /dev/xStpU
 /dev/rmt/cCbBtTlLn      Don't rewind tape on close
 /dev/rmt/ntapeU
 /dev/rmt/cUs0n
 /dev/nrctU
 /dev/nrStpU
 /dev/rmt/cCbBtTlLr      Retension tape on open
 /dev/rmt/rtapeU         and rewind tape on close
 /dev/rmt/cUs0r
 /dev/erctU
 /dev/rmt/cCbBtTlLnr     Retension tape on open
 /dev/rmt/nrtapeU        and don't rewind tape on close
 /dev/rmt/cUs0nr
 /dev/rmt/cCbBtTlLu      Unload tape on close
 /dev/rmt/utapeU

References

sdi(HW), tapecntl(C)
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 02 June 2005