ftape.txt 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. Intro
  2. =====
  3. This file describes some issues involved when using the "ftape"
  4. floppy tape device driver that comes with the Linux kernel.
  5. ftape has a home page at
  6. http://ftape.dot-heine.de/
  7. which contains further information about ftape. Please cross check
  8. this WWW address against the address given (if any) in the MAINTAINERS
  9. file located in the top level directory of the Linux kernel source
  10. tree.
  11. NOTE: This is an unmaintained set of drivers, and it is not guaranteed to work.
  12. If you are interested in taking over maintenance, contact Claus-Justus Heine
  13. <ch@dot-heine.de>, the former maintainer.
  14. Contents
  15. ========
  16. A minus 1: Ftape documentation
  17. A. Changes
  18. 1. Goal
  19. 2. I/O Block Size
  20. 3. Write Access when not at EOD (End Of Data) or BOT (Begin Of Tape)
  21. 4. Formatting
  22. 5. Interchanging cartridges with other operating systems
  23. B. Debugging Output
  24. 1. Introduction
  25. 2. Tuning the debugging output
  26. C. Boot and load time configuration
  27. 1. Setting boot time parameters
  28. 2. Module load time parameters
  29. 3. Ftape boot- and load time options
  30. 4. Example kernel parameter setting
  31. 5. Example module parameter setting
  32. D. Support and contacts
  33. *******************************************************************************
  34. A minus 1. Ftape documentation
  35. ==============================
  36. Unluckily, the ftape-HOWTO is out of date. This really needs to be
  37. changed. Up to date documentation as well as recent development
  38. versions of ftape and useful links to related topics can be found at
  39. the ftape home page at
  40. http://ftape.dot-heine.de/
  41. *******************************************************************************
  42. A. Changes
  43. ==========
  44. 1. Goal
  45. ~~~~
  46. The goal of all that incompatibilities was to give ftape an interface
  47. that resembles the interface provided by SCSI tape drives as close
  48. as possible. Thus any Unix backup program that is known to work
  49. with SCSI tape drives should also work.
  50. The concept of a fixed block size for read/write transfers is
  51. rather unrelated to this SCSI tape compatibility at the file system
  52. interface level. It developed out of a feature of zftape, a
  53. block wise user transparent on-the-fly compression. That compression
  54. support will not be dropped in future releases for compatibility
  55. reasons with previous releases of zftape.
  56. 2. I/O Block Size
  57. ~~~~~~~~~~~~~~
  58. The block size defaults to 10k which is the default block size of
  59. GNU tar.
  60. The block size can be tuned either during kernel configuration or
  61. at runtime with the MTIOCTOP ioctl using the MTSETBLK operation
  62. (i.e. do "mt -f /dev/qft0" setblk #BLKSZ). A block size of 0
  63. switches to variable block size mode i.e. "mt setblk 0" switches
  64. off the block size restriction. However, this disables zftape's
  65. built in on-the-fly compression which doesn't work with variable
  66. block size mode.
  67. The BLKSZ parameter must be given as a byte count and must be a
  68. multiple of 32k or 0, i.e. use "mt setblk 32768" to switch to a
  69. block size of 32k.
  70. The typical symptom of a block size mismatch is an "invalid
  71. argument" error message.
  72. 3. Write Access when not at EOD (End Of Data) or BOT (Begin Of Tape)
  73. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  74. zftape (the file system interface of ftape-3.x) denies write access
  75. to the tape cartridge when it isn't positioned either at BOT or
  76. EOD.
  77. 4. Formatting
  78. ~~~~~~~~~~
  79. ftape DOES support formatting of floppy tape cartridges. You need the
  80. `ftformat' program that is shipped with the modules version of ftape.
  81. Please get the latest version of ftape from
  82. ftp://sunsite.unc.edu/pub/Linux/kernel/tapes
  83. or from the ftape home page at
  84. http://ftape.dot-heine.de/
  85. `ftformat' is contained in the `./contrib/' subdirectory of that
  86. separate ftape package.
  87. 5. Interchanging cartridges with other operating systems
  88. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  89. The internal emulation of Unix tape device file marks has changed
  90. completely. ftape now uses the volume table segment as specified
  91. by the QIC-40/80/3010/3020/113 standards to emulate file marks. As
  92. a consequence there is limited support to interchange cartridges
  93. with other operating systems.
  94. To be more precise: ftape will detect volumes written by other OS's
  95. programs and other OS's programs will detect volumes written by
  96. ftape.
  97. However, it isn't possible to extract the data dumped to the tape
  98. by some MSDOS program with ftape. This exceeds the scope of a
  99. kernel device driver. If you need such functionality, then go ahead
  100. and write a user space utility that is able to do that. ftape already
  101. provides all kernel level support necessary to do that.
  102. *******************************************************************************
  103. B. Debugging Output
  104. ================
  105. 1. Introduction
  106. ~~~~~~~~~~~~
  107. The ftape driver can be very noisy in that is can print lots of
  108. debugging messages to the kernel log files and the system console.
  109. While this is useful for debugging it might be annoying during
  110. normal use and enlarges the size of the driver by several kilobytes.
  111. To reduce the size of the driver you can trim the maximal amount of
  112. debugging information available during kernel configuration. Please
  113. refer to the kernel configuration script and its on-line help
  114. functionality.
  115. The amount of debugging output maps to the "tracing" boot time
  116. option and the "ft_tracing" modules option as follows:
  117. 0 bugs
  118. 1 + errors (with call-stack dump)
  119. 2 + warnings
  120. 3 + information
  121. 4 + more information
  122. 5 + program flow
  123. 6 + fdc/dma info
  124. 7 + data flow
  125. 8 + everything else
  126. 2. Tuning the debugging output
  127. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  128. To reduce the amount of debugging output printed to the system
  129. console you can
  130. i) trim the debugging output at run-time with
  131. mt -f /dev/nqft0 setdensity #DBGLVL
  132. where "#DBGLVL" is a number between 0 and 9
  133. ii) trim the debugging output at module load time with
  134. modprobe ftape ft_tracing=#DBGLVL
  135. Of course, this applies only if you have configured ftape to be
  136. compiled as a module.
  137. iii) trim the debugging output during system boot time. Add the
  138. following to the kernel command line:
  139. ftape=#DBGLVL,tracing
  140. Please refer also to the next section if you don't know how to
  141. set boot time parameters.
  142. *******************************************************************************
  143. C. Boot and load time configuration
  144. ================================
  145. 1. Setting boot time parameters
  146. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  147. Assuming that you use lilo, the LI)nux LO)ader, boot time kernel
  148. parameters can be set by adding a line
  149. append some_kernel_boot_time_parameter
  150. to `/etc/lilo.conf' or at real boot time by typing in the options
  151. at the prompt provided by LILO. I can't give you advice on how to
  152. specify those parameters with other loaders as I don't use them.
  153. For ftape, each "some_kernel_boot_time_parameter" looks like
  154. "ftape=value,option". As an example, the debugging output can be
  155. increased with
  156. ftape=4,tracing
  157. NOTE: the value precedes the option name.
  158. 2. Module load time parameters
  159. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  160. Module parameters can be specified either directly when invoking
  161. the program 'modprobe' at the shell prompt:
  162. modprobe ftape ft_tracing=4
  163. or by editing the file `/etc/modprobe.conf' in which case they take
  164. effect each time when the module is loaded with `modprobe' (please
  165. refer to the respective manual pages). Thus, you should add a line
  166. options ftape ft_tracing=4
  167. to `/etc/modprobe.conf` if you intend to increase the debugging
  168. output of the driver.
  169. 3. Ftape boot- and load time options
  170. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  171. i. Controlling the amount of debugging output
  172. DBGLVL has to be replaced by a number between 0 and 8.
  173. module | kernel command line
  174. -----------------------|----------------------
  175. ft_tracing=DBGLVL | ftape=DBGLVL,tracing
  176. ii. Hardware setup
  177. BASE is the base address of your floppy disk controller,
  178. IRQ and DMA give its interrupt and DMA channel, respectively.
  179. BOOL is an integer, "0" means "no"; any other value means
  180. "yes". You don't need to specify anything if connecting your tape
  181. drive to the standard floppy disk controller. All of these
  182. values have reasonable defaults. The defaults can be modified
  183. during kernel configuration, i.e. while running "make config",
  184. "make menuconfig" or "make xconfig" in the top level directory
  185. of the Linux kernel source tree. Please refer also to the on
  186. line documentation provided during that kernel configuration
  187. process.
  188. ft_probe_fc10 is set to a non-zero value if you wish for ftape to
  189. probe for a Colorado FC-10 or FC-20 controller.
  190. ft_mach2 is set to a non-zero value if you wish for ftape to probe
  191. for a Mountain MACH-2 controller.
  192. module | kernel command line
  193. -----------------------|----------------------
  194. ft_fdc_base=BASE | ftape=BASE,ioport
  195. ft_fdc_irq=IRQ | ftape=IRQ,irq
  196. ft_fdc_dma=DMA | ftape=DMA,dma
  197. ft_probe_fc10=BOOL | ftape=BOOL,fc10
  198. ft_mach2=BOOL | ftape=BOOL,mach2
  199. ft_fdc_threshold=THR | ftape=THR,threshold
  200. ft_fdc_rate_limit=RATE | ftape=RATE,datarate
  201. 4. Example kernel parameter setting
  202. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  203. To configure ftape to probe for a Colorado FC-10/FC-20 controller
  204. and to increase the amount of debugging output a little bit, add
  205. the following line to `/etc/lilo.conf':
  206. append ftape=1,fc10 ftape=4,tracing
  207. 5. Example module parameter setting
  208. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  209. To do the same, but with ftape compiled as a loadable kernel
  210. module, add the following line to `/etc/modprobe.conf':
  211. options ftape ft_probe_fc10=1 ft_tracing=4
  212. *******************************************************************************
  213. D. Support and contacts
  214. ====================
  215. Ftape is distributed under the GNU General Public License. There is
  216. absolutely no warranty for this software. However, you can reach
  217. the current maintainer of the ftape package under the email address
  218. given in the MAINTAINERS file which is located in the top level
  219. directory of the Linux kernel source tree. There you'll find also
  220. the relevant mailing list to use as a discussion forum and the web
  221. page to query for the most recent documentation, related work and
  222. development versions of ftape.
  223. Changelog:
  224. ==========
  225. ~1996: Original Document
  226. 10-24-2004: General cleanup and updating, noting additional module options.
  227. James Nelson <james4765@gmail.com>