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