📄 stinit.8
字号:
.TH STINIT 8 "August 2005" \" -*- nroff -*-.SH NAMEstinit \- initialize SCSI magnetic tape drives.SH SYNOPSIS.B stinit[\-f conf-file] [\-h] [-p] [-r] [-v] [devices...].SH DESCRIPTIONThis manual page documents the tape control program.BR stinitcan used to initialize SCSI tape drive modes at system startup, afterloading the tape driver as module, or after introduction of new deviceto the SCSI subsystem at run-time. The initialization is performed bysending ioctl commands to the drive. The commands are defined in atext file that is indexed using the inquiry data the drive returns(manufacturer, device, revision). Values for all of the general andmode-specific SCSI tape parameters up to Linux version 2.6.0 can beinitialized..PP.SH OPTIONS.TP.I \-f conf-fileSpecifies the name of the text file containing the definitions fordifferent tape drive types. By default.B stinittries to find the definition file.I stinit.defor.I /etc/stinit.def(in this order)..TP.I \-hPrint the usage information..TP.I \-pThe definition file is parsed but no tape drive initialization isattempted. This option can be used for testing the integrity of adefinition file after changes have been made..TP.I \-rRewind every device being initialized..TP.I \-vThe more -v options (currently up to two), the more verbose output..TP.I \-\-versionPrint the program version..PP.SH THE DEVICES BEING INITIALIZEDIf the program is started without arguments, it tries to find allaccessible SCSI tape devices and the device files for the differentmodes of the devices. The tape drives are searched in the scanningorder of the kernel and searching is stopped at the first non-existingtape. All of the found devices are initialized if a matchingdescription is found from the parameter file. Note that a mode for adevice is not initialized if the corresponding device file is notfound even if a matching description for the mode exists. Thenon-rewind device is preferred over the auto-rewind device for eachmode. If the directory.I /dev/tapesis found, the devfs filesystem is assumed to be mounted on /dev. Otherwise,the directories.I /dev/scsiand.I /devare scanned for device files..PPSCSI tape drives can be initialized selectively using programarguments. A numeric argument specifies the number of the tape drivein the scanning order of the kernel. A file name specifies that thedevice corresponding to this name is to be initialized. If the file nameis given without the directory specification, the program searches forthe name in the device directories.I/dev/scsiand.I /dev.Only full path names are supported with devfs..PP.SH THE CONFIGURATION FILEThe configuration file is a simple text file that containsdescriptions of tape drives and the corresponding initializationparameters. The parameter definition blocks are delimited by.I {}.Specification of the drive description is restarted after eachparameter definition block..PPThe drive descriptions and the parameter definitions consist of pairs.I name = value.The value is either a numeric parameter, a string not containingblanks, or a quoted string. In case of a numeric parameter, thepostfix.I kor.I Mcan be used to give the value in units of 1024 or 1024 * 1024,respectively. If the.I =value-part is omitted, the value.I"1"is used. If the character.I #is found from an input line, the rest of the line is discarded. Thisallows use of comments in the definition file. The following examplecontains definitions for one type of tape drives:.PP.RS.nf# The XY datmanufacturer=XY-COMPANY model = "UVW DRIVE" {scsi2logical=1 # Common definitions for all modescan-bsr can-partitions auto-lock# Definition of modesmode1 blocksize=0 compression=1mode2 blocksize=1024 compression=1mode3 blocksize=0 compression=0mode4 blocksize = 1k compression=0 }.fi.RE.PPThe devices are identified using zero or more of the followingkeywords corresponding to the data returned by the tape device asresponse to the SCSI INQUIRY command. The matches are case-sensitiveand performed up to the length defined in the configuration file(permitting use of partial matches)..IP manufacturer=This keyword specifies the string that must match the vendoridentification returned by the device..IP model=This keyword defines the string that must match the.B product identificationreturned by the device..IP revision=This keyword matched the string that must match the.B product revision levelreturned by the device..PPAll of the matching initializations are collected in the order theyare defined in the file. This means that common parameters can bedefined for all devices using zero keywords for a definitionblock. Another consequence is that, for instance, some parameters canbe easily given different values for a specific firmware revision withoutrepeating the parameters common to all revisions..PPThe tape parameters are defined using the following keywords. Morethorough description of the parameters can be found from the.I st(4)man page (not up to date when this is written) or from the file.I drivers/scsi/README.stin the Linux kernel source tree. The keywords are matched using onlythe first characters. The part of the keywords not used in matching isenclosed by []. The numeric values may be specified either in decimalnotation or hexadecimal notation (using the prefix 0x)..IP drive-[buffering]=valueThe drive's buffering parameter is set to.I value.This parameter if common for all modes..IP cleaningThe cleaning request notifying parameter is set to.I value.IP no-w[ait]The immediate mode is used with commands like rewind if.I valueis non-zero (i.e., the driver does not wait for the command to finish)..IP mode=valueThis keyword starts definition of tape mode.I value.The number of the mode must be between 1 and 4..IP disab[led]=valueThis mode is disabled for this device if.I valueis non-zero. Can be used if some mode defined in a more generaldefinition should be disabled by a more specific definition for somedevice (for example, for a device with buggy firmware level)..IP block[size]=valueThe default tape block size is set to.I value.bytes. The block size zero means variable block mode..IP dens[ity]=valueThe tape density code is set to.I value..IP buff[ering]=valueThe buffered writes by the driver in fixed block mode are enabled if.I valueis non-zero..IP async[-writes]=valueAsynchronous writes by the driver are enabled if.I valueis non-zero..IP read[-ahead]=valueRead-ahead by the driver in fixed block mode is allowed if.I valueis non-zero..IP two[-fms]=valueTwo filemarks are written when a file being written to is closed if.I valueis non-zero. By default, one filemark is written..IP comp[ression]=valueCompression of the data by the drive is enabled if.I valueis non-zero. Note that the tape driver can't enable compression forall drives that can compress data. Note also that some drives definecompression using density codes..IP auto[-lock]=valueThe tape drive door is locked automatically when the device file isopened if.I valueis non-zero..IP fast[-eom]=valueThe MTEOM command is performed using the SCSI command that spacesdirectly to the end of medium if.I valueis non-zero. The drawback is that the file number in the statusbecomes invalid. By default, spacing to end of medium is performed byspacing over filemarks until end of medium is detected and the filenumber remains valid..IP can-b[sr]=valueBackspacing over records is used by the driver when repositioningthe tape when read-ahead is enabled if.I valueis non-zero..IP noblk[limits]=valueThe tape driver does not use the READ BLOCK LIMITS SCSI command whenthe device is being opened if.I valueis non-zero. This is for the drives that do not support this SCSIcommand..IP can-p[artitions]=valueThe support for tape partitions is enabled if.I valueis non-zero..IP scsi2[logical]=valueLogical block addresses are used in the MTSEEK and MTIOCPOScommands if.I valueis non-zero. The default is to use the device-specific addresses..IP defs-for-w[rites]=valueThe parameters defining the tape format (density, block size, etc.)are forced when writing starts at the beginning of a tape if.I valueis non-zero. The default is to change there parameters each time thedevice is opened at the beginning of a tape (or the mode is changed inthe middle of a tape)..IP sysv=valueThe System V tape semantics are used if.I valueis non-zero. Otherwise the BSD semantics are used..IP timeout=valueThe normal timeout for the device is set to.I valueseconds..IP long-time[out]=valueThe long timeout for the device is set to.I valueseconds..SH RETURN VALUEThe program exits with value one if the command line is incorrect, thedefinition file is not found, or option -p is given and parsing thedefinition file fails. In all other cases the return value iszero (i.e., failing of initialization is not currently signaled bythe return value)..SH RESTRICTIONSWith the exception of the -p option, the program can be used only bythe superuser. This is because the program uses ioctls allowed onlyfor the superuser..SH AUTHORThe program is written by Kai Makisara <Kai.Makisara@kolumbus.fi>..SH COPYRIGHTThe program and the manual page are copyrighted by Kai Makisara, 1998-2005.They can be distributed according to the GNU Copyleft..SH SEE ALSOst(4) mt(1)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -