Subject: mt/st problems ? (fwd)
To: None <port-i386@netbsd.org>
From: Peter L. Peres <plp@actcom.co.il>
List: port-i386
Date: 01/29/2005 00:59:47
Hi list, I posted this message a few days ago and there was no reaction. 
My conclusion is that there may be potentially very bad problems with 
tar used on st (scsi qic tape) devices. Is this a problem that was seen 
by others, or am I the only one ? It seems to be related to the tar+st 
combination since other programs (mt, dd) seem to operate correctly with 
tar, and tar itself does not seem to have other problems. the net holds 
some testimonies about problems with tapes under linux. Are they shared 
by netbsd ?

tia,
Peter


---------- Forwarded message ----------
Date: Wed, 26 Jan 2005 00:16:18 +0200 (IST)
From: Peter L. Peres <plp@plp.home.org>
To: port-i386@netbsd.org
Subject: mt/st problems ?


Hi, I have strange problems again:

1.6.1:

st0 is a qic-150, it has file1 file2 file3 on it, in this order, put on by tar, 
on the same system. When I try to read any back, besides the first file, I get 
nothing from tar until the third (!!) try. See below:

I issue commands like:

> export TAPE=/dev/nrst0
> mt rewind
> mt status
SCSI tape drive, residual=0
ds=3<Mounted>
er=0
blocksize: 512 (0, 0, 0, 0)
density: 0 (0, 16, 15, 5)
current file number: 0
current block number: 0
> tar tv 
file1
> mt fsf
> tar tv <- nothing! $? is 0!
> tar tv <- nothing! $? is 0!
> tar tv <-this time it works ?!!
file2

I tried this several times. What could cause this ? And why does tar not return 
an error code anyway ?! mt status after fsf shows file 1 block 0 (as it 
should). Is this a tar problem ? A mt problem ? A st problem ? A faulty drive 
or driver could not cause this (tar should notice a short archive and complain, 
no ?) so I think it's a tar problem.

If I use a single archive per tape there are no problems (no matter what size 
the archive).

Also, tar always leaves the tape at the current file, last block. Reading the 
tape with dd leaves the tape at the start of the next file, block 0. 
Additionally, if I use /dev/rst0 instead of /dev/nrst0 with tar, it rewinds and 
exits normally without extracting anything! This is dangerous!

Peter