Operating System - HP-UX
1832867 Members
2937 Online
110048 Solutions
New Discussion

Re: How do I check the contents list on tape?

 
SOLVED
Go to solution
Peston Foong
Advisor

How do I check the contents list on tape?

Dear all,

All your input would be appreciated.

After my done the make_recovery -Av -d /dev/rmt/0m. And then now, I feel that I wanted to check the contents list of that tape. What are the HPUX command should be apply.

I want to view the content list of that tape NOT extract the archive file back to system.

I known, mt -t /dev/rmt/ fsf 1 doest hlep much.

I used tar -tvf /dev/rmt/0m that given error was Block size =4. What does it means?

Please help. Thank you in advance to all of your.


10 REPLIES 10
Vincenzo Restuccia
Honored Contributor

Re: How do I check the contents list on tape?

#mt -t /dev/rmt/0mn fsr 1
#tar tv (default is the DDS)
Carlos Fernandez Riera
Honored Contributor

Re: How do I check the contents list on tape?

The message Block size =4 tell you that tar files was wrote with this block size, so

tar -tvbf 4 /dev/rmt/0m.


HTH


unsupported
Insu Kim
Honored Contributor

Re: How do I check the contents list on tape?

Please put "-C' option together when you create a bootable backup.
It creates the system status file /var/opt/ignite/recovery/makerec.last.
This file reflects the current state of the system and contains the names and dates of the last modification on the tape.

This is also useful when the user plans to use "check_recovery" to determine if the system has been changed such that the system recovery tape needs to be created.

For instance,
# make_recovery -A -C -d /dev/rmt/0mn
# check_recovey
( check_recovery has no options. )

Hope this helps,
In-su,
Never say "no" first.
Valkiria Santos
Frequent Advisor

Re: How do I check the contents list on tape?

Hello,

You can check the tape contents with the pax command:
#pax -vf
Its necessary use the option "n" in device address for e.g ; /dev/rmt/0mn.
Execute pax command twice, in the first time you receive a message, ok continue then, in the second time you are receive the content from tape.
For use pax command its necessary the patch installed.
Peston Foong
Advisor

Re: How do I check the contents list on tape?

Hi, all. Thank you for all of your input.

But I still need you help to complete my desire. What I want is, after I had done the make_recovery -Av -d /dev/rmt/0m. How to I check the content list of that tape.

I tried to issue a command tar -tvbf 4 /dev/rmt/0m. It given error like "directory checksum error"

And I tried to issue a command pax -vf /dev/rmt/0m/ also given an error like " This doesn't look like a tar archive skipping to the next file"

How to chack the content list of that tape that I had done make_recovery -Av -d /dev/rmt/0m

Thank you for all of yours input.

Insu Kim
Honored Contributor

Re: How do I check the contents list on tape?

Hi!

This is the way that I verified and you have to use "no rewind option" when you create bootable tape.

# make_recovery -A -v -d /dev/rmt/0mn
# mt -t /dev/rmt/1mn rew
# mt -t /dev/rmt/1mn fsf 1
( Noice that "1mn" is always used in every case )

# tar tvf /dev/rmt/1m

Good lunk!
Never say "no" first.
Carlos Fernandez Riera
Honored Contributor

Re: How do I check the contents list on tape?

mt -t /dev/rmt/0mn rew # rewind tape

dd if=/dev/rmt/0mn of=/tmp/tape.1 bs=2k count=100 #extract few blocks of LIF AREA

dd if=/dev/rmt/0mn of=/tmp/tape.1 bs=10k count=100 # extract few blocks of DATA


file /tmp/tape.1 /tmp/tape.2 # see what type of file
lifls /tmp/tape.1 # LIF AREA IS NOT COMPLETE,

uncompress /tmp/tape.2 | tar tvf - # IRW data is tar'd and compressed.

Now try from tape directly.

Regards.





unsupported
Peston Foong
Advisor

Re: How do I check the contents list on tape?

Hi,

I have a bit confuse about your said for the /dev/rmt/0mn, /dev/rmt/1mn and /dev/rmt/0m. What are the differences between them.

But I know that I always to used /dev/rmt/0m and not others name. Please clarify. Thanks
Patrick Wallek
Honored Contributor
Solution

Re: How do I check the contents list on tape?

You should ALWAYS use the no-rewind tape device when doing a make_recovery or make_tape_recovery. If you look at the man page for either command it says specifically to use the no-rewind device, which would be 0mn in your case.

The numbers in the device file are the tape drive instances. If you have multiple devices on your system, then 1 will be numbered 0m, the next will be 1m and so on.

In your case, it looks like you are using the 0 device, so you should be using the /dev/rmt/0mn device file.

Once your make_recovery tape has been created, do the following:

mt -t /dev/rmt/0mn rew ------ This rewinds the tape.

mt -t /dev/rmt/0mn fsf 1 ------ This fast forward past to boot area on the tape

tar -tvf /dev/rmt/0mn ------- This will show you what has been written to the tape. If you want the output to go to a file you can do 'tar -tvf /dev/rmt/0mn > /tmp/make_recovery_contents'

I would not use the -C option to make_recovery as someone suggested as it is scheduled to go away in a future release, at least that is what I have heard.
Valkiria Santos
Frequent Advisor

Re: How do I check the contents list on tape?

And I tried to issue a command pax -vf /dev/rmt/0m/ also given an error like " This doesn't look like a tar archive skipping to the next file"
**************************************
Hi guy,

About your text , its necessary execute:
#pax -vf /dev/rmt/0mn .
Once you receive the same message: This doesn't look like a tar archive skipping to the next file.
and twice you can see the tape contents.
Good Luck,
Valkiria