Seth Woolley's Man Viewer

mt(1) - mt, mt - control magnetic tape drive operation - man 1 mt

([section] manual, -k keyword, -K [section] search, -f whatis)
man plain no title

MT(1)                                                                    MT(1)



NAME
       mt - control magnetic tape drive operation

SYNOPSIS
       mt [-h] [-f device] operation [count] [arguments...]

DESCRIPTION
       This  manual  page  documents the tape control program mt.  mt performs
       the given operation, which must be one of the  tape  operations  listed
       below,  on a tape drive. The commands can also be listed by running the
       program with the -h option. The version(1,3,5) of mt is printed  with  the  -v
       option. The path of the tape device to operate on can be given with the
       -f or -t option.  If neither of those options is given, and  the  envi-
       ronment  variable TAPE is set(7,n,1 builtins), it is used.  Otherwise, a default device
       defined in(1,8) the file(1,n) /usr/include/sys/mtio.h is used.

       Some operations optionally take an argument or repeat count, which  can
       be given after the operation name and defaults to 1.

       The  available  operations  are listed below.  Unique abbreviations are
       accepted.  Not all operations are available on all systems, or work  on
       all types of tape drives.

       fsf    Forward  space count files.  The tape is positioned on the first
              block of the next file.

       fsfm   Forward space count files.  The tape is positioned on  the  last
              block of the previous file.

       bsf    Backward  space count files.  The tape is positioned on the last
              block of the previous file.

       bsfm   Backward space count files.  The tape is positioned on the first
              block of the next file.

       fsr    Forward space count records.

       bsr    Backward space count records.

       fss    (SCSI tapes) Forward space count setmarks.

       bss    (SCSI tapes) Backward space count setmarks.

       eod, seod
              Space  to  end  of  valid data.  Used on streamer tape drives to
              append data to the logical and of tape.

       rewind Rewind the tape.

       offline, rewoffl
              Rewind the tape and, if(3,n) applicable, unload the tape.

       retension
              Rewind the tape, then wind it to  the  end  of  the  reel,  then
              rewind it again.

       weof, eof
              Write count EOF marks at current position.

       wset   (SCSI tapes) Write count setmarks at current position (only SCSI
              tape).

       erase  Erase the tape.

       status Print status information about the tape unit.

       seek   (SCSI tapes) Seek to the count block on the tape.   This  opera-
              tion  is  available  on  some Tandberg and Wangtek streamers and
              some SCSI-2 tape drives. The block address  should  be  obtained
              from a tell call earlier.

       tell   (SCSI  tapes) Tell the current block on tape.  This operation is
              available on some Tandberg and Wangtek streamers and some SCSI-2
              tape drives.

       setpartition
              (SCSI  tapes)  Switch to the partition determined by count.  The
              default data partition of the tape is numbered  zero.  Switching
              partition  is  available  only  if(3,n)  enabled  for the device, the
              device supports multiple partitions, and the tape  is  formatted
              with multiple partitions.

       partseek
              (SCSI tapes) The tape position is set(7,n,1 builtins) to block count in(1,8) the par-
              tition given by the argument after count. The default  partition
              is zero.

       mkpartition
              (SCSI  tapes)  Format  the  tape with one (count is zero) or two
              partitions (count gives the size  of  the  second  partition  in(1,8)
              megabytes).  The  tape  drive must be able to format partitioned
              tapes with initiator-specified partition size and partition sup-
              port must be enabled for the drive.

       load(7,n)   (SCSI tapes) Load the tape into the drive.

       lock   (SCSI tapes) Lock the tape drive door.

       unlock (SCSI tapes) Unlock the tape drive door.

       setblk (SCSI  tapes) Set the block size of the drive to count bytes per
              record.

       setdensity
              (SCSI tapes) Set the tape density code  to  count.   The  proper
              codes  to use with each drive should be looked up from the drive
              documentation.

       densities
              (SCSI tapes) Write explanation of some common density  codes  to
              standard output.

       drvbuffer
              (SCSI  tapes)  Set  the  tape  drive buffer code to number.  The
              proper value for  unbuffered  operation  is  zero  and  "normal"
              buffered  operation  one.  The  meanings  of other values can be
              found in(1,8) the drive documentation or, in(1,8) case of a SCSI-2  drive,
              from the SCSI-2 standard.

       compression
              (SCSI tapes) The compression within the drive can be switched on
              or off using the MTCOMPRESSION ioctl. Note that this  method  is
              not  supported  by  all  drives  implementing  compression.  For
              instance, the Exabyte 8 mm drives use density  codes  to  select(2,7,2 select_tut)
              compression.

       stoptions
              (SCSI  tapes)  Set the driver options bits for the device to the
              defined values. Allowed only for the superuser. The bits can  be
              set(7,n,1 builtins)   either   by   oring   the   option   bits  from  the  file(1,n)
              /usr/include/linux/mtio.h to count, or by  using  the  following
              keywords  (as many keywords can be used on the same line as nec-
              essary, unambiguous abbreviations allowed):

              buffer-writes  buffered writes enabled

              async-writes   asynchronous writes enabled

              read-ahead     read-ahead for fixed block size

              debug          debugging (if(3,n) compiled into driver)

              two-fms        write(1,2) two filemarks when file(1,n) closed

              fast-eod       space directly to eod (and lose file(1,n) number)

              auto-lock      automatically lock/unlock drive door

              def-writes     the block size and density are for writes

              can-bsr        drive can space backwards well

              no-blklimits   drive doesn't support read(2,n,1 builtins) block limits

              can-partitions drive can handle partitioned tapes

              scsi2logical   seek and tell use SCSI-2 logical block  addresses
                             instead of device dependent addresses

       stsetoptions
              (SCSI  tapes)  Set  selected driver options bits. The methods to
              specify the bits to set(7,n,1 builtins) are given above in(1,8) description of  stop-
              tions.  Allowed only for the superuser.

       stclearoptions
              (SCSI  tapes)  Clear selected driver option bits. The methods to
              specify the bits to clear(1,3x,3x clrtobot) are  given  above  in(1,8)  description  of
              stoptions.  Allowed only for the superuser.

       stwrthreshold
              (SCSI  tapes)  The write(1,2) threshold for the tape device is set(7,n,1 builtins) to
              count kilobytes. The value must be smaller than or equal to  the
              driver buffer size. Allowed only for the superuser.

       defblksize
              (SCSI  tapes)  Set the default block size of the device to count
              bytes. The value -1 disables the default block size.  The  block
              size  set(7,n,1 builtins)  by  setblk  overrides the default until a new tape is
              inserted.  Allowed only for the superuser.

       defdensity
              (SCSI tapes) Set the default density code. The value -1 disables
              the default density. The density set(7,n,1 builtins) by setdensity overrides the
              default until a new tape is inserted. Allowed only for the supe-
              ruser.

       defdrvbuffer
              (SCSI  tapes)  Set  the  default drive buffer code. The value -1
              disables the default drive buffer code. The  drive  buffer  code
              set(7,n,1 builtins)  by  drvbuffer  overrides  the  default  until a new tape is
              inserted. Allowed only for the superuser.

       defcompression
              (SCSI tapes) Set the default compression  state.  The  value  -1
              disables  the  default compression. The compression state set(7,n,1 builtins) by
              compression overrides the default until a new tape is  inserted.
              Allowed only for the superuser.

       datcompression
              (some  SCSI-2  tapes)  Inquire  or  set(7,n,1 builtins)  the  compression status
              (on/off) using SCSI commands sent by mt. If the count is omitted
              the  compression  status  is printed. If the count is zero, com-
              pression is disabled. If the count is  nonzero,  compression  is
              enabled.  The  command uses the SCSI ioctl to read(2,n,1 builtins) and write(1,2) the
              Data Compression Characteristics mode page (15). ONLY  ROOT  CAN
              USE  THIS COMMAND. The compression can be controlled with the mt
              command compression with kernels above 1.3.84.

       mt exits with a status of 0 if(3,n) the operation succeeded, 1 if(3,n) the opera-
       tion or device name given was invalid, or 2 if(3,n) the operation failed.

SEE ALSO
       st(4)



                                                                         MT(1)

References for this manual (incoming links)