Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tape info 1

Status
Not open for further replies.

tcpipv6

IS-IT--Management
Nov 22, 2007
91
AR
Hi all,
I have a solaris 9 and i need to know if theres is any way
to see the info in the tape. and if there any way to check in the tape is ok or corrupted.

thanks
 
Can you give more details please? Do you know how the tape was written (ie tar, ufsdump etc)? You could try dd, but we would need more info first.

The internet - allowing those who don't know what they're talking about to have their say.
 
Kencunningham,

the tape was written with tar, and some other with ufsdump.
please let me know what more info you need.

thanks
 
Kencunningham,

my bad the tape was written with cpio.

thanks
 
Hi - apologies, the night intervened! You first of all need to find out what device your tape drive is. Put your tape in (it may be an idea to write-protect it just in case) and issue the command:

mt -f /dev/rmt/0 status

If this returns an error, try replacing the 0 with a 1 and try the command again. Generally, if there is only one tape drive attached it will be /dev/rmt/0, but it is possible that if a drive has been replaced it may have a higher number.

When you've found the device that responds 'positively' (sorry I don't have a box at home to tell you what the exact response is, but it should be fairly obvious.), issue an:

mt -f /dev/rmt/0 rewind (again replace 0 if necessary)

to rewind the tape to the beginning, in case it's not there already. To see a listing of what's on the tape using cpio issue the command:

cpio -civt < /dev/rmt/0 (again replace 0 as appropriate)

More information is here (with links to how to restore from the tape if you wish):


Hope this helps, post back if need be.



The internet - allowing those who don't know what they're talking about to have their say.
 
No problem - and thanks for the star.

The internet - allowing those who don't know what they're talking about to have their say.
 
KenCunningham,

one more question is there any way i can check in the info was copyed corrected to the tape? or some how test it?

thanks!
 
The only way I can think of would be to read the data back from the tape to disk and check it as well as you can. Be careful however, if your data is written using absolute pathnames, you will overwrite any existing files of the same name, something you might not want! If you have another box to test it on, so much the better.

The internet - allowing those who don't know what they're talking about to have their say.
 
I would dd the whole thing to disk, once you know the block size. cpio is not going to be variable block sized, so it should dd fine.

Unfortunately with cpio, I believe it is just "header" followed by data with buffer, then another header, etc.
So if the tape ended prematurely, you might not know it.

Now what is nice, you can extract the data even if you
have only tape of a multiple tape, since you can seek to the next good header and it looks like a cpio image.

For this exact reason, when I used to make corporate images I would make the first file an info file that contained a listing and extraction method in some simple format (tar) followed by the actual tape file.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top