NAME
lk_chg_value.ksh —- changes specified values in local LifeKeeper configuration database files
SYNOPSIS
lk_chg_value.ksh {-o old_value -n new_value | -f filename} [-vFIMT]
DESCRIPTION
This command is to be used to modify arbitrary values in local LifeKeeper configuration database files (e.g. LifeKeeper uname, communication path addresses, resource tag names, etc.). lk_chg_value.ksh needs to be run locally with the Administrator login on each machine within a LifeKeeper configuration while LifeKeeper is not running. Also, you must use the LifeKeeper provided shell (sh.exe) to invoke the script as shown above. This command does not modify the system’s uname or network interfaces. If the LifeKeeper uname or communication path addresses are to be modified, the system uname and network interfaces must be modified prior to the execution of this command using system utilities. In order for LifeKeeper to be properly updated, this command must be run on every system in the cluster.
The values to be modified may be specified on the command line using the -o and -n options or in a file using the -f option. The syntax of a file containing substitutions is old_value_=_new_value, with one substitution per line (lines not in this form are ignored).
To see the changes lk_chg_value.ksh will make without modifying any LifeKeeper files, use the -M option. To see the files lk_chg_value.ksh is examining, use -v. To not modify tag names, use the -T option. To not modify resource ids, use the -I option.
Because a resource id may contain structured information, lk_chg_value.ksh does not allow substitutions that completely replace the id field. To override this behavior, use the -F option.
EXAMPLES
Systems A, B, and C have been configured in a LifeKeeper configuration. Systems A and B manage a database resource and system A also manages a communication resource with System C. To modify the uname and comm path address of System A with comm path old address, the following must be performed:
- Stop LifeKeeper by executing the lkstop command on each affected system. However, if the resources being managed are to stay available to the user community, execute lkstop -f.
- Change System A’s uname to X and change the network address to new_address. Create a substitutions file, /tmp/lksubs, containing the substitution pairs:
A=X old_address=new_address
As Administrator, login to System A and execute the following:
set LKROOT=<LKROOT> (i.e. set LKROOT=C:\LK)
<LKROOT>\bin\sh.exe lk_chg_value.ksh -vf /tmp/lksubs
This changes all local occurrences of A and old_address found within the LifeKeeper core and recovery kits on System A, which is now identified by System X, to refer to X and new_address, respectively.
- Copy the substitutions file from System A to Systems B and C. As Administrator, login to Systems B and C and execute the following:
set LKROOT=<LKROOT> (i.e. set LKROOT=C:\LK)
<LKROOT>\bin\sh.exe lk_chg_value.ksh -vf /tmp/lksubs
This changes all occurrences of A and old_address found within the LifeKeeper configuration database on Systems B and C to refer to X and new_address, respectively.
EXIT CODES
0 | Execution of command completed successfully. |
1 | Interrupt occurred… files restored. |
2 | Invalid arguments passed to command. |
3 | LifeKeeper processes are still running. |
4 | Command needs to be executed by an Administrator login. |
5 | ID field change attempted. Resource ID cannot be changed without using -I option. |
6 | LKROOT environment variable not set. |
7 | No matches were found. |
NOTES
The lk_chg_value.ksh utility is located in the <LKROOT>\bin folder.
The lk_chg_value.ksh utility is case sensitive.
As shown above you must use the LifeKeeper provided shell (sh.exe) to invoke the lk_chg_value.ksh script.
<LKROOT> refers to the LifeKeeper home directory. The default home directory is C:\LK, but this can be modified during LifeKeeper installation.
FILES
<LKROOT>\bin\lk_chg_value.ksh
Post your comment on this topic.