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