Subject: mt/st problems ?
To: None <port-i386@netbsd.org>
From: Peter L. Peres <plp@actcom.co.il>
List: port-i386
Date: 01/26/2005 00:16:18
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