Operating System - HP-UX
1753485 Members
4518 Online
108794 Solutions
New Discussion юеВ

Re: make_tape_recovery failse

 
SOLVED
Go to solution
Co van Berkel
Regular Advisor

make_tape_recovery failse

Hi,

System HP9000/800 L2000 and OS HP-UX 11.0.

When we execute "make_tape_recovery ${var}" out of a script, using "#!/usr/bin/ksh" as fist line.
- var=" -AIv -a /dev/rmt/0mn "

Than we get the following error message:
ERROR: Tape destination ^P is not found on the system.No such file or directory (errno = 2)
ERROR: Check tape device failed.

When we run this script using "#!/usr/bin/sh" as the first line al goes well?

We installed last friday a lot of patches on two of oure five servers. On those two servers this problem occurs and not on the three other servers.
I think that "/usr/bin/ksh" is not changed becose de size and date are the same on all five servers.

ls -lad /usr/bin/ksh
-r-xr-xr-x 2 root bin 172032 Sep 16 2002 /usr/bin/ksh

See the attached file with a script and the error messages we get.

- Is it better to use ksh or sh for scripts ran by "root" or "admin-users"?
- Those make-tape_recovery need sh?

Regards Co.
6 REPLIES 6
Jose Mosquera
Honored Contributor
Solution

Re: make_tape_recovery failse

Hi,

Try this:

OPTIONS="-x inc_entire=vg00 -I -v"
DEVICE=`grep tape_destination /var/opt/ignite/recovery/previews|awk -F= '{ print $2 }'`
/usr/bin/mt -f ${DEVICE} rew
/usr/bin/mt -f ${DEVICE} status

/opt/ignite/bin/make_tape_recovery ${OPTIONS} 2>&1
STATUS=$?

case $STATUS in
0) echo "make_tape_recovery Ok"
/usr/bin/mt -f $DEVICE offline
;;
*) echo "make_tape_recovery ERROR"
;;
esac
cat /var/opt/ignite/recovery/latest/recovery.log
Dave La Mar
Honored Contributor

Re: make_tape_recovery failse

Co -
Not sure your vairables are getting set correctly.
Below is the command we use, any variables have been edited for true values.

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

Best of luck.

Regards,

dl
"I'm not dumb. I just have a command of thoroughly useless information."
Paula J Frazer-Campbell
Honored Contributor

Re: make_tape_recovery failse

Hi

Using /usr/bin/sh should cause no problems, check the patches that were installed and what they installed.

"mt -f " Always use the full path to commands in scripts.


Paula
If you can spell SysAdmin then you is one - anon
Co van Berkel
Regular Advisor

Re: make_tape_recovery failse

Hi Paula,

The attached script was a extraction of the origenal. Normal I use a full-path for every command.
Thanks for your reaction about "/usr/bin/sh".

It looks like it works with "/usr/bin/sh".
But still I don't understand why it don't work with "ksh".

Greetings Co.
Co van Berkel
Regular Advisor

Re: make_tape_recovery failse

Hi,

If I hardcode the "-a /dev/rmt/0mn" option and use "ksh" it also doesn't work!!

It looks to me that "make_tape_recovery" doesn't work anymore in "ksh".

I will check all patches.

Greetings Co.
Co van Berkel
Regular Advisor

Re: make_tape_recovery failse

Thanks all of you..

It seems that I need to upgrade ingite-UX.

Greetings,
Co