mt - control magnetic tape drive operation


SUBMITTED BY: Guest

DATE: June 4, 2014, 6:12 a.m.

FORMAT: Text only

SIZE: 8.8 kB

HITS: 4841

  1. NAME
  2. mt - control magnetic tape drive operation
  3. SYNOPSIS
  4. mt [-h] [-f device] operation [count] [arguments...]
  5. DESCRIPTION
  6. 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 of mt is printed with the -v or --version option. The path of the tape device on which to operate can be given with the -f or -t option. If neither of those options is given, and the environment variable TAPE is set, it is used. Otherwise, a default device defined in the file /usr/include/sys/mtio.h is used.
  7. Some operations optionally take an argument or repeat count, which can be given after the operation name and defaults to 1. The postfix k , M , or G can be used to give counts in units of 1024, 1024 * 1024, or 1024 * 1024 * 1024, respectively.
  8. 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.
  9. fsf
  10. Forward space count files. The tape is positioned on the first block of the next file.
  11. fsfm
  12. Forward space count files. The tape is positioned on the last block of the previous file.
  13. bsf
  14. Backward space count files. The tape is positioned on the last block of the previous file.
  15. bsfm
  16. Backward space count files. The tape is positioned on the first block of the next file.
  17. asf
  18. The tape is positioned at the beginning of the count file. Positioning is done by first rewinding the tape and then spacing forward over count filemarks.
  19. fsr
  20. Forward space count records.
  21. bsr
  22. Backward space count records.
  23. fss
  24. (SCSI tapes) Forward space count setmarks.
  25. bss
  26. (SCSI tapes) Backward space count setmarks.
  27. eod, seod
  28. Space to end of valid data. Used on streamer tape drives to append data to the logical end of tape.
  29. rewind
  30. Rewind the tape.
  31. offline, rewoffl, eject
  32. Rewind the tape and, if applicable, unload the tape.
  33. retension
  34. Rewind the tape, then wind it to the end of the reel, then rewind it again.
  35. weof, eof
  36. Write count EOF marks at current position.
  37. wset
  38. (SCSI tapes) Write count setmarks at current position (only SCSI tape).
  39. erase
  40. Erase the tape.
  41. status
  42. Print status information about the tape unit. (If the density code is "no translation" in the status output, this does not affect working of the tape drive.)
  43. seek
  44. (SCSI tapes) Seek to the count block on the tape. This operation 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.
  45. tell
  46. (SCSI tapes) Tell the current block on tape. This operation is available on some Tandberg and Wangtek streamers and some SCSI-2 tape drives.
  47. setpartition
  48. (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 enabled for the device, the device supports multiple partitions, and the tape is formatted with multiple partitions.
  49. partseek
  50. (SCSI tapes) The tape position is set to block count in the partition given by the argument after count. The default partition is zero.
  51. mkpartition
  52. (SCSI tapes) Format the tape with one (count is zero) or two partitions (count gives the size of the second partition in megabytes). The tape drive must be able to format partitioned tapes with initiator-specified partition size and partition support must be enabled for the drive.
  53. load
  54. (SCSI tapes) Send the load command to the tape drive. The drives usually load the tape when a new cartridge is inserted. The argument count can usually be omitted. Some HP changers load tape n if the count 10000 + n is given (a special funtion in the Linux st driver).
  55. lock
  56. (SCSI tapes) Lock the tape drive door.
  57. unlock
  58. (SCSI tapes) Unlock the tape drive door.
  59. setblk
  60. (SCSI tapes) Set the block size of the drive to count bytes per record.
  61. setdensity
  62. (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.
  63. densities
  64. (SCSI tapes) Write explanation of some common density codes to standard output.
  65. drvbuffer
  66. (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 the drive documentation or, in the case of a SCSI-2 drive, from the SCSI-2 standard.
  67. compression
  68. (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 compression.
  69. stoptions
  70. (SCSI tapes) Set the driver options bits for the device to the defined values. Allowed only for the superuser. The bits can be set either by ORing the option bits from the file /usr/include/linux/mtio.h to count, or by using the following keywords (as many keywords can be used on the same line as necessary, unambiguous abbreviations allowed):
  71. buffer-writes
  72. buffered writes enabled
  73. async-writes
  74. asynchronous writes enabled
  75. read-ahead
  76. read-ahead for fixed block size
  77. debug
  78. debugging (if compiled into driver)
  79. two-fms
  80. write two filemarks when file closed
  81. fast-eod
  82. space directly to eod (and lose file number)
  83. no-wait
  84. don't wait until rewind, etc. complete
  85. auto-lock
  86. automatically lock/unlock drive door
  87. def-writes
  88. the block size and density are for writes
  89. can-bsr
  90. drive can space backwards as well
  91. no-blklimits
  92. drive doesn't support read block limits
  93. can-partitions
  94. drive can handle partitioned tapes
  95. scsi2logical
  96. seek and tell use SCSI-2 logical block addresses instead of device dependent addresses
  97. sysv
  98. enable the System V semantics
  99. stsetoptions
  100. (SCSI tapes) Set selected driver options bits. The methods to specify the bits to set are given above in the description of stoptions. Allowed only for the superuser.
  101. stclearoptions
  102. (SCSI tapes) Clear selected driver option bits. The methods to specify the bits to clear are given above in description of stoptions. Allowed only for the superuser.
  103. stwrthreshold
  104. (SCSI tapes) The write threshold for the tape device is set to count kilobytes. The value must be smaller than or equal to the driver buffer size. Allowed only for the superuser.
  105. defblksize
  106. (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 by setblk overrides the default until a new tape is inserted. Allowed only for the superuser.
  107. defdensity
  108. (SCSI tapes) Set the default density code. The value -1 disables the default density. The density set by setdensity overrides the default until a new tape is inserted. Allowed only for the superuser.
  109. defdrvbuffer
  110. (SCSI tapes) Set the default drive buffer code. The value -1 disables the default drive buffer code. The drive buffer code set by drvbuffer overrides the default until a new tape is inserted. Allowed only for the superuser.
  111. defcompression
  112. (SCSI tapes) Set the default compression state. The value -1 disables the default compression. The compression state set by compression overrides the default until a new tape is inserted. Allowed only for the superuser.
  113. sttimeout
  114. sets the normal timeout for the device. The value is given in seconds. Allowed only for the superuser.
  115. stlongtimeout
  116. sets the long timeout for the device. The value is given in seconds. Allowed only for the superuser.
  117. stsetcln
  118. set the cleaning request interpretation parameters.
  119. mt exits with a status of 0 if the operation succeeded, 1 if the operation or device name given was invalid, or 2 if the operation failed.
  120. AUTHOR
  121. The program is written by Kai Makisara <Kai.Makisara@kolumbus.fi>.
  122. COPYRIGHT
  123. The program and the manual page are copyrighted by Kai Makisara, 1998-2004. They can be distributed according to the GNU Copyleft.

comments powered by Disqus