- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- finding out how a tape has been written.
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2004 11:03 PM
02-04-2004 11:03 PM
I was given a tape yesterday that was allegedly a cpio backup from a customer who needed to restore some data, but I was unable to get any meaningful data from it
thanks in anticipation
malvin
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2004 11:10 PM
02-04-2004 11:10 PM
Re: finding out how a tape has been written.
Try Here:-
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=87318
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2004 11:43 PM
02-04-2004 11:43 PM
Re: finding out how a tape has been written.
will keep trying
malvin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2004 02:22 AM
02-05-2004 02:22 AM
Re: finding out how a tape has been written.
# dd if=/dev/rmt/0mn of=/tmp/test bs=1K count=2
# file /tmp/test
The file command should return what format the tape is (cpio, tar, etc.).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2004 02:26 AM
02-05-2004 02:26 AM
Re: finding out how a tape has been written.
malvin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2004 02:46 AM
02-05-2004 02:46 AM
Re: finding out how a tape has been written.
Can pax read the tape? Pax can read tar and cpio formats. If pax cant read the tape, it could be that the tape is bad:
# pax -r -f /dev/rmt/0m
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2004 02:52 AM
02-05-2004 02:52 AM
Re: finding out how a tape has been written.
cheers
malvin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2004 03:58 AM
02-05-2004 03:58 AM
Re: finding out how a tape has been written.
mt -t /dev/rmt/0m
dd if=/dev/rmt/0m of=/var/tmp/tapeid count=2
file /var/tmp/tapeid
should tell you about the tape, assuming that it is in a 'well-known' format like tar, cpio, etc. (note that /dev/rmt/0m is an example--use the correct device file for your system) It is IMPOSSIBLE to determine if the tape was created with dd since dd is a raw copy of
mt -t /dev/rmt/0m
xd -xc /dev/rmt/0m | more
If you see something like VOL as the first 3 characters and subsequent header lines like HDR1, HDR2, etc then you have an ANSI labeled tape. If the characters are strange, it might be in EBCDIC mode so use something like this to translate:
mt -t /dev/rmt/0m
dd if=/dev/rmt/0m od= count=2 conv=ebcdic | xd -xc
If thisa looks like VOL HDR etc records are present, you have an IBM standard label. The bad news about ANSI or IBM standard laebls is that there is nothing in HP-UX that can read the data and make sense out of it. If the tape contains fixed length records, you can probably play with mt (for positioning the tape) and dd to do a raw copy and translate from EBCDIC if necessary. But if the format is variable length, you'll have to write a program to interpret the records, essentially the basics of a mainframe restore program.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2004 04:01 AM
02-05-2004 04:01 AM
Re: finding out how a tape has been written.
so will let you know sometime tomorrow
cheers
malvin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2004 10:26 PM
02-09-2004 10:26 PM
Re: finding out how a tape has been written.
I then tried your suggestions Bill and cannot see anything like you suggest, so I have "dd'd" the first 10 blocks in and am attaching them for your perusal. It all looks like plain text so I am not certain as to the kind of tape
cheers
malvin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2004 10:33 PM
02-09-2004 10:33 PM
Re: finding out how a tape has been written.
I could also be wrong here but if I remember my SCO (which I probably don't because it was a long time ago) the default block size was 512 when using tar. So try tar with a block size of 512.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2004 10:38 PM
02-09-2004 10:38 PM
Re: finding out how a tape has been written.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2004 10:43 PM
02-09-2004 10:43 PM
Re: finding out how a tape has been written.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2004 10:45 PM
02-09-2004 10:45 PM
Re: finding out how a tape has been written.
when I used tar -tvf previously it said "tape error"
cheers
malvin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2004 11:31 PM
02-09-2004 11:31 PM
Re: finding out how a tape has been written.
Looking into tar a bit more, it would seem that what I said before doesn't mean too much. The default blocking factor for tar is 20 and tar always writes logical blocks of 512. It is mentioned that if you are having trouble, use a blocking factor of "1", it is slow but has most chance of success. In this case you would do
"tar tvbf 1
However, you do definately have a "tar" file on that tape.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2004 11:44 PM
02-09-2004 11:44 PM
Re: finding out how a tape has been written.
# dd if=/dev/rmt/0m of=xx ibs=1024000
# ls -l xx
that's the tape block size (unless it's written on AS4e00, which uses variable block sizes, and you have to write a script that reads those huge blocks from no-rewind device and catenates them to something sane)
# file xx
will give you the file type, but others already said so.
# dd if=xx ibs=512 | tar tvf -
If you do this over a network interface, double buffering might help
# remsh host dd if=/dev/rmt/0m ibs=102400 | dd | dd >xx
A last tip, use GNU tar. It's quite a bit more capable in recovering different tapes and block sizes, and supports command line options to pass any block size you want
GNU tar is also available on my ITRC site:
Singapore https://www.beepz.com/personal/merijn/
Rotterdam http://www.cmve.net/~merijn/
Seattle http://ww.hpux.ws/merijn/
Enjoy. Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2004 01:15 AM
02-10-2004 01:15 AM
Re: finding out how a tape has been written.
Do I call you Mr Procura??
I have now tried your suggestions and for ls -l xx I get "11958272" and for file x I get "ascii text"
when I try the next command I get the same message as above,so will now have to try and use your GNU tar
I'm not giving up yet!!
malvin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2004 01:25 AM
02-10-2004 01:25 AM
SolutionDoes that ring a bell?
Ahh, no, *I* missed one argument.
# dd if=/dev/rmt/0m of=yy ibs=1024000 count=1
# ls -l yy
Pfeew, much better.
Could you show us the output of
# od -x xx | head
You can call me Merijn
FWIW, you have just read the complete tape to the file xx, so you can now use that as device :)
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2004 01:36 AM
02-10-2004 01:36 AM
Re: finding out how a tape has been written.
malvin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2004 01:46 AM
02-10-2004 01:46 AM
Re: finding out how a tape has been written.
--8<---
MEDIA_NO 1
RADAN 1.000000
23583 ring.att
#DAT_LEL:6
0........
-->8---
Is this converted from a real tape? Those had a ring in it that you can pull out to make it write protected.
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2004 01:51 AM
02-10-2004 01:51 AM
Re: finding out how a tape has been written.
I think that I have got to really press the customer to come up with the answer as to how the tape was originally created on the SCO box, but I think he is just a "tape changer" rather than a technical person
Thanks again,
may open this again in a few more days when I can extract this information from him
cheers
malvin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2004 05:02 AM
02-10-2004 05:02 AM
Re: finding out how a tape has been written.
Bill Hassell, sysadmin