Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"
International Medical Corps

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
Copyright Info
Terms of Use
Privacy Info
Masthead / Impressum
Your Account

Private Messages

News Archive
Submit News
User Articles
Web Links


The Web

Who's Online
There are currently, 59 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here




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


       This 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.


       -f conf-file
              Specifies the name of the text file containing  the
              definitions  for  different  tape  drive  types. By
              default stinit tries to find  the  definition  file
              stinit.def or /etc/stinit.def (in this order).

       -h     Print the usage information.

       -p     The  definition  file  is  parsed but no tape drive
              initialization is attempted.  This  option  can  be
              used for testing the integrity of a definition file
              after changes have been made.

       -r     Rewind every device being initialized.

       -v     The more -v options (currently up to two), the more
              verbose output.

              Print the program version.


       If  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 direc­
       tory /dev/tapes is found, the devfs filesystem is  assumed
       The configuration file is a simple text file that contains
       descriptions of tape drives and the corresponding initial­
       ization  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 con­
       sist 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 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 = 1024 compression=0 }

       The devices are identified using zero or more of the  fol­
       lowing  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  par­
       tial matches).

              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
              product identification returned by the device.

              This keyword matched the string that must match the
              product revision level 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  key­
       words for a definition block. Another consequence is that,
       for instance, some parameters can be easily given  differ­
       ent  values  for  a  specific  firmware  revision  without
       repeating the parameters common to all revisions.

       The tape parameters are defined using the  following  key­
              The  cleaning request notifying parameter is set to

              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).

              This keyword starts definition of tape mode  value.
              The number of the mode must be between 1 and 4.

              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 exam­
              ple, for a device with buggy firmware level).

              The  default  tape  block  size  is  set  to value.
              bytes. The block size  zero  means  variable  block

              The tape density code is set to value.

              The  buffered  writes  by the driver in fixed block
              mode are enabled if value is non-zero.

              Asynchronous writes by the driver  are  enabled  if
              value is non-zero.

              Read-ahead  by  the  driver  in fixed block mode is
              allowed if value is non-zero.

              Two filemarks are written when a file being written
              to  is closed if value is non-zero. By default, one
              filemark is written.

              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.

              repositioning the tape when read-ahead  is  enabled
              if value is non-zero.

              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.

              The support for tape partitions is enabled if value
              is non-zero.

              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.

              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).

              The normal timeout for the device is set  to  value

              The  long  timeout  for  the device is set to value


       The 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


       With  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.


       The   program   is   written  by  Kai  Makisara  <Kai.Mak­





Security Code
Security Code
Type Security Code

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!

Amazon Wish List

Did You Know?
The Linux Tutorial welcomes your suggestions and ideas.


Tell a Friend About Us

Bookmark and Share

Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.09 Seconds