Copyright (C) 2000-2012 |
Manpages STINITSection: Maintenance Commands (8)Updated: November 2001 Index Return to Main Contents NAMEstinit - initialize SCSI magnetic tape drivesSYNOPSISstinit [-f conf-file] [-h] [-p] [-r] [-v] [devices...]DESCRIPTIONThis manual page documents the tape control program stinit can used to initialize SCSI tape drive modes at system startup, after loading the tape driver as module, or after introduction of new device to the SCSI subsystem at run-time. The initialization is performed by sending ioctl commands to the drive. The commands are defined in a text file that is indexed using the inquiry data the drive returns (manufacturer, device, revision). Values for all of the general and mode-specific SCSI tape parameters up to Linux version 2.4.15 can be initialized.OPTIONS
THE DEVICES BEING INITIALIZEDIf the program is started without arguments, it tries to find all accessible SCSI tape devices and the device files for the different modes of the devices. The tape drives are searched in the scanning order of the kernel and searching is stopped at the first non-existing tape. All of the found devices are initialized if a matching description is found from the parameter file. Note that a mode for a device is not initialized if the corresponding device file is not found even if a matching description for the mode exists. The non-rewind device is preferred over the auto-rewind device for each mode. If the directory /dev/tapes is found, the devfs filesystem is assumed to be mounted on /dev. Otherwise, the directories /dev/scsi and /dev are scanned for device files.SCSI tape drives can be initialized selectively using program arguments. A numeric argument specifies the number of the tape drive in the scanning order of the kernel. A file name specifies that the device corresponding to this name is to be initialized. If the file name is given without the directory specification, the program searches for the name in the device directories /dev/scsi and /dev. Only full path names are supported with devfs. THE CONFIGURATION FILEThe 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. 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 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).
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).
RETURN VALUEThe program exits with value one if the command line is incorrect, the definition file is not found, or option -p is given and parsing the definition file fails. In all other cases the return value is zero (i.e., failing of initialization is not currently signaled by the return value).RESTRICTIONSWith the exception of the -p option, the program can be used only by the superuser. This is because the program uses ioctls allowed only for the superuser.AUTHORThe program is written by Kai Makisara <Kai.Makisara@metla.fi>.COPYRIGHTThe program and the manual page are copyrighted by Kai Makisara, 1998-2001. They can be distributed according to the GNU Copyleft.SEE ALSOst(4) mt(1)
Index
This document was created by man2html, using the manual pages. Time: 02:00:37 GMT, April 24, 2024 |