osst.txt 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. README file for the osst driver
  2. ===============================
  3. (w) Kurt Garloff <garloff@suse.de> 12/2000
  4. This file describes the osst driver as of version 0.8.x/0.9.x, the released
  5. version of the osst driver.
  6. It is intended to help advanced users to understand the role of osst and to
  7. get them started using (and maybe debugging) it.
  8. It won't address issues like "How do I compile a kernel?" or "How do I load
  9. a module?", as these are too basic.
  10. Once the OnStream got merged into the official kernel, the distro makers
  11. will provide the OnStream support for those who are not familiar with
  12. hacking their kernels.
  13. Purpose
  14. -------
  15. The osst driver was developed, because the standard SCSI tape driver in
  16. Linux, st, does not support the OnStream SC-x0 SCSI tape. The st is not to
  17. blame for that, as the OnStream tape drives do not support the standard SCSI
  18. command set for Serial Access Storage Devices (SASDs), which basically
  19. corresponds to the QIC-157 spec.
  20. Nevertheless, the OnStream tapes are nice pieces of hardware and therefore
  21. the osst driver has been written to make these tape devs supported by Linux.
  22. The driver is free software. It's released under the GNU GPL and planned to
  23. be integrated into the mainstream kernel.
  24. Implementation
  25. --------------
  26. The osst is a new high-level SCSI driver, just like st, sr, sd and sg. It
  27. can be compiled into the kernel or loaded as a module.
  28. As it represents a new device, it got assigned a new device node: /dev/osstX
  29. are character devices with major no 206 and minor numbers like the /dev/stX
  30. devices. If those are not present, you may create them by calling
  31. Makedevs.sh as root (see below).
  32. The driver started being a copy of st and as such, the osst devices'
  33. behavior looks very much the same as st to the userspace applications.
  34. History
  35. -------
  36. In the first place, osst shared its identity very much with st. That meant
  37. that it used the same kernel structures and the same device node as st.
  38. So you could only have either of them being present in the kernel. This has
  39. been fixed by registering an own device, now.
  40. st and osst can coexist, each only accessing the devices it can support by
  41. themselves.
  42. Installation
  43. ------------
  44. osst got integrated into the linux kernel. Select it during kernel
  45. configuration as module or compile statically into the kernel.
  46. Compile your kernel and install the modules.
  47. Now, your osst driver is inside the kernel or available as a module,
  48. depending on your choice during kernel config. You may still need to create
  49. the device nodes by calling the Makedevs.sh script (see below) manually.
  50. To load your module, you may use the command
  51. modprobe osst
  52. as root. dmesg should show you, whether your OnStream tapes have been
  53. recognized.
  54. If you want to have the module autoloaded on access to /dev/osst, you may
  55. add something like
  56. alias char-major-206 osst
  57. to a file under /etc/modprobe.d/ directory.
  58. You may find it convenient to create a symbolic link
  59. ln -s nosst0 /dev/tape
  60. to make programs assuming a default name of /dev/tape more convenient to
  61. use.
  62. The device nodes for osst have to be created. Use the Makedevs.sh script
  63. attached to this file.
  64. Using it
  65. --------
  66. You may use the OnStream tape driver with your standard backup software,
  67. which may be tar, cpio, amanda, arkeia, BRU, Lone Tar, ...
  68. by specifying /dev/(n)osst0 as the tape device to use or using the above
  69. symlink trick. The IOCTLs to control tape operation are also mostly
  70. supported and you may try the mt (or mt_st) program to jump between
  71. filemarks, eject the tape, ...
  72. There's one limitation: You need to use a block size of 32kB.
  73. (This limitation is worked on and will be fixed in version 0.8.8 of
  74. this driver.)
  75. If you just want to get started with standard software, here is an example
  76. for creating and restoring a full backup:
  77. # Backup
  78. tar cvf - / --exclude /proc | buffer -s 32k -m 24M -B -t -o /dev/nosst0
  79. # Restore
  80. buffer -s 32k -m 8M -B -t -i /dev/osst0 | tar xvf - -C /
  81. The buffer command has been used to buffer the data before it goes to the
  82. tape (or the file system) in order to smooth out the data stream and prevent
  83. the tape from needing to stop and rewind. The OnStream does have an internal
  84. buffer and a variable speed which help this, but especially on writing, the
  85. buffering still proves useful in most cases. It also pads the data to
  86. guarantees the block size of 32k. (Otherwise you may pass the -b64 option to
  87. tar.)
  88. Expect something like 1.8MB/s for the SC-x0 drives and 0.9MB/s for the DI-30.
  89. The USB drive will give you about 0.7MB/s.
  90. On a fast machine, you may profit from software data compression (z flag for
  91. tar).
  92. USB and IDE
  93. -----------
  94. Via the SCSI emulation layers usb-storage and ide-scsi, you can also use the
  95. osst driver to drive the USB-30 and the DI-30 drives. (Unfortunately, there
  96. is no such layer for the parallel port, otherwise the DP-30 would work as
  97. well.) For the USB support, you need the latest 2.4.0-test kernels and the
  98. latest usb-storage driver from
  99. http://www.linux-usb.org/
  100. http://sourceforge.net/cvs/?group_id=3581
  101. Note that the ide-tape driver as of 1.16f uses a slightly outdated on-tape
  102. format and therefore is not completely interoperable with osst tapes.
  103. The ADR-x0 line is fully SCSI-2 compliant and is supported by st, not osst.
  104. The on-tape format is supposed to be compatible with the one used by osst.
  105. Feedback and updates
  106. --------------------
  107. The driver development is coordinated through a mailing list
  108. <osst@linux1.onstream.nl>
  109. a CVS repository and some web pages.
  110. The tester's pages which contain recent news and updated drivers to download
  111. can be found on
  112. http://sourceforge.net/projects/osst/
  113. If you find any problems, please have a look at the tester's page in order
  114. to see whether the problem is already known and solved. Otherwise, please
  115. report it to the mailing list. Your feedback is welcome. (This holds also
  116. for reports of successful usage, of course.)
  117. In case of trouble, please do always provide the following info:
  118. * driver and kernel version used (see syslog)
  119. * driver messages (syslog)
  120. * SCSI config and OnStream Firmware (/proc/scsi/scsi)
  121. * description of error. Is it reproducible?
  122. * software and commands used
  123. You may subscribe to the mailing list, BTW, it's a majordomo list.
  124. Status
  125. ------
  126. 0.8.0 was the first widespread BETA release. Since then a lot of reports
  127. have been sent, but mostly reported success or only minor trouble.
  128. All the issues have been addressed.
  129. Check the web pages for more info about the current developments.
  130. 0.9.x is the tree for the 2.3/2.4 kernel.
  131. Acknowledgments
  132. ----------------
  133. The driver has been started by making a copy of Kai Makisara's st driver.
  134. Most of the development has been done by Willem Riede. The presence of the
  135. userspace program osg (onstreamsg) from Terry Hardie has been rather
  136. helpful. The same holds for Gadi Oxman's ide-tape support for the DI-30.
  137. I did add some patches to those drivers as well and coordinated things a
  138. little bit.
  139. Note that most of them did mostly spend their spare time for the creation of
  140. this driver.
  141. The people from OnStream, especially Jack Bombeeck did support this project
  142. and always tried to answer HW or FW related questions. Furthermore, he
  143. pushed the FW developers to do the right things.
  144. SuSE did support this project by allowing me to work on it during my working
  145. time for them and by integrating the driver into their distro.
  146. More people did help by sending useful comments. Sorry to those who have
  147. been forgotten. Thanks to all the GNU/FSF and Linux developers who made this
  148. platform such an interesting, nice and stable platform.
  149. Thanks go to those who tested the drivers and did send useful reports. Your
  150. help is needed!
  151. Makedevs.sh
  152. -----------
  153. #!/bin/sh
  154. # Script to create OnStream SC-x0 device nodes (major 206)
  155. # Usage: Makedevs.sh [nos [path to dev]]
  156. # $Id: README.osst.kernel,v 1.4 2000/12/20 14:13:15 garloff Exp $
  157. major=206
  158. nrs=4
  159. dir=/dev
  160. test -z "$1" || nrs=$1
  161. test -z "$2" || dir=$2
  162. declare -i nr
  163. nr=0
  164. test -d $dir || mkdir -p $dir
  165. while test $nr -lt $nrs; do
  166. mknod $dir/osst$nr c $major $nr
  167. chown 0.disk $dir/osst$nr; chmod 660 $dir/osst$nr;
  168. mknod $dir/nosst$nr c $major $[nr+128]
  169. chown 0.disk $dir/nosst$nr; chmod 660 $dir/nosst$nr;
  170. mknod $dir/osst${nr}l c $major $[nr+32]
  171. chown 0.disk $dir/osst${nr}l; chmod 660 $dir/osst${nr}l;
  172. mknod $dir/nosst${nr}l c $major $[nr+160]
  173. chown 0.disk $dir/nosst${nr}l; chmod 660 $dir/nosst${nr}l;
  174. mknod $dir/osst${nr}m c $major $[nr+64]
  175. chown 0.disk $dir/osst${nr}m; chmod 660 $dir/osst${nr}m;
  176. mknod $dir/nosst${nr}m c $major $[nr+192]
  177. chown 0.disk $dir/nosst${nr}m; chmod 660 $dir/nosst${nr}m;
  178. mknod $dir/osst${nr}a c $major $[nr+96]
  179. chown 0.disk $dir/osst${nr}a; chmod 660 $dir/osst${nr}a;
  180. mknod $dir/nosst${nr}a c $major $[nr+224]
  181. chown 0.disk $dir/nosst${nr}a; chmod 660 $dir/nosst${nr}a;
  182. let nr+=1
  183. done