Operating System - HP-UX
1833813 Members
2810 Online
110063 Solutions
New Discussion

Re: Strange problem with make_tape_recovery command abd tape device

 
Sagar Sirdesai
Trusted Contributor

Strange problem with make_tape_recovery command abd tape device

Hi All
I have rp440 Server with Hp_UX 11i Installed.
Recently I am Facing a Problem .
I am a taking a Ignite Backup by using make_tape_recovery ..as below

/opt/ignite/bin/make_tape_recovery -A -v -a /dev/rmt/c3t3d0BESTn

This command is succesful from Command Line.

But when I schedule the same command from the crontab as
0 21 * * 3 /opt/ignite/bin/make_tape_recovery -A -v -a /dev/rmt/c3t3d0BESTn

The command fails with following error..
hppi005:/var/opt/ignite/recovery/latest >tail -10 recovery.log
System Recovery Archive

* Checking Versions of Ignite-UX filesets
ERROR: Failed to open tape device /dev/rmt/c3t3d0BESTn:Device busy (errno =
16).
ERROR: Check tape device failed.


======= 07/20/05 21:00:06 IST make_tape_recovery completed unsuccessfully


I am confused how command works fine from the CLI and fails from the crontab ..

There is no problem in the hardware or in the tape because the make_tape_recovery works fine from CLI with the same tape drive and tape.

Please suggest

Regards

Sagar
5 REPLIES 5
Devender Khatana
Honored Contributor

Re: Strange problem with make_tape_recovery command abd tape device

Hi,

The error indicated that the tape drive was busy. Was there any other backup going on at the same time.

Another thing I would suggest is to redirect output of the command to a file & even stderror to a file. Your crontab entry then should look something like this.

#make_tape_recovery -A -v -a /dev/rmt/c3t3d0BESTn 2>&1 filename

HTH,
Devender
Impossible itself mentions "I m possible"
Bill Costigan
Honored Contributor

Re: Strange problem with make_tape_recovery command abd tape device

Was the this the first time the tape drive was used after it was powered on.

I've seen make_recovery fail and then work.

e.g.

1. power on tape drive.
2. Load tape (wait for lights on drive to show it's ready)
3. run make_tape_recovery.
It Fails
4. run make_tape_recovery
It works

I assumed there was something not initialize until I tried to access the tape the first time.

Why not put the make_tape_recovery in a script with some mt commands that rewind the tape first. Have the script make sure the rewinds work and then issue the make_tape_recovery command.

You can schedule the script through cron.
Bill Hassell
Honored Contributor

Re: Strange problem with make_tape_recovery command abd tape device

I would never put a tape backup command in cron without supporting script commands. The first thing you learn as a sysadmin is that you can never assume anything is working correctly. Your script would start by verifying that the tape device file is really a tape drive. Then (using the mt command) check that there is a tape installed, and that the tape is not write-protected. At every step, test for failure. It is impossible to troubleshoot the failure you're seeing without all these tests. And finally, your script must eject the tape (mt offline) to prevent someone else destroying your backup.


Bill Hassell, sysadmin
Sagar Sirdesai
Trusted Contributor

Re: Strange problem with make_tape_recovery command abd tape device

Hi All

Thanks for your answers.
I will definately Write a script for backup..


Devender : I checked there was no backup running at that point.

Also the Fact that the same command works from CLI means the tape drive ,tape everything is ok ..

To Add more

When I schedule the ignite bacup in crontab
But If I use the tape /dev/rmt/0mn.
The crontab works ....

Is there any difference between /dev/rmt/0mn
and /dev/rmt/c3t3d0BESTn

Thanks Again

Regards
Sagar
Sagar Sirdesai
Trusted Contributor

Re: Strange problem with make_tape_recovery command abd tape device

Hi
This solution gave me an idea to diagnose tape_drive problems