SUMMARY : SGI tar-> Sun tar

From: John Doppert (jdoppert@pacesetter.com)
Date: Fri Mar 07 1997 - 17:25:16 CST


Thanks for all your responses:

Original question: How is one to read a 8mm tape
written by IRIX 5.3 (SGI) (8500nsv) from a SunOs 4.1.3 8500 tape drive?

My final solution: I believe the responded solutions will work, but not
for me. I finally read the tape after hooking up an old 8mm 8500 tape drive
to a SGI running 6.2. tar xvf /dev/rmt/tps1d5nsv.8500.

Responses:

-------------------------------------------------------------------------
From: Jonathan Burelbach <burelbac@ncifcrf.gov>

I think Sun & SGI swap the meaning of s & ns on their devs. Try using
/dev/mt/tps0d4sv (or its equivalent) on the Sun

-------------------------------------------------------------------------
From: Ric Anderson <ric@rtd.com>

Try specifying -b N to the Sun tar, when N is twice as big as the
-b value used on the SGI. (-b is the block size and both default to
20 blocks, but the SGI blocksize is double that of the Sun as I
remember it).

From: parks@xdiv.lanl.gov (Parks Fields)

     You have to swap the bytes.
     
     dd if=/dev/rst0 conv=swab |tar -xvf -
     or
     dd if=/dev/rst8 conv=swab ibs=10k obs=10k | tar xvBf -
     
     
     To read Sun tapes on an SGI machine:
     
     dd if=/dev/tape conv=swab ibs=10k obs=10k | tar xvBf -

-------------------------------------------------------------------------
From: Daniel Baker <dbaker@hobbes.cuckoo.com>

Make sure that if you have gnutar on one, you have gnutar
on the other.

-------------------------------------------------------------------------
From: "Andrew Moffat" <amof@SubaruSparcDev.subaru1.com>

....even if the
drives are compatible you'll have to byte-swap the data when going between
Sun and SGI.. the swab option to dd should do it.

-------------------------------------------------------------------------
>From rave!rave.com!dean (DEAN MOORE)

SunSolve Document srdb/5771

[Image] [Image]

[ Notify of changes | Mark infodoc for later retrieval ]

SYNOPSIS:
 reading an SGI tar tape-swapping every pair of bytes
DETAIL DESCRIPTION:

What command is used in trying to read/write a tar tape that was created on
an
SGI, or similar machine, that swaps every pair of bytes
SOLUTION SUMMARY:

In order to read a tape in that format, use the following command:

        dd if=/dev/nrst0 conv=swab | tar xvf -

To write in a format similar to SGI's:

        tar cvf - | dd of=/dev/nrst0 conv=swab

BUG REPORT ID: n/a
PATCH ID: n/a
PRODUCT AREA: n/a
PRODUCT: dump_restore
SUNOS RELEASE: any
UNBUNDLED RELEASE: n/a
HARDWARE: All

-------------------------------------------------------------------------
From: mrs@cadem.mc.xerox.com ("Michael Salehi x22725")

 as I remember SGI's
wrote the tape such that sun could not read them and it was a architecture
issue.

Exabyte 8mm tapes are used to exchange image data between people
generating computer animation and Sun. The most common machines in this
environment are Suns and SGI machines. Since Exabyte makes the actual
drives, it would seem that the tapes would be easily exchangeable.
However, due to various hardware and software choices made by Sun and
SGI, it is not quite straightforward. A discussion of these issues
follows:

-------------------------------------------------------------------------
From: cecilp@adonis.westel.com (Cecil Pang)

SOLUTION SUMMARY:

1. Suns always operate their Exabytes in variable-block-size mode.
   SGI machines are capable of both variable-block-size and
   fixed-block-size mode, but the default "/dev/tape" and "/dev/nrtape"
   devices generated by /dev/MAKEDEV are links to the fixed-block
   devices. Thus, by default, people will use fixed-block mode on
   SGI machines.

   For compatibility between machines, use variable-block mode
   on the SGI. The device name will be something like /dev/rmt/tps0d3nsv,
   if the default device (which /dev/tape is linked to) is called
   /dev/rmt/tps0d3ns. Two additional links called /dev/vtape and
   /dev/nrvtape can be created to make it easier to access the
   variable-block-mode devices. SGI should make variable-block the
   default on 8mm; it is on 4mm.

   Mixing modes (reading fixed-block tape in variable mode or vice versa)
   will work, in the sense that data can be retrieved, but this either
   gives horrible performance (each read returns only 1024 bytes) or
   confuses tar about the size of the records written, and causes it to
   do strange things at the end of tape.

2. Most versions of "tar" (including the Sun one, and pdtar) have a
   default blocking factor of 20. These versions will also automatically
   determine the blocking factor when reading a tape, provided a
   sufficiently large initial guess is specified, and they will tell
   the user what the blocking factor actually is. Tar tapes
   with a blocking factor of 20 can be read anywhere.

   The SGI tar, however, defaults to a blocking factor of 256 when
   writing to 8mm tape. When it reads a tape, it adapts
   itself to the blocking factor of the tape automatically, without
   telling the user what that number is. This is fine when writing
   and reading tapes on SGI machines only.

   However, on the Sun (at least older ones with VME/SCSI adapters)
   there is a 16-bit transfer size limit, which means the maximum usable
   blocking factor for tar is 126 (63 x 1024 bytes). A tape written on
   the SGI machine, with the default blocking factor, is utterly unusable
   on the Sun. It is necessary to force tar to use a smaller blocksize
   on the SGI side in order for the tape to be readable on the Sun.

   Because of the above, always specify blocking factorswhen reading
   and writing.

On the Sun:

        tar cvfb /dev/nrst1 20

On the SGI:

        tar cvfb /dev/rmt/tps0d3nrnsv 20

Comments to manufacturers:

The SGI driver seems to be able to run an Exabyte in any mode it can
operate in, but the defaults are strange. Why fixed-block mode
instead of variable? Why not get rid of "byte-swapped" mode entirely?
Tar is too clever. The automatic switch to 256 blocking factor
is gratuitously incompatible with other versions of tar.

-------------------------------------------------------------------------
From: john benjamins <johnb@Soliton.COM>

sometimes the sgi's write the tapes byte swapped. try reading the tape

        dd if=/dev/rst8 bs=20b conv=swab | tar tf -

-------------------------------------------------------------------------
From: celeste@celestial.stokely.com (Celeste Stokely)

You have to swap bytes, since they differ on big-endian vs
little-endian.

Try something like:
dd if=/dev/nrst0 conv=swab | tar xvf -
The "conv=swab" is the key. The rest of the syntax varies, based
on your need.



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:48 CDT