home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / utilities / disk / mrbk214.lha / Docs / MRTape.DOC < prev    next >
Encoding:
Text File  |  1995-02-05  |  8.0 KB  |  158 lines

  1.  
  2. MRTape: SCSI Tape Handler V1.20
  3. -------------------------------
  4.  
  5. Author: Mark R. Rinfret, MRsoftware
  6.  
  7. This is a tape handler designed primarily for MRBackup
  8. Professional.  Portions of this handler were originally derived
  9. from code written by Markus Wandel and Bob Rethemeyer.  I am very
  10. grateful to them for their contributions to my understanding of
  11. SCSI tape operations.
  12.  
  13. The MRTape-Handler is made accessible to the system by placing a
  14. copy of its executable program in the L:  directory, then
  15. mounting it via an AmigaDOS mountlist entry (a sample appears
  16. later in this document).  The suggested device name is "MRTape:"
  17. but you are free to call it anything that conforms to AmigaDOS
  18. device naming conventions, since the name you choose for the
  19. mountlist entry is the name given to the device entry.
  20.  
  21. The contents of a magnetic tape can be thought of as a series of
  22. zero or more 'files', separated by 'file marks' (or tape marks,
  23. if you prefer).  Each time a program opens an MRTape-Handler
  24. device for write access, a file mark is written at the end of
  25. data when the device is eventually closed.  Multiple 'files' can
  26. be stacked on a given tape.  These 'files' can also span multiple
  27. physical tape cartridges.  In this case, the individual tape
  28. cartridges collectively appear as one very large tape cartridge.
  29. Each of the 'files' on an MRTape-Handler created tape is numbered
  30. consecutively from zero (0) through the number of files minus 1.
  31. Each MRBackup saveset constitutes one tape file, though it
  32. actually contains many AmigaDOS files and directories.
  33.  
  34. The MRTape-Handler's behavior when opening a tape can be altered
  35. significantly by appending certain letter codes or a number after
  36. the colon at the end of the device name.  The various forms that
  37. a tape name specification can take are as follows:
  38.  
  39. MRTape:
  40.     The tape is opened and rewound immediately.
  41.  
  42. MRTape:A
  43.     If the tape is opened for input (read access), it is just rewound.
  44.  
  45.     If the tape is opened for output (write access), it is first
  46.     rewound, then positioned such that new data will be written after
  47.     all existing data on the tape. The tape will rewind when it is
  48.     closed. This mode is useful when you want to append data to a tape
  49.     which was previously written to and then removed from the tape
  50.     drive.
  51.  
  52. MRTape:N
  53.     The tape is opened and not rewound.  It is also not rewound
  54.     when it is subsequently closed, though a file mark will be
  55.     written upon closing.  This mode is primarily useful when
  56.     writing multiple savesets to a single tape in one session
  57.     (the tape is not removed from the drive between sessions).
  58.     Almost all tape drives will rewind a tape cartridge when it
  59.     is inserted.  Thus, MRTape:N can be used for all savesets
  60.     stacked in a single session.
  61.  
  62. MRTape-Handler has been written to conform to the base SCSI standard
  63. and should therefore be compatible with most tape drives which can be
  64. used on the Amiga.  There are bound to be exceptions to that general
  65. rule, however.  If you have difficulties, I'll do what I can to help.
  66. I can provide a debug version of MRTape-Handler with a corresponding
  67. monitor program which will report in excruciating detail on every
  68. operation that MRTape-Handler performs.  The information collected can
  69. be analyzed and used to make adjustments (or a custom handler, if
  70. necessary).  I've also received reports of strange behavior on some
  71. GVP SCSI interface cards in certain Amiga configurations.
  72.  
  73. The meaning of the word "handler" is significant in Amiga terms.
  74. MRTape-Handler responds to standard AmigaDOS I/O packets (plus a few
  75. custom packets which MRBackup will use if they are supported) and
  76. attempts to present the same basic behavior that you would expect to
  77. observe when accessing an AmigaDOS file.  Implementing tape support
  78. in this way (as opposed to embedding SCSI-direct calls within the
  79. MRBackup Professional program) provides a large degree of device
  80. independence for MRBackup Professional.  MRBackup Pro simply writes a
  81. stream of data (encoded in MRBackup's "FastDisk" format) to the Backup
  82. Path.
  83.  
  84. Because of this high-level design choice, you can easily
  85. substitute other handler-based tape drivers if you have a
  86. particular preference or you're experiencing a problem with
  87. MRTape-Handler.  Excellent alternatives include Bob Rethemeyer's
  88. BTNTape (Better Than Nothing Tape handler) and Matt Dillon's
  89. DTape.  There must be a few others by now.
  90.  
  91. MRBackup currently treats the backup set as one contiguous file.
  92. Individual files have special header blocks and the data blocks
  93. have control information which defines the end of each file.
  94. There is a special control block to mark the end of tape.  Thus,
  95. the filemark isn't typically ever "read" and isn't required,
  96. which is how the 3M drive (block-structured) is able to work.
  97.  
  98. The buffer size parameter in the Startup field of the mountlist
  99. entry must be chosen with care.  This is the size of 1 buffer (as
  100. opposed to 1 block, as is typically specified for filesystems).
  101. The handler allocates one buffer for synchronous I/O and two
  102. buffers when using asynchronous I/O.  For example, I reccommend 8
  103. (8192 bytes) for the 3M drive (this is required by the drive) and
  104. 64 (65536 bytes) for the Wangtek 5150 ES.  The Wangtek has a 64K
  105. cache buffer.  Setting MRTapeHandler to use 64K buffers causes
  106. 128K bytes to be allocated (a significant chunk!) but performance
  107. is quite good.  To obtain the best performance for other drives,
  108. you may need to experiment.  Use MRBackup Professional's
  109. "Throughput" measurement as a relative guide to the effects that
  110. changes in buffer sizes have on your backups.
  111.  
  112. Here is a sample mountlist entry for MRTape-Handler:
  113.  
  114. /*  This is a mountlist entry for the SCSI tape handler provided with   */
  115. /*  MRBackup. Pay particular attention to the StartUp message. Its      */
  116. /*  format is:                                                          */
  117. /*      "<buffer_size>/<device_name>/<unit>/<luno>/<flags>"             */
  118. /*                                                                      */
  119. /*  where                                                               */
  120. /*      <buffer_size> is the total amount of buffer memory, specified   */
  121. /*      in K (K = 1024);                                                */
  122. /*                                                                      */
  123. /*      <device_name> is the SCSI device driver name;                   */
  124. /*                                                                      */
  125. /*      <unit> is the SCSI unit number;                                 */
  126. /*                                                                      */
  127. /*      <luno> is the SCSI logical unit number (not currently used but  */
  128. /*      must be set to zero);                                           */
  129. /*                                                                      */
  130. /*      <flags> is a set of bits controlling certain tape drive options */
  131. /*      The bit values, which may be added together are:                */
  132. /*                                                                      */
  133. /*          1   asynchronous mode, 0 = synchronous mode                 */
  134. /*          2   use on-board buffer, 0 = don't use on-board buffer      */
  135. /*                                                                      */
  136. /*          Example: to enable async mode and the on-board buffer, the  */
  137. /*          <flags> value would be 3 (1 + 2).                           */
  138. /*                                                                      */
  139. /*          Other flag bits will be provided as new features are added. */
  140.  
  141. MRTAPE:    Handler = l:mrtape-handler
  142.            StartUp = "64/scsi.device/4/0/3"
  143.            Stacksize = 4000
  144.            Priority = 10
  145.            GlobVec = -1
  146. #
  147.  
  148.  
  149. To determine the version number of MRTapeHandler, view the
  150. handler with any binary file editor and look for a string that
  151. begins with the letters "$VER:".  You may also use the "version"
  152. command under WorkBench 2.0.
  153.  
  154. To unload an instance of the MRTape:  handler, just use the
  155. Dismount option of the Assign command.  Here's an example:
  156.  
  157.     Assign DISMOUNT MRTape:
  158.