1STINIT(8)                   System Manager's Manual                  STINIT(8)
2
3
4

NAME

6       stinit - initialize SCSI magnetic tape drives
7

SYNOPSIS

9       stinit [-f conf-file] [-h] [-p] [-r] [-v] [devices...]
10

DESCRIPTION

12       This  manual page documents the tape control program stinit can used to
13       initialize SCSI tape drive modes at system startup, after  loading  the
14       tape  driver as module, or after introduction of new device to the SCSI
15       subsystem at run-time. The initialization is performed by sending ioctl
16       commands  to the drive. The commands are defined in a text file that is
17       indexed using the inquiry data the drive returns (manufacturer, device,
18       revision).  Values  for  all of the general and mode-specific SCSI tape
19       parameters up to Linux version 2.6.0 can be initialized.
20

OPTIONS

22       -f conf-file
23              Specifies the name of the text file containing  the  definitions
24              for  different tape drive types. By default stinit tries to find
25              the definition file /etc/stinit.def.
26
27       -h     Print the usage information.
28
29       -p     The definition file is parsed but no tape  drive  initialization
30              is  attempted. This option can be used for testing the integrity
31              of a definition file after changes have been made.
32
33       -r     Rewind every device being initialized.
34
35       -v     The more -v options (currently up to two), the more verbose out‐
36              put.
37
38       --version
39              Print the program version.
40

THE DEVICES BEING INITIALIZED

42       If  the  program is started without arguments, it tries to find all ac‐
43       cessible SCSI tape devices and the device files for the different modes
44       of  the  devices. The tape drives are searched in the scanning order of
45       the kernel and searching is stopped at the first non-existing tape. All
46       of the found devices are initialized if a matching description is found
47       from the parameter file. Note that a mode for a device is not  initial‐
48       ized  if  the corresponding device file is not found even if a matching
49       description for the mode exists. The  non-rewind  device  is  preferred
50       over  the auto-rewind device for each mode. If the directory /dev/tapes
51       is found, the devfs filesystem is assumed to be mounted on /dev. Other‐
52       wise, the directories /dev/scsi and /dev are scanned for device files.
53
54       SCSI  tape  drives  can  be initialized selectively using program argu‐
55       ments. A numeric argument specifies the number of the tape drive in the
56       scanning  order  of  the  kernel. A file name specifies that the device
57       corresponding to this name is to be initialized. If the  file  name  is
58       given without the directory specification, the program searches for the
59       name in the device directories /dev/scsi  and  /dev.   Only  full  path
60       names are supported with devfs.
61

THE CONFIGURATION FILE

