lcdrecover -g {remove|restore|delete} — [arg1 arg2 … argn] | -G {remote|restore|delete} — [arg1 arg2 … argn] | -p primarytest | [-o resource]
The -g option takes one of three arguments, remove, restore, or delete. This option will run the preglobal scripts for the specified argument. The preglobal scripts are registered by applications to run before certain events. For example, with the restore argument, this option runs the prerestore script registered by LifeKeeper, then any prerestore scripts registered by all of the applications. Normally, perform_action [see LRACI-perform_action automatically performs the prerestore scripts, except when the -G option is specified to perform_action.
The -G option of perform_action allows multiple perform_action commands to be run, with the preglobal scripts running only once before the first perform_action execution using lcdrecover -g restore. An application may register a preglobal script by installing the script at the path:
%LKROOT%\ subsys\ <appname>\actions\prerestore.ksh
arg1, arg2, … argn are arguments that will be passed to the preglobal scripts when they are executed.
Similar scripts (preremove) exist for the remove argument. They can be run before a perform_action -G -a remove is run. They are run when lcdrecover -g remove is executed.
The predelete scripts are similar, but they are run before the ins_remove -G … [see LCDI-instance program is run, unless -G for ins_remove is left out.
The -G option for lcdrecover is analogous to -g, except that it specifies that the postglobal scripts should be run. The -G option should not be used without running an earlier lcdrecover -g arg, and it should be run after all of the perform_action or ins_remove programs are run. If you are executing the -G option within a getlocks protected region (after getlocks and before rlslocks), set arg1 to -m to avoid executing a second instance of getlocks, which would cause the operation to hang.
The following example runs multiple perform_action commands where the preglobal and postglobal scripts run only once:
lcdrecover -g restore
# run “preglobal” restore scripts
perform_action -G -a restore -t tagname
# neither scripts are run
perform_action -G -a restore -t tagname2
# neither scripts are run
lcdrecover -G restore — -m
# run “postglobal” restore scripts
# use -m arg when in getlocks protected region of code
This example runs multiple prerestore and postrestore scripts:
perform_action -a restore -t tagname
# all scripts once
perform_action -a restore -t tagname2
# all scripts again
The -p option for lcdrecover is used to determine if a particular resource is on a resource hierarchy that is on the primary system or the secondary system. Specify the resource tag name with primary test, and it will print out to standard output the string primary if the resource is on the primary hierarchy, or secondary if it is not.
The -o option can be used to retrieve the remote system associated with the resource tag specified.
このトピックへフィードバック