> I have a 4mm DAT SCSI tape drive that works fine when reading and writing
> natively under Linux. My problem is that I have a tar tape that was created
> on a SUN/Sparc.
> I was able to use dd to pull some data off (looked at data and found source
> file fragments imbedded.) It does look like a tar file (somewhat), the
> header looks bogus and Linux complains that its not in tar format.
I suspect your problem is the Sparc wrote the tape using a different blocksize
than Linux is reading. By default under Linux, scsi tapes are assumed to have
a block size of 512 bytes, which means the kernel will read 512 bytes per
block, irregarless of what you tell tar is the blocksize.
You should use the mt command to change the block size (if you change the block
size to 0, then the kernel will handle variable sized tape blocks). Thus, if
your tape device is /dev/nst0, you should do:
mt -f /dev/nst0 setblk 0
Note, if you have mt 0.5 (ie, RedHat 5.2), there is a bug in it when you use -f
along with an option taking a numeric argument, and you should upgrade to mt
0.5b or later or do:
env TAPE=/dev/nst0 mt setblk 0
A second problem is the use of hardware compression. You might need to enable
or disable h/w compression on the linux or sparc side. Many of the 2 gig DDS-1
DAT tape drives don't have hardware compression, so if you have such a tape
drive on the Linux box and a tape drive on the Sun that automagically turns on
compression, you will need to disable it on the Sun when making the tape. On
the Linux side to enable compression (assuming your tape drive supports it),
do:
mt -f /dev/nst0 compression 1
and do the following to disable it:
mt -f /dev/nst0 compression 0
--
Michael Meissner, Cygnus Solutions (Massachusetts office)
4th floor, 955 Massachusetts Avenue, Cambridge, MA 02139, USA