System Administration
Showing results for 
Search instead for 
Did you mean: 

Re: make_tape_recovery failse

Go to solution
Regular Advisor

make_tape_recovery failse


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.
Honored Contributor

Re: make_tape_recovery failse


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

case $STATUS in
0) echo "make_tape_recovery Ok"
/usr/bin/mt -f $DEVICE offline
*) echo "make_tape_recovery ERROR"
cat /var/opt/ignite/recovery/latest/recovery.log
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.


"I'm not dumb. I just have a command of thoroughly useless information."
Honored Contributor

Re: make_tape_recovery failse


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.

If you can spell SysAdmin then you is one - anon
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.
Regular Advisor

Re: make_tape_recovery failse


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.
Regular Advisor

Re: make_tape_recovery failse

Thanks all of you..

It seems that I need to upgrade ingite-UX.