*BSD News Article 19925


Return to BSD News archive

Newsgroups: comp.os.386bsd.questions
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!olivea!decwrl!decwrl!csus.edu!netcom.com!alm
From: alm@netcom.com (Andrew Moore)
Subject: Beginner tape questions (was Re: question in using scsi tape drive)
Message-ID: <almCC93oE.Ao1@netcom.com>
Organization: Netcom Online Communications Services (408-241-9760 login: guest)
References: <CC8u4z.LLH@usenet.ucs.indiana.edu>
Date: Tue, 24 Aug 1993 06:36:14 GMT
Lines: 108

In article <CC8u4z.LLH@usenet.ucs.indiana.edu> "(Mr.) C. Y. Kung" <ckung@nickel.ucs.indiana.edu> writes:
>
>Hi, can anyone help me in using scsi tape drive?
>Does the tape need to be formatted?

It depends,   but I think usually not.  And when it is necessary,
I don't know how it would be done.

I am just learning how to use tape myself.
Here's an additional list of questions that would be nice to see
answered in the FAQ:

I just got an Archive Viper 2150s (aka Viper 150, evidently) tape drive
and have some general questions about using tape.  To avoid delving too
deep into the code, any answers you can offer are appreciated.

Q1.
$ st -f /dev/st0 status
Archive/Tandberg? tape drive, residual=0, blocksize=512
Density: high = 16 (0x10), medium = 15 (0xf), low = 5 (0x5)
ds=0
er=0

so to write to tape at high-density (QIC-150), presumably I want to use
a device with minor number 4+ (in st.c, density is computed as
minor >> 2 & 0x03, where low density == 3 and high == 1):
$ ls -l /dev/*st4
crw-rw-r--    1 root      14,   5 Aug  6 19:17 /dev/nrst4
brw-rw-r--    1 root       5,   5 Aug  6 19:17 /dev/nst4
crw-rw-r--    1 root      14,   4 Aug  6 19:17 /dev/rst4
brw-rw-r--    1 root       5,   4 Aug  6 19:16 /dev/st4

Is this correct?  BTW, when is erst4 used?
crw-rw-r--    1 root      14,   6 Aug  6 19:17 /dev/erst4

Q2.
How is density (bpi) computed?  I am using 3M DC 6250 cassettes which
have a 250MB capacity on the Viper 150.  But computing the bits/inch
based on 250MB/tape-length (1020 ft.), I get a density of 171335 bpi,
which is nowhere near the 10000 bpi associated with QIC-150 in the st(1)
man page.  Why the discrepancy?

Q3.
How is an appropriate block size determined (and in what units are they
specified in the st(1) command)?

From the 4.3BSD mtio(4) man page, it sounds like data is typically
(traditionally?) stored on tape in eof-terminated sequences of 1 kiokbyte
records.  So first of all, is st's notion of "file" the record sequence
between two eof marks?  What about a "record"?  Is a "record" one
"block", as determined by st's "blocksize" command?   If not, what is
the connection between them?  Can I change the "record" size?  When
would I want a block size that is different from the default?

Q4.
How do I write several archives to a single tape?
I tried without success:

$ st -f /dev/rst4 rewind
$ tar cf /dev/nst4 archive1
$ st -f /dev/nrst4 weof
$ tar cf /dev/nst4 archive2
$ st -f /dev/nrst4 weof

And so on.  Any suggestions? BTW, when tar'ing/cpio'ing/dd'ing to tape,
is one of the block or character devices more appropriate?  Is either ever
not appropriate?

Later I would expect to be able to access, say, archive3 via:

$ st -f /dev/rst0 rewind
$ st -f /dev/nrst0 fsf 2
$ tar xf /dev/st0  # extract archive3

What is a correct sequence for this?

Q5.
Since the Viper 150 writes on QIC-150/120, I guess I don't need to
worry able variable-length records?  How about reading a tape written
with variable-length records.   Is this possible with the Viper?
If so, what's involved?

Q6.
The very scant documentation that came with my drive mentions
a "selectable buffer disconnect size," whose default is 16K.
This is evidently the "maximum number of bytes that can be sent over
the SCSI bus during a single data transfer phase."  What's that?
How is it connected st's "blocksize" command?  Do I want to
use 16K blocks, or might I even want to set the disconnect size to a
higher value?

Q7.
What is "streaming"?  When I tar a directory of files to tape,
I notice that the tape often stops.  Streaming means it doesn't stop?
How would I get the viper 150 to stream using tar or cpio or dump?

Q8.
Where are all the answers to the above and related questions written
down?  Neither on the net nor in the 4.3BSD manuals nor Administration text
which I have could I find this stuff covered!

Q9.
What else should I know?  For example, it seems that a new tape must
stretched.  How is this done?

If I can collect enough information, maybe I'll even write up a "tape"
man page.  Thanks!
-Andrew Moore <alm@netcom.com>