1*62994Sbostic.\" Copyright (c) 1990, 1991, 1993 2*62994Sbostic.\" The Regents of the University of California. All rights reserved. 344683Sbostic.\" 444683Sbostic.\" This code is derived from software contributed to Berkeley by 544683Sbostic.\" the Systems Programming Group of the University of Utah Computer 644683Sbostic.\" Science Department. 744683Sbostic.\" 844683Sbostic.\" %sccs.include.redist.man% 944683Sbostic.\" 10*62994Sbostic.\" @(#)st.4 8.1 (Berkeley) 06/09/93 1144683Sbostic.\" 1247672Scael.Dd 1347672Scael.Dt ST 4 hp300 1447672Scael.Os 1547672Scael.Sh NAME 1647672Scael.Nm \&st 1747672Scael.Nd 1847672Scael.Tn CCS SCSI 1947672Scaeltape driver 2047672Scael.Sh SYNOPSIS 2147672Scael.Cd "tape st0 at scsi? slave ?" 2247672Scael.Sh DESCRIPTION 2344683SbosticThe 2447672Scael.Nm \&st 2547672Scaeldriver was written especially to support the Exabyte 2647672Scael.Tn EXB-8200 8MM 2747672ScaelCartridge 2844683SbosticTape Subsystem. It has several extensions specific to the Exabyte, 2944683Sbosticbut should support other tape drives as long has they follow 3047672Scaelthe 3147672Scael.Tn ANSI SCSI-I 3247672Scaelspecification. Besides extensive use with 3344683Sbostican Exabyte, the driver has been tested with an 3447672ScaelArchive 3547672Scael.Tn QIC-24 3647672Scaeltape drive. 3744683SbosticThe 3847672Scael.Nm \&st 3944683Sbostictape interface provides a standard tape drive interface 4044683Sbosticas described in 4147672Scael.Xr mtio 4 4244683Sbosticwith the following exceptions: 4347672Scael.Bl -enum 4447672Scael.It 4544683SbosticDensity is dependent on device type. Current Exabyte hardware has 4647672Scaelonly one density. The 4747672Scael.Tn EXB-8500 4847672Scaeldrive, when released, will have a high 4947672Scaeldensity format of 5047672Scael.Tn 5.6GB . 5147672ScaelOn an Archive 5247672Scael.Tn QIC-24 5347672Scaeldrive the driver reads both 5447672Scael.Tn QIC-11 5547672Scaeland 5647672Scael.Tn QIC-24 5747672Scaelformats 5847672Scaelbut writes only 5947672Scael.Tn QIC-24 . 6047672Scael.It 6144683SbosticOnly the ``raw'' interface is supported. 6247672Scael.El 6347672Scael.Pp 6444683SbosticSpecial Exabyte Support: 6547672Scael.Pp 6647672ScaelThe 6747672Scael.Dv MTIOCGET 6847672Scael.Xr ioctl 2 6947672Scaelcall on an Exabyte returns this structure: 7047672Scael.Bd -literal 7144683Sbosticstruct mtget { 7247672Scael short mt_type; /* type of magtape device */ 7347672Scael short mt_dsreg; /* sc_flags */ 7447672Scael short mt_erreg; /* high 8 bytes error status */ 7547672Scael /* low 8 bytes percentage of Rewrites 7647672Scael if writing, ECC errors if reading */ 7747672Scael short mt_resid; /* Mbyte until end of tape */ 7844683Sbostic}; 7947672Scael.Ed 8047672Scael.Pp 8144683SbosticBit 4 in the minor device number is used 8244683Sbosticto select long filemarks or short filemarks. A long filemark occupies 8344683Sbostic2.12 MBytes of space on the tape, while a short filemark occupies 488 KBytes. 8444683SbosticA long filemark includes an erase gap while the short filemark does not. 8547672ScaelThe tape can be positioned on the 8647672Scael.Tn BOT 8747672Scaelside of a long filemark allowing 8844683Sbosticdata to be appended with a write operation. Since the short filemark does not 8944683Sbosticcontain an erase gap which would allow writing it is considered to be 9044683Sbosticnon-erasable. If either type of filemark is followed by blank tape, 9147672Scaeldata may be appended on its 9247672Scael.Tn EOT 9347672Scaelside. 9447672Scael.Pp 9544683SbosticBit 5 in the minor device number selects fixed block mode with a block 9644683Sbosticsize of 1K. Variable length records are the default if bit 5 is not 9744683Sbosticset. 9847672Scael.Pp 9944683SbosticFor unit 0 here are the effects of minor device bits 2,3,4,5. For other 10044683Sbosticunits add the 10147672Scael.Em unit# 10244683Sbosticto each of the device names. 10347672Scael.Bl -column norewind density filemarks -offset indent 10447672Scael.Em norewind high short fixed 10547672Scael.Em density filemarks block mode 10647672Scaelrst0 10747672Scaelnrst0 X 10847672Scaelrst8 X 10947672Scaelnrst8 X X 11047672Scaelrst16 X 11147672Scaelnrst16 X X 11247672Scaelrst24 X X 11347672Scaelnrst24 X X X 11447672Scaelrst32 X 11547672Scaelnrst32 X X 11647672Scaelrst40 X X 11747672Scaelnrst40 X X X 11847672Scaelrst48 X X 11947672Scaelnrst48 X X X 12047672Scaelrst56 X X X 12147672Scaelnrst56 X X X X 12247672Scael.El 12347672Scael.Sh SEE ALSO 12447672Scael.Xr mt 1 , 12547672Scael.Xr tar 1 , 12647672Scael.Xr mtio 4 , 12747672Scael.Rs 12847672Scael.%T EXB-8200 8MM Cartridge Tape Subsystem Interface User Manual. 12947672Scael.Re 13047672Scael.Sh BUGS 13147672ScaelThe 13247672Scael.Tn HP 13347672Scael98268 13447672Scael.Tn SCSI 13547672Scaelcontroller hardware can not do odd length 13647672Scael.Tn DMA 13747672Scaeltransfers. If odd length 13847672Scael.Tn DMA I/O 13947672Scaelis requested the driver will use the 14047672Scael"Program Transfer Mode" of the Fujitsu 14147672Scael.Tn MB87030 14247672Scaelchip. Read requests are 14347672Scaelnormally even length for which a 14447672Scael.Tn DMA 14547672Scaeltransfer is used. If, however, the 14644683Sbosticdriver detects that a odd length read has happened (when a even length 14747672Scaelwas requested) it will issue the 14847672Scael.Dv EIO 14947672Scaelerror and the last byte of the read 15044683Sbosticdata will be 0x00. Odd length read requests must match the size of the 15144683Sbosticrequested data block on tape. 15247672Scael.Pp 15344683SbosticThe following only applies when using long filemarks. Short filemarks can 15444683Sbosticnot be overwritten. 15547672Scael.Bd -filled -offset 4n 15644683SbosticDue to the helical scan and the erase mechanism, there is a writing 15747672Scaellimitation on Exabyte drives. 15847672Scael.Dq Li tar r 15947672Scaelor 16047672Scael.Dq Li tar u 16147672Scaelwill not work 16247672Scael.Pf ( Dq Li tar c 16344683Sbosticis ok). One can only start writing at 1) beginning of tape, 2) on the 16444683Sbosticend of what was last written, 3) "front" side of a regular (long) filemark. 16544683SbosticSay you have a tape with 3 tar files on it, want to save the first 16644683Sbosticfile, and want to begin writing over the 2nd file. 16747672Scael.Pp 16844683SbosticOn a normal 1/4" or 1/2" drive you would do: 16947672Scael.Pp 17047672Scael.Li "mt fsf 1; tar cf /dev/nrst0 ..." 17147672Scael.Pp 17244683Sbosticbut for an Exabyte you need to do: 17347672Scael.Pp 17447672Scael.Li "mt fsf 1; mt bsf 1; mt weof 1; tar cf /dev/nrst0 ..." 17547672Scael.Pp 17644683SbosticThe regular long filemark consists of an erased zone 3.8" long 17744683Sbostic(needed to begin a write). In this case, the first filemark is 17847672Scaelrewritten in place, which creates an erased zone 17947672Scael.Em after 18047672Scaelit, clearing the 18144683Sbosticway to write more on the tape. The erase head is not helical. 18247672Scael.Pp 18344683SbosticOne can position a tape to the end of what was last written by reading 18447672Scaeluntil a 18550730Scael.Tn \*qBLANK CHECK\*q 18647672Scaelerror is returned. Writing can be started at this 18744683Sbosticpoint. (This applies to both long and short filemarks.) The tape does 18844683Sbosticnot become positioned somewhere down the "erased" area as does a 18947672Scaelconventional magtape. One can issue multiple reads at the 19050730Scael.Tn \*qBLANK CHECK\*q 19147672Scaelerror, but the Exabyte stays positioned at the beginning of the 19244683Sbosticblank area, ready to accept write commands. File skip operations do 19344683Sbosticnot stop at blank tape and will run into old data or run to the end of 19447672Scaelthe tape, so you have to be careful not to 19547672Scael.Dq Li mt fsf too_many . 19647672Scael.Ed 19747672Scael.Pp 19844683SbosticArchive support gets confused if asked to moved more filemarks than there are 19944683Sbosticon the tape. 20047672Scael.Pp 20144683SbosticThis man page needs some work. Some of these are not really bugs, 20244683Sbosticjust unavoidable consequences of the hardware. 203