how to copy tape content to disk

I first use "tar xvf /dev/rmt/n", but system prompts wrong block size 1844. Also I tried using "cpio" command, but system said "I/O error, 0+0 input, 0+0 output".
Then I use "dd if=/dev/rmt/n of=/tmp/tapetest bs=10k count=1", then "file tapetest", the result is "ascii text".
How can I copy the content of the tape to disk? Thanks.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

use tape tool

To correct the block size, choose Block I/O from the Tape Tool Properties window. In the text field that appears, type the correct block size (the one from the tape).

also to check tape device and all, man mt.

First check that the tape is readable  by Solaris. Use the "tcopy" command to check if you can see blocks and sizes, with this information retry your command. Try also using 20b as the block size.
man tcopy
Learn Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

i just noticed what r u using for /dev/rmt/n, i think u should be using /dev/rmt/0 or somethine whatever is there in /dev//rmt configured.
To get the data off of the tape you need to know what mechanism (tar, cpio, dump/ufsdump, etc) was used to write the tape and whether the data might be byte-swapped w/respect to  Solaris, i.e., what OS wrote the tape. There are a lot of ways on placing data on tape and you won't be able to recover the data unless you use a complementary reading tool.
frog77Author Commented:
Thanks, jlevie. The problem is I do not know how the data are written to tapes. The previous S.A. has gone. Are there any command to see what way of the data are previously put into the tape? Thanks.
Were these tapes written on a Sun? If so the obvious choices would be tar, cpio, or ufsdump. Since you've tried tar & cpio with no luck I'd suggest trying 'ufsrestore if /dev/rmt/?' and see if that works.
frog77Author Commented:
I guess tapes were written on Sun. But I've already tried "ufsrestore" command. The system prompts that wrong block size. I've no idea how to make it work.
Thank you.
Since none of the standard (tar, cpio, ufsdump) methods work it would seem to me that you might be looking at a tape written:

1) In some proprietary backup format (Networker, Veritas, ArcServe, etc)
2) On something other than a unix system with a native tool (NT backup, etc)
3) Via some non-standard method (user program, dd direct to raw tape, etc)

In all of those cases I'd say that you'll have to find out from the previous SA how the tape was written to be able to read it. Of course it is also possible that the tape was orginally written with a standard mechanism and has been damaged or has gone bad. Knowing what should work would probably answer that question.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
please read man page for mt.
and take all the information from tape.

did u read man page for tcopy also. it might be useful determining these information.
I am not sure but try using any one file from the directory
/dev/rst/ ..just try any file which identifies the tape device you are using

u can try to set density to 0 and then try to read the tapes.
mt -f /dev/rmt/n setdensity 0

it will be slower but it will automatically adjusted to default block size.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.