1.\" Copyright (c) 1990, 1991 The Regents of the University of California. 2.\" All rights reserved. 3.\" 4.\" This code is derived from software contributed to Berkeley by 5.\" the Systems Programming Group of the University of Utah Computer 6.\" Science Department. 7.\" 8.\" %sccs.include.redist.man% 9.\" 10.\" @(#)st.4 5.3 (Berkeley) 07/31/91 11.\" 12.Dd 13.Dt ST 4 hp300 14.Os 15.Sh NAME 16.Nm \&st 17.Nd 18.Tn CCS SCSI 19tape driver 20.Sh SYNOPSIS 21.Cd "tape st0 at scsi? slave ?" 22.Sh DESCRIPTION 23The 24.Nm \&st 25driver was written especially to support the Exabyte 26.Tn EXB-8200 8MM 27Cartridge 28Tape Subsystem. It has several extensions specific to the Exabyte, 29but should support other tape drives as long has they follow 30the 31.Tn ANSI SCSI-I 32specification. Besides extensive use with 33an Exabyte, the driver has been tested with an 34Archive 35.Tn QIC-24 36tape drive. 37The 38.Nm \&st 39tape interface provides a standard tape drive interface 40as described in 41.Xr mtio 4 42with the following exceptions: 43.Bl -enum 44.It 45Density is dependent on device type. Current Exabyte hardware has 46only one density. The 47.Tn EXB-8500 48drive, when released, will have a high 49density format of 50.Tn 5.6GB . 51On an Archive 52.Tn QIC-24 53drive the driver reads both 54.Tn QIC-11 55and 56.Tn QIC-24 57formats 58but writes only 59.Tn QIC-24 . 60.It 61Only the ``raw'' interface is supported. 62.El 63.Pp 64Special Exabyte Support: 65.Pp 66The 67.Dv MTIOCGET 68.Xr ioctl 2 69call on an Exabyte returns this structure: 70.Bd -literal 71struct mtget { 72 short mt_type; /* type of magtape device */ 73 short mt_dsreg; /* sc_flags */ 74 short mt_erreg; /* high 8 bytes error status */ 75 /* low 8 bytes percentage of Rewrites 76 if writing, ECC errors if reading */ 77 short mt_resid; /* Mbyte until end of tape */ 78}; 79.Ed 80.Pp 81Bit 4 in the minor device number is used 82to select long filemarks or short filemarks. A long filemark occupies 832.12 MBytes of space on the tape, while a short filemark occupies 488 KBytes. 84A long filemark includes an erase gap while the short filemark does not. 85The tape can be positioned on the 86.Tn BOT 87side of a long filemark allowing 88data to be appended with a write operation. Since the short filemark does not 89contain an erase gap which would allow writing it is considered to be 90non-erasable. If either type of filemark is followed by blank tape, 91data may be appended on its 92.Tn EOT 93side. 94.Pp 95Bit 5 in the minor device number selects fixed block mode with a block 96size of 1K. Variable length records are the default if bit 5 is not 97set. 98.Pp 99For unit 0 here are the effects of minor device bits 2,3,4,5. For other 100units add the 101.Em unit# 102to each of the device names. 103.Bl -column norewind density filemarks -offset indent 104.Em norewind high short fixed 105.Em density filemarks block mode 106rst0 107nrst0 X 108rst8 X 109nrst8 X X 110rst16 X 111nrst16 X X 112rst24 X X 113nrst24 X X X 114rst32 X 115nrst32 X X 116rst40 X X 117nrst40 X X X 118rst48 X X 119nrst48 X X X 120rst56 X X X 121nrst56 X X X X 122.El 123.Sh SEE ALSO 124.Xr mt 1 , 125.Xr tar 1 , 126.Xr mtio 4 , 127.Rs 128.%T EXB-8200 8MM Cartridge Tape Subsystem Interface User Manual. 129.Re 130.Sh HISTORY 131The 132.Nm \&st 133driver 134.Ud 135.Sh BUGS 136The 137.Tn HP 13898268 139.Tn SCSI 140controller hardware can not do odd length 141.Tn DMA 142transfers. If odd length 143.Tn DMA I/O 144is requested the driver will use the 145"Program Transfer Mode" of the Fujitsu 146.Tn MB87030 147chip. Read requests are 148normally even length for which a 149.Tn DMA 150transfer is used. If, however, the 151driver detects that a odd length read has happened (when a even length 152was requested) it will issue the 153.Dv EIO 154error and the last byte of the read 155data will be 0x00. Odd length read requests must match the size of the 156requested data block on tape. 157.Pp 158The following only applies when using long filemarks. Short filemarks can 159not be overwritten. 160.Bd -filled -offset 4n 161Due to the helical scan and the erase mechanism, there is a writing 162limitation on Exabyte drives. 163.Dq Li tar r 164or 165.Dq Li tar u 166will not work 167.Pf ( Dq Li tar c 168is ok). One can only start writing at 1) beginning of tape, 2) on the 169end of what was last written, 3) "front" side of a regular (long) filemark. 170Say you have a tape with 3 tar files on it, want to save the first 171file, and want to begin writing over the 2nd file. 172.Pp 173On a normal 1/4" or 1/2" drive you would do: 174.Pp 175.Li "mt fsf 1; tar cf /dev/nrst0 ..." 176.Pp 177but for an Exabyte you need to do: 178.Pp 179.Li "mt fsf 1; mt bsf 1; mt weof 1; tar cf /dev/nrst0 ..." 180.Pp 181The regular long filemark consists of an erased zone 3.8" long 182(needed to begin a write). In this case, the first filemark is 183rewritten in place, which creates an erased zone 184.Em after 185it, clearing the 186way to write more on the tape. The erase head is not helical. 187.Pp 188One can position a tape to the end of what was last written by reading 189until a 190.Tn \*qBLANK CHECK\*q 191error is returned. Writing can be started at this 192point. (This applies to both long and short filemarks.) The tape does 193not become positioned somewhere down the "erased" area as does a 194conventional magtape. One can issue multiple reads at the 195.Tn \*qBLANK CHECK\*q 196error, but the Exabyte stays positioned at the beginning of the 197blank area, ready to accept write commands. File skip operations do 198not stop at blank tape and will run into old data or run to the end of 199the tape, so you have to be careful not to 200.Dq Li mt fsf too_many . 201.Ed 202.Pp 203Archive support gets confused if asked to moved more filemarks than there are 204on the tape. 205.Pp 206This man page needs some work. Some of these are not really bugs, 207just unavoidable consequences of the hardware. 208