Bob's Magtape Vindicated-Unix to Blame!

Ed G. edgee at cyberpass.net
Sat Apr 11 12:40:35 AEST 1998


I described in an earlier post how uv7 tar would fail, extracting the 
same file over and over again (see below for example).  

It turns out that Bob's magtape works just fine:  the problem is in 
tar!

uv7 tar has a bug in it--a misplaced assignment--which causes it to 
read the first block over and over (see below for example) when 
used with the 'f' option.  

The bug is indirectly a result of a trick tar uses to determine the
block size on the mag tape:  rather than interrogate Unix about the
block size (can someone tell me how do this?),  tar first attempts to 
read the maximum block size supported by tar (20*512 bytes).  The 
number of bytes actually returned is taken to be the actual block 
size and is used by tar for reads thereafter.

Two simple workarounds for /dev/rmt0 are:

tar vx0
and
tar vxfb /dev/rmt0 1
 
The problem:

# tar vxf /dev/rmt0
x mysqrt.c, 383 bytes, 1 tape blocks
x mysqrt.c, 383 bytes, 1 tape blocks
x mysqrt.c, 383 bytes, 1 tape blocks
x mysqrt.c, 383 bytes, 1 tape blocks
x mysqrt.c, 383 bytes, 1 tape blocks
etc.

Received: (from major at localhost)
	by minnie.cs.adfa.oz.au (8.8.5/8.8.5) id MAA18199
	for pups-liszt; Sat, 11 Apr 1998 12:46:20 +1000 (EST)
X-Authentication-Warning: minnie.cs.adfa.oz.au: major set sender to owner-pups at minnie.cs.adfa.oz.au using -f


More information about the TUHS mailing list