Operating System - HP-UX
1753481 Members
4429 Online
108794 Solutions
New Discussion юеВ

Re: make_recovery fails in cron job

 
SOLVED
Go to solution
Ngoh Chean Siung
Super Advisor

make_recovery fails in cron job

Hi,

I try to run make_recovery in cron job but it fails. After I go through the log, the message is

> CMD: make_recovery -A -C -d /dev/rmt/1m
> root 275 c Thu May 13 17:35:00 MAL 2004
< root 275 c Thu May 13 17:35:00 MAL 2004 rc=127

1) Is it possible to run make_possible in cron job? If yes, how to do it? I am using this command -> make_recovery -A -C -d /dev/rmt/1m

2) What is rc=127 stands for? What I know is figure 1 and 2 mean error. How to go through the details such as rc=127 to find out what is the actual main cause for a cronjob fails?

regards.

4 REPLIES 4
Mobeen_1
Esteemed Contributor

Re: make_recovery fails in cron job

Ngoh,
Yes you should be able to run make_recovery from the cron without any issues. There are no issues in doing this.

How ever please make sure that when you put this in the cron, this make_recovery is run from an account like root or any other super user account that has read on all the file systems and files there in.

As for the error rc=127, i think it probably means that the shell is unable to find the script or binary named (in this case submitted via your cron).

I would suggest that you edit the script and have " set -x" in the first line so that you could see in detail.

Regards
Mobeen
Robert-Jan Goossens
Honored Contributor
Solution

Re: make_recovery fails in cron job

Hi,

00 18 * * * /opt/ignite/bin/make_tape_recovery

Add the path to the make_tape_recovery to your job in the crontab.

Make_recovery is an outdated command you should upgrade your ignite software.

http://www.software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=IGNITEUXB

Hope this helps,
Robert-Jan
Michael Tully
Honored Contributor

Re: make_recovery fails in cron job

cron is pretty dumb. It has no idea about paths, so you must either place the full path into your crontab file, or in a script, which is the best method.

a cron error code of 127 means this, but could also be interpreted as a failed path statement from the shell.
rc=127 can't fork (this might also be return code from the shell)

As suggested, you should update your ignite version. Here is an example we always use.

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

(You must use a non-rewindable device.)
Anyone for a Mutiny ?
Kelsey Petrychyn
Occasional Advisor

Re: make_recovery fails in cron job

Yes, It is possible to do a make_recovery through cron - we do.

I would have to agree with the masses. Use the explicit path to your make_recovery script.

And (of course) make sure there is a tape in the drive - that is not write protected. Also, make sure that

/dev/rmt/1m

is the correct device file. Do an

ioscan -fnkC tape

to confirm this.