Subject: bin/2202: current mt corrupts tape archives when using `fsf`
To: None <gnats-bugs@NetBSD.ORG>
From: Thorsten Frueauf <frueauf@ira.uka.de>
List: netbsd-bugs
Date: 03/11/1996 17:44:27
>Number:         2202
>Category:       bin
>Synopsis:       current mt corrupts tape archives when using `fsf`
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Mar 11 12:20:01 1996
>Last-Modified:
>Originator:     Thorsten Frueauf
>Organization:
private
>Release:        <NetBSD-current source date> NetBSD current 07.03.1996
>Environment:
	
Amiga 3000

System: NetBSD di_frueauf 1.1A NetBSD 1.1A (CYBERDYNE) #2: Thu Mar 7 18:33:49 GMT 1996 milano@di_frueauf:/home/milano/source/netbsd-src/sys/arch/amiga/compile/CYBERDYNE amiga

HP DAT tape drive:
st0 at scsibus0 targ 5 lun 0: <HP, HP35470A, 1109> SCSI2 1/sequential removable

>Description:
	
If you create a tar archive on a DAT tape, then want later add another one
using `mt -f /dev/nst0 fsf 1` the archive on the tape is trashed!

>How-To-Repeat:
	

Try the following:

[milano@di_frueauf]/# cd /tmp
[milano@di_frueauf]/tmp# cp /etc/hosts .
[milano@di_frueauf]/tmp# ls -la test
-rw-r--r--  1 root  wheel  7691 Mar 11 17:21 test
[milano@di_frueauf]/tmp# tar cvpf /dev/st0 test
test
[milano@di_frueauf]/tmp# tar tvf /dev/st0
-rw-r--r-- root/wheel     7691 Mar 11 17:21 1996 test
[milano@di_frueauf]/tmp# mt -f /dev/nst0 fsf 1
[milano@di_frueauf]/tmp# mv test test-2
[milano@di_frueauf]/tmp# tar cvpf /dev/nst0 test-2
test-2
[milano@di_frueauf]/tmp# mt -f /dev/st0 rewind
[milano@di_frueauf]/tmp# tar tvf /dev/st0
[milano@di_frueauf]/tmp#

There ya go with *nothing* usabale on the tape anymore!

Sometimes, not always I get the following console messages:
st0(ahsc0:5:0): readonly device, data = 00 00 00 00 27 00 00 00 00 00 00
st0(ahsc0:5:0): no data found, requested size: 1 (decimal), data = 00 00 00 00 00 05 00 00 61 6e 6f
st0(ahsc0:5:0): no data found, requested size: 1 (decimal), data = 00 00 00 00 00 05 00 00 61 6e 6f
st0(ahsc0:5:0): no data found, requested size: 2048 (decimal), data = 00 00 00 00 00 05 00 00 00 00 00
st0(ahsc0:5:0): no data found, requested size: 2048 (decimal), data = 00 00 00 00 00 05 00 00 00 00 00

>Fix:
	
Don't know, sorry :-(
>Audit-Trail:
>Unformatted:
current mt corrupts tape archives when using `fsf`