Operating System - Linux
1833163 Members
3441 Online
110051 Solutions
New Discussion

can't read Solaris GNU tar tape on RedHat

 
Doug Kratky
Frequent Advisor

can't read Solaris GNU tar tape on RedHat


A tar tape was written on Solaris (SPARC) using gnu tar and shipped to us.

We can't read it on RedHat RHEL 3.0 on HPQ 525 (AMD 64). We are using exactly the same tape drive to try to read it. We've tried different blocking factors.

Any ideas on how we can try reading this tape? Anything that should be different on how this tape is written? Any reason why this souldn't work (transporting tape from Solaris to RedHat on AMD)?


Thanks,
Doug

4 REPLIES 4
Stuart Browne
Honored Contributor

Re: can't read Solaris GNU tar tape on RedHat

What commands are you using, and what errors are you seeing?

I know that reading a tape back on Linux can sometimes be problematic (ejecting at the wrong time, not leaving the tape at the right file marker sometimes) compared to the more commercial unicies, but with a bit of fiddling (usually involving 'dd') it should be ok.

Just as an idea, stick the tape in, rewind it, dd off the first 100kb, and see what 'file' makes of the datastream (i.e. 'dd if=/dev/st0 bs=10240 count=10 | file -'). If it doesn't say some sort of tar archive, then you've got issues.
One long-haired git at your service...
Steven E. Protter
Exalted Contributor

Re: can't read Solaris GNU tar tape on RedHat

What is the exact error code if you run tar txv

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Eric van Dijken
Trusted Contributor

Re: can't read Solaris GNU tar tape on RedHat

You could try to "dd" the tar archive of the tape, using "dd if=/dev/nst0 of=//restore.tar"

This should give you a file on disk. Thats much easier to handle and check.

First you can see if there is really something on the tape. 2nd you can check the file "file //restore.tar" if its really a tar file.
Watch, Think and Tinker.
C. Beerse_1
Regular Advisor

Re: can't read Solaris GNU tar tape on RedHat

In continuation on the previous `dd` andswer: you can also use `dd` and `tar` in a pipeline:

dd if=/dev/tapedevice | tar xvf -

Where both dd and tar can have their added options to read the tape c.q. stream. This avoids having the tape-image on disk.
make everything as simple as possible, not simpler (A.Einstein??)