The configuration file is a simple text file that contains descriptions of tape drives and the
corresponding initialization parameters. The parameter definition blocks are delimited by {}.
Specification of the drive description is restarted after each parameter definition block.
The drive descriptions and the parameter definitions consist of pairs name=value. The value is either
a numeric parameter, a string not containing blanks, or a quoted string. In case of a numeric parameter,
the postfix k or M can be used to give the value in units of 1024 or 1024 * 1024, respectively. If the
=value -part is omitted, the value "1" is used. If the character # is found from an input line, the rest
of the line is discarded. This allows use of comments in the definition file. The following example
contains definitions for one type of tape drives:
# The XY dat
manufacturer=XY-COMPANY model = "UVW DRIVE" {
scsi2logical=1 # Common definitions for all modes
can-bsr can-partitions auto-lock
# Definition of modes
mode1 blocksize=0 compression=1
mode2 blocksize=1024 compression=1
mode3 blocksize=0 compression=0
mode4 blocksize = 1k compression=0 }
The devices are identified using zero or more of the following keywords corresponding to the data
returned by the tape device as response to the SCSI INQUIRY command. The matches are case-sensitive and
performed up to the length defined in the configuration file (permitting use of partial matches).
manufacturer=
This keyword specifies the string that must match the vendor identification returned by the
device.
model= This keyword defines the string that must match the productidentification returned by the device.
revision=
This keyword matched the string that must match the productrevisionlevel returned by the device.
All of the matching initializations are collected in the order they are defined in the file. This means
that common parameters can be defined for all devices using zero keywords for a definition block. Another
consequence is that, for instance, some parameters can be easily given different values for a specific
firmware revision without repeating the parameters common to all revisions.
The tape parameters are defined using the following keywords. More thorough description of the parameters
can be found from the st(4) man page (not up to date when this is written) or from the file
drivers/scsi/README.st in the Linux kernel source tree. The keywords are matched using only the first
characters. The part of the keywords not used in matching is enclosed by []. The numeric values may be
specified either in decimal notation or hexadecimal notation (using the prefix 0x).
drive-[buffering]=value
The drive's buffering parameter is set to value. This parameter if common for all modes.
cleaning
The cleaning request notifying parameter is set to value
no-w[ait]
The immediate mode is used with commands like rewind if value is non-zero (i.e., the driver does
not wait for the command to finish).
weof-n[o-wait]
The immediate mode is used when writing filemarks if value is non-zero (i.e., the driver does not
wait for the command to finish).
mode=value
This keyword starts definition of tape mode value. The number of the mode must be between 1 and
4.
disab[led]=value
This mode is disabled for this device if value is non-zero. Can be used if some mode defined in a
more general definition should be disabled by a more specific definition for some device (for
example, for a device with buggy firmware level).
block[size]=value
The default tape block size is set to value. bytes. The block size zero means variable block
mode.
dens[ity]=value
The tape density code is set to value.
buff[ering]=value
The buffered writes by the driver in fixed block mode are enabled if value is non-zero.
async[-writes]=value
Asynchronous writes by the driver are enabled if value is non-zero.
read[-ahead]=value
Read-ahead by the driver in fixed block mode is allowed if value is non-zero.
two[-fms]=value
Two filemarks are written when a file being written to is closed if value is non-zero. By default,
one filemark is written.
comp[ression]=value
Compression of the data by the drive is enabled if value is non-zero. Note that the tape driver
can't enable compression for all drives that can compress data. Note also that some drives define
compression using density codes.
auto[-lock]=value
The tape drive door is locked automatically when the device file is opened if value is non-zero.
fast[-eom]=value
The MTEOM command is performed using the SCSI command that spaces directly to the end of medium if
value is non-zero. The drawback is that the file number in the status becomes invalid. By default,
spacing to end of medium is performed by spacing over filemarks until end of medium is detected
and the file number remains valid.
can-b[sr]=value
Backspacing over records is used by the driver when repositioning the tape when read-ahead is
enabled if value is non-zero.
noblk[limits]=value
The tape driver does not use the READ BLOCK LIMITS SCSI command when the device is being opened if
value is non-zero. This is for the drives that do not support this SCSI command.
can-p[artitions]=value
The support for tape partitions is enabled if value is non-zero.
scsi2[logical]=value
Logical block addresses are used in the MTSEEK and MTIOCPOS commands if value is non-zero. The
default is to use the device-specific addresses.
sili=value
If value is non-zero, the SILI bit is set when reading in variable block mode. This may speed up
reading blocks shorter than the read byte count. Set this only if you know that the drive supports
SILI and the HBA reliably returns transfer residual byte counts. Requires kernel version >=
2.6.26.
defs-for-w[rites]=value
The parameters defining the tape format (density, block size, etc.) are forced when writing
starts at the beginning of a tape if value is non-zero. The default is to change there parameters
each time the device is opened at the beginning of a tape (or the mode is changed in the middle of
a tape).
sysv=value
The System V tape semantics are used if value is non-zero. Otherwise the BSD semantics are used.
timeout=value
The normal timeout for the device is set to value seconds.
long-time[out]=value
The long timeout for the device is set to value seconds.