old-www/HOWTO/SCSI-2.4-HOWTO/st.html

338 lines
6.0 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML
><HEAD
><TITLE
>Tape driver (st)</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="The Linux 2.4 SCSI subsystem HOWTO"
HREF="index.html"><LINK
REL="UP"
TITLE="Upper level drivers"
HREF="ulevel.html"><LINK
REL="PREVIOUS"
TITLE="CDROM driver (sr or scd)"
HREF="sr.html"><LINK
REL="NEXT"
TITLE="Generic driver (sg)"
HREF="sg.html"></HEAD
><BODY
CLASS="sect1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>The Linux 2.4 SCSI subsystem HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="sr.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 9. Upper level drivers</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="sg.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="st"
></A
>9.3. Tape driver (st)</H1
><P
>&#13;The tape driver interface is documented in the file
<TT
CLASS="filename"
>/usr/src/linux/drivers/scsi/README.st</TT
> and on the
st(4) man page (type <B
CLASS="command"
>man st</B
>). The file
<TT
CLASS="filename"
>README.st</TT
> also documents the different parameters and
options of the driver together with the basic mechanisms used in the driver.
</P
><P
>&#13;The tape driver is usually accessed via the <B
CLASS="command"
>mt</B
> command
(see <B
CLASS="command"
>man mt</B
>). <B
CLASS="command"
>mtx</B
> is an associated
program for controlling tape autoloaders
(see <A
HREF="http://mtx.sourceforge.net"
TARGET="_top"
>&#13;<TT
CLASS="literal"
>mtx.sourceforge.net</TT
></A
>).
</P
><P
>&#13;The st driver detects those SCSI devices whose peripheral device type
is "Sequential-access" (code number 1) unless they appear on the
driver's "reject_list". [Currently the OnStream tape drives (described
in a following section) are the only entry in this reject_list.]
</P
><P
>&#13;The st driver is capable of recognizing 32 tape drives. There are
8 device file names for each tape drive: a rewind and non-rewind
variant for each of 4 modes (numbered 0 to 3). See the tape device
file name examples in <A
HREF="dnames.html"
>Section 3.2</A
> on device names. Any number of
tape drives (up to the overall limit of 32) can be added after the st
driver is loaded.
</P
><P
>&#13;ATAPI tape drives can be controlled by this driver with help from the
ide-scsi pseudo adapter driver. The discussion in <A
HREF="sr.html#sratapi"
>Section 9.2.4</A
>
also applies for ATAPI tape drives (and ATAPI floppies).
</P
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="stbparams"
></A
>9.3.1. st boot parameters</H2
><P
>&#13;<TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;st=xxx[,yyy] where xxx is one of the following:
buffer_kbs:&#60;n&#62;
write_threshold_kbs:&#60;n&#62;
max_buffers:&#60;n&#62;
max_sg_segs:&#60;n&#62;
(The old boot parameters st=aa[,bb[,cc[,dd]]] supported but deprecated)
</PRE
></FONT
></TD
></TR
></TABLE
>
</P
><P
>&#13;The default driver buffer size (buffer_kbs) is 32 (i.e. 32 KB).
The default asynchronous write threshold (write_threshold_kbs) is 30
(i.e. 30 KB).
The default number of buffers allocated at initialization (max_buffers)
is 4.
The default number of scatter/gather segments to use (max_sg_segs) is
32.
</P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="stmparams"
></A
>9.3.2. st module parameters</H2
><P
>&#13;<TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;buffer_kbs=&#60;n&#62;
write_threshold_kbs=&#60;n&#62;
max_buffers=&#60;n&#62;
max_sg_segs=&#60;n&#62;
</PRE
></FONT
></TD
></TR
></TABLE
>
</P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="stproc"
></A
>9.3.3. st proc interface</H2
><P
>&#13;None.
</P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="stosst"
></A
>9.3.4. osst driver for OnStream devices</H2
><P
>&#13;There is an auxiliary tape driver for tape drives manufactured by
OnStream. It is an additional upper level driver and can co-exist with
the st driver. Its driver name is "osst" (as is its module name).
</P
><P
>&#13;The OnStream SC-x0 SCSI tape drives can not be driven by the
standard st driver, but instead need this special osst driver and
use the <TT
CLASS="filename"
>/dev/osst&#60;x&#62;</TT
> char device nodes (major 206).
[Where &#60;x&#62; follows the same naming scheme as st devices outlined
in <A
HREF="dnames.html"
>Section 3.2</A
>.]
Via usb-storage and ide-scsi, you may be able to drive the USB-x0
and DI-x0 drives as well. Note that there is also a second generation
of OnStream tape drives (ADR-x0) that supports the standard SCSI-2
commands for tapes (QIC-157) and can be driven by the standard
driver st. For more information, you may have a look at the kernel
source file <TT
CLASS="filename"
>/usr/src/linux/drivers/scsi/README.osst</TT
>.
More info on the OnStream driver may be found on
<A
HREF="http://linux1.onstream.nl/test/"
TARGET="_top"
>&#13;<TT
CLASS="literal"
>linux1.onstream.nl/test/</TT
></A
>.
</P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="sr.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="sg.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>CDROM driver (sr or scd)</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ulevel.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Generic driver (sg)</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>