63       The configuration file is a simple text file that contains descriptions
64       of tape drives and the corresponding initialization parameters. The pa‐
65       rameter  definition  blocks  are delimited by {}.  Specification of the
66       drive description is restarted after each parameter definition block.
67
68       The drive descriptions and the parameter definitions consist  of  pairs
69       name  =  value.   The value is either a numeric parameter, a string not
70       containing blanks, or a quoted string. In case of a numeric  parameter,
71       the  postfix  k  or M can be used to give the value in units of 1024 or
72       1024 * 1024, respectively. If the =value -part is  omitted,  the  value
73       "1"  is  used. If the character # is found from an input line, the rest
74       of the line is discarded. This allows use of comments in the definition
75       file.  The  following example contains definitions for one type of tape
76       drives:
77
78              # The XY dat
79              manufacturer=XY-COMPANY model = "UVW DRIVE" {
80              scsi2logical=1 # Common definitions for all modes
81              can-bsr can-partitions auto-lock
82              # Definition of modes
83              mode1 blocksize=0 compression=1
84              mode2 blocksize=1024 compression=1
85              mode3 blocksize=0 compression=0
86              mode4 blocksize = 1k compression=0 }
87
88       The devices are identified using zero or more of the following keywords
89       corresponding  to  the  data returned by the tape device as response to
90       the SCSI INQUIRY command. The matches are case-sensitive and  performed
91       up  to  the length defined in the configuration file (permitting use of
92       partial matches).
93
94       manufacturer=
95              This keyword specifies the string that  must  match  the  vendor
96              identification returned by the device.
97
98       model= This  keyword  defines  the  string  that must match the product
99              identification returned by the device.
100
101       revision=
102              This keyword matched the string that must match the product  re‐
103              vision level returned by the device.
104
105       All of the matching initializations are collected in the order they are
106       defined in the file. This means that common parameters can  be  defined
107       for  all  devices  using  zero keywords for a definition block. Another
108       consequence is that, for instance, some parameters can be easily  given
109       different values for a specific firmware revision without repeating the
110       parameters common to all revisions.
111
112       The tape parameters are defined  using  the  following  keywords.  More
113       thorough  description of the parameters can be found from the st(4) man
114       page (not up to date when this is  written)  or  from  the  file  driv‐
115       ers/scsi/README.st  in  the  Linux kernel source tree. The keywords are
116       matched using only the first characters. The part of the  keywords  not
117       used in matching is enclosed by []. The numeric values may be specified
118       either in decimal notation or hexadecimal notation  (using  the  prefix
119       0x).
120
121       drive-[buffering]=value
122              The drive's buffering parameter is set to value.  This parameter
123              if common for all modes.
124
125       cleaning
126              The cleaning request notifying parameter is set to value
127
128       no-w[ait]
129              The immediate mode is used with commands like rewind if value is
130              non-zero (i.e., the driver does not wait for the command to fin‐
131              ish).
132
133       mode=value
134              This keyword starts definition of tape mode value.   The  number
135              of the mode must be between 1 and 4.
136
137       disab[led]=value
138              This  mode is disabled for this device if value is non-zero. Can
139              be used if some mode defined in a more general definition should
140              be  disabled  by a more specific definition for some device (for
141              example, for a device with buggy firmware level).
142
143       block[size]=value
144              The default tape block size is set to value.  bytes.  The  block
145              size zero means variable block mode.
146
147       dens[ity]=value
148              The tape density code is set to value.
149
150       buff[ering]=value
151              The  buffered  writes  by the driver in fixed block mode are en‐
152              abled if value is non-zero.
153
154       async[-writes]=value
155              Asynchronous writes by the driver are enabled if value  is  non-
156              zero.
157
158       read[-ahead]=value
159              Read-ahead by the driver in fixed block mode is allowed if value
160              is non-zero.
161
162       two[-fms]=value
163              Two filemarks are written when a file being written to is closed
164              if value is non-zero. By default, one filemark is written.
165
166       comp[ression]=value
167              Compression of the data by the drive is enabled if value is non-
168              zero. Note that the tape driver can't enable compression for all
169              drives that can compress data. Note also that some drives define
170              compression using density codes.
171
172       auto[-lock]=value
173              The tape drive door is locked automatically when the device file
174              is opened if value is non-zero.
175
176       fast[-eom]=value
177              The  MTEOM command is performed using the SCSI command that spa‐
178              ces directly to the end of medium  if  value  is  non-zero.  The
179              drawback  is that the file number in the status becomes invalid.
180              By default, spacing to end of medium  is  performed  by  spacing
181              over filemarks until end of medium is detected and the file num‐
182              ber remains valid.
183
184       can-b[sr]=value
185              Backspacing over records is used by the driver when  reposition‐
186              ing the tape when read-ahead is enabled if value is non-zero.
187
188       noblk[limits]=value
189              The  tape driver does not use the READ BLOCK LIMITS SCSI command
190              when the device is being opened if value is  non-zero.  This  is
191              for the drives that do not support this SCSI command.
192
193       can-p[artitions]=value
194              The support for tape partitions is enabled if value is non-zero.
195
196       scsi2[logical]=value
197              Logical block addresses are used in the MTSEEK and MTIOCPOS com‐
198              mands if value is non-zero. The default is to  use  the  device-
199              specific addresses.
200
201       sili=value
202              If  value is non-zero, the SILI bit is set when reading in vari‐
203              able block mode. This may speed up reading blocks  shorter  than
204              the  read  byte  count. Set this only if you know that the drive
205              supports SILI and the HBA  reliably  returns  transfer  residual
206              byte counts. Requires kernel version >= 2.6.26.
207
208       defs-for-w[rites]=value
209              The  parameters  defining  the tape format (density, block size,
210              etc.)  are forced when writing starts at the beginning of a tape
211              if  value is non-zero. The default is to change there parameters
212              each time the device is opened at the beginning of  a  tape  (or
213              the mode is changed in the middle of a tape).
214
215       sysv=value
216              The  System V tape semantics are used if value is non-zero. Oth‐
217              erwise the BSD semantics are used.
218
219       timeout=value
220              The normal timeout for the device is set to value seconds.
221
222       long-time[out]=value
223              The long timeout for the device is set to value seconds.
224

RETURN VALUE

226       The program exits with value one if the command line is incorrect,  the
227       definition  file  is  not  found, or option -p is given and parsing the
228       definition file fails. In all other cases  the  return  value  is  zero
229       (i.e.,  failing  of initialization is not currently signaled by the re‐
230       turn value).
231

RESTRICTIONS

233       With the exception of the -p option, the program can be  used  only  by
234       the superuser. This is because the program uses ioctls allowed only for
235       the superuser.
236

AUTHOR

238       The program is written by Kai Makisara <Kai.Makisara@kolumbus.fi>,  and
239       is currently maintained by Iustin Pop <iustin@k1024.org>.
240
242       The  program  and  the  manual  page  are  copyrighted by Kai Makisara,
243       1998-2008.  They can be distributed according to the GNU Copyleft.
244

BUGS

246       Please report bugs to <https://github.com/iustin/mt-st>.
247

SEE ALSO

249       st(4) mt(1)
250
251
252
253                                  April 2008                         STINIT(8)
Impressum