Scalable Database Server, HiRDB Version 8 System Operation Guide
Define the action details of the agents shown in Table 25-20.
Table 25-20 Agent action definition items and file names
| Agent action | HiRDB type | Script file name |
|---|---|---|
| Bringing a resource online | HiRDB/Single Server | /opt/VRTSvcs/bin/HiRDB_S/online |
| HiRDB/Parallel Server | /opt/VRTSvcs/bin/HiRDB_P/online | |
| Taking a resource offline | HiRDB/Single Server | /opt/VRTSvcs/bin/HiRDB_S/offline |
| HiRDB/Parallel Server | /opt/VRTSvcs/bin/HiRDB_P/offline | |
| Monitoring a resource | HiRDB/Single Server | /opt/VRTSvcs/bin/HiRDB_S/monitor |
| HiRDB/Parallel Server | /opt/VRTSvcs/bin/HiRDB_P/monitor |
An online script explains the details of the processing to be performed when an agent brings a resource online. The following processing is required:
The following is an example of an online script for a HiRDB/Single Server:
#!/bin/sh PATH=/sbin:/usr/bin:/usr/sbin:/etc:/bin:/opt/VRTSvcs/bin:"$2"/bin export PATH PDDIR="$2" PDCONFPATH="$3" LD_LIBRARY_PATH="$4" export PDDIR PDCONFPATH LD_LIBRARY_PATH $PDDIR/bin/pdstart /bin/touch "$5" /bin/chmod 0400 "$5" |
The following is an example of an online script for a HiRDB/Parallel Server:
#!/bin/sh PATH=/sbin:/usr/bin:/usr/sbin:/etc:/bin:/opt/VRTSvcs/bin:"$2"/bin export PATH PDDIR="$2" PDCONFPATH="$3" LD_LIBRARY_PATH="$4" export PDDIR PDCONFPATH LD_LIBRARY_PATH $PDDIR/bin/pdstart -q /bin/touch "$5" /bin/chmod 0400 "$5" |
An offline script explains the details of the processing to be performed when an agent takes a resource offline. The following processing is required:
Following is an example of an offline script for a HiRDB/Single Server:
#!/bin/sh PATH=/sbin:/usr/bin:/usr/sbin:/etc:/bin:/opt/VRTSvcs/bin:"$2"/bin export PATH PDDIR="$2" PDCONFPATH="$3" LD_LIBRARY_PATH="$4" export PDDIR PDCONFPATH LD_LIBRARY_PATH $PDDIR/bin/pdstop -f -q /bin/rm -f "$5" |
The following is an example of an offline script for a HiRDB/Parallel Server follows.
#!/bin/sh PATH=/sbin:/usr/bin:/usr/sbin:/etc:/bin:/opt/VRTSvcs/bin:"$2"/bin export PATH PDDIR="$2" PDCONFPATH="$3" LD_LIBRARY_PATH="$4" export PDDIR PDCONFPATH LD_LIBRARY_PATH $PDDIR/bin/pdstop -z -q /bin/rm -f "$5" |
A monitor script explains the details of the processing to be performed when an agent monitors a resource (for checking whether or not a resource is online). The following processing is required:
The following is an example of a monitor script:
#!/bin/sh
if /bin/test -f "$5"
then
exit 110
else
exit 100
fi
|
The values of the environment variables and dummy file path names, which will be needed in each script, can be transferred during script execution. For the arguments and return values to be transferred to each script, see the VERITAS Cluster Server manual.
All Rights Reserved. Copyright (C) 2007, Hitachi, Ltd.