Operating System - HP-UX
1844530 Members
3094 Online
110233 Solutions
New Discussion

Re: How to view/erase data from the tape

 

How to view/erase data from the tape

I have a 24GB data cartridge ( tape) I used to ( make _tap recovery). I would like to know is there a way I can check the tape and make sure there is data. another thing how can I erase this tape. I don't have any backup applications like "Omini backup" or anything like that, on my server.

Thank You

Raghu
no personal quote
15 REPLIES 15
David Lodge
Trusted Contributor

Re: How to view/erase data from the tape

Ignite writes data in tar format so iirc you should just be able to do a
tar tfv /dev/rmt/1m

To check whether there is data on a tape anyway, your old friend is od:
od -c /dev/rmt/1m | more

To trash a tape there are several good ways:
1) Bulk eraser
2) Physically destroy the tape
3) Use dd to write rubbish to the tape, eg:
dd if=/stand/vmunix of=/dev/rmt/1m

dave
harry d brown jr
Honored Contributor

Re: How to view/erase data from the tape

You can test your recovery tape by using check_recovery.

TO erase a tape, you can write a program to write null's to the tape.

live free or die
harry
Live Free or Die
Steven Gillard_2
Honored Contributor

Re: How to view/erase data from the tape

To verify the contents of an Ignite tape:

# mt -t /dev/rmt/0mn fsf 1
(make sure you use the "no rewind" device file!)
# tar tvf /dev/rmt/0m

Why do you want to erase data from a tape? Generally its safe just to use it again, this will overwrite any data that was previously present.

Regards,
Steve
Helen French
Honored Contributor

Re: How to view/erase data from the tape

Hi Reghu,

If you want to read the tape you can use 'tar -tvf /dev/rmt/0m' command to read the tape. If you want to check the log files created by last make_recovery command, then read the files in /var/opt/ignite/logs. Also if you want to compare the last make_recovery with the current system status, use the command 'check_recovery' (this will be useful only if you have executed the make_recovery command with -C option).

For erasing a tape, you can just redirect the null character to the tape. Or see this:

http://forums.itrc.hp.com/cm/QuestionAnswer/0,,0xd741a22831ebd5118ff40090279cd0f9,00.html

HTH,
Shiju
Life is a promise, fulfill it!
harry d brown jr
Honored Contributor

Re: How to view/erase data from the tape

Raghu,

You can also erase a tape by using mediainit.

live free or die
harry
Live Free or Die
Darrell Allen
Honored Contributor

Re: How to view/erase data from the tape

Hi Raghu,

There are 2 "files" written on a make_tape_recovery tape. The first "file" is a boot image. The second file is a tarfile written by the pax utility. You can use pax or tar to see what is in that second file on the tape:

mt -t /dev/rmt/0m rewind
mt -t /dev/rmt/0mn fsf 1
tar tvf /dev/rmt/0m

If you need to physically erase the data then use a bulk eraser or overwrite the tape completely with zeros or other garbage (dd if=/dev/zero of=/dev/rmt/0m).

You can find a number of threads by searching the itrc. My favorite search is at http://www.google.com/advanced_search. Be sure to limit the domain to itrc.hp.com.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Patrick Wallek
Honored Contributor

Re: How to view/erase data from the tape

No you can NOT check the status of a make_recovery tape with check_recovery. That is NOT the purpose of check_recovery.

From the man page for check_recovery:

"check_recovery compares the current state of the system to the System Recovery status file (created by the last invocation of make_recovery) to determine if a new System Recovery Tape needs to be created. Only
Core OS and User Core OS files are validated. Refer to make_recovery for an explanation of these terms."

"check_recovery displays all discrepancies found between the current system and the status file to stderr. Based on these, the System
Administrator can then make a determination as to whether a new System Recovery Tape needs to be created."

check_recovery is only valid is you use make_recovery with the -C option.

Others have given you the instructions to see data on your make_recovery tape.

To erase data on the tape, just reuse the tape. Once you reuse the tape, the make_recovery image will no longer be accessable.

Re: How to view/erase data from the tape

