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.
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):
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.