I am confused now. My problem is I installed a Sue Store Disk system on my HP 9000 K-class server. With 4 16 GB HD on it . My server only had total of 25GB HD space with one volume Group ??? vg00( 2X8 GB and 2X4 GB). When I talk to Hp regarding to convert the file system so I will be able to us the new HD. They advised me to create a recovery tape using Ignite. Then I can boot the system from the recovery tape and I will be able to configure my new HD as the primary boot device and will be able to add all the 8 HD s ( the new 4HDs amd the old 4HDs) to one volume group ???vg00??? . When I create the recovery tape and tried to boot the system from the tape, I am getting this message???


boot P2

Intract with IPL ( Y, N, or Cancel)?> n

Booting ....
Boot IO Dependent Code (IODC) rvision 1

HARD Booted.

ISL Revision A.00.43 Apr 12, 2000

ISL booting hpux (;0):INSTALL

Boot

: tape (0/5/0/0.6.0.0.0.0.0;0):winstall
tape (0/5/0/0.6.0.0.0.0.0;0):winstall cannot open, or not executable
Exec failed: No such file or directory

I don???t know what is the problem is. I also would like to know what are the right option I need to use. Like C or c , v ,I, I check the man page but that is too confusing. Could some one give me the right option I must use ??? make _tape _recovery -c C v I ??? what is the right one
no personal quote
Magdi KAMAL
Respected Contributor

Re: How to view/erase data from the tape

Hi Raghuram,

You seem as you had ommited the "no rewind" device file from your make_recovery !

Boot again on disk and issue the following command :

# make_recovery -A -d /dev/rmt/0mn

Attention to the last character "n" in the device file name. This will put first the lif area in the begining of the tape followed by the entire vg00 files ( this is option -A in the command ) which are /etc, /sbin, /usr and so on ...

Magdi
Patrick Wallek
Honored Contributor

Re: How to view/erase data from the tape

If you want to use make_tape_recovery instead, which I recommend, here is the command I use:

/opt/ignite/bin/make_tape_recovery -a /dev/rmt/0mn -I -v -x inc_entire=vg00
Wodisch
Honored Contributor

Re: How to view/erase data from the tape

Hello Raghu,

it seems your tape is bad (not the drive).
Usually it is safer to create two "ignite-tapes", before doing something destructive...
So, after having created that tape, I would take it to another driver (even system), and try to read it over there:

mt -t /dev/rmt/0mn rewind # just to be ceratin
mt -t /dev/rmt/0mn fsf 1 # skip the boot header
tar tvf /dev/rmt/0m # read the depot from tape

Does it show *ALL* the files which where backed up?
Any errors?

HTH,
Wodisch
T. M. Louah
Esteemed Contributor

Re: How to view/erase data from the tape

If you are confused try make_tape_recovery interactively. This is from make_tape_recovery man pages:
-i Causes make_tape_recovery to run interactively to allow you
to select which files and directories are to be included in
the recovery archive. The options -x , -A and -f are not
allowed with -i. It is preferable to use the ignite GUI menu
command on the Ignite-UX server when running an interactive
make_tape_recovery session. Running it from ignite causes
any additional server configuration of NFS mounts to be
performed. It also provides a better progress report and an
easier to use interface.
Little learning is dangerous!
T. M. Louah
Esteemed Contributor

Re: How to view/erase data from the tape

sorry -->
..try # make_tape_recovery -i

To list all tape content:
.. pax -rv -f /dev/rmt/0m

g'd luck
t++
Little learning is dangerous!
Darrell Allen
Honored Contributor

Re: How to view/erase data from the tape

Look at this thread:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x2196663ce855d511abcd0090277a778c,00.html
Notice Tim Fulford's method for checking the contents of the boot image on the tape.

If you see WINSTALL then try interacting with IPL and specifying:
hpux (;0):WINSTALL

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Helen French
Honored Contributor

Re: How to view/erase data from the tape

Hi Reghu,

I would suggest to do this:

# make_recovery -A -C -d /dev/rmt/0mn

-A will backup the entire root volume group.

HTH,
Shiju
Life is a promise, fulfill it!