## Creating dsm resource 

To create a resource, you need a script that includes start, stop, and status commands. You also need a definition file. Create a resource for Data Server Manager as follows: 

On both the dsm-master and dsm-backup nodes, create a script with the name dsm . The script 1. includes the Tivoli SA MP definition of start, stop, and status, and aligns with Data Server Manager start, stop, and status scripts. Save the script in a directory, such as /etc/init.d/ , illustrated in this example. The directory highlighted in bold is the directory where Data Server Manager is installed (root authority might be needed). 

#!/bin/bash OPSTATE_ONLINE=1 OPSTATE_OFFLINE=2 Action=${1} case ${Action} in ..start) .. /root/ibm-datasrvrmgr/bin /start.sh >/dev/null 2>&1 ..logger -i -t "SAM-dsm" "Apache started" ..RC=0 ..;; ..stop) .. /root/ibm-datasrvrmgr/bin /stop.sh >/dev/null 2>&1 ..logger -i -t "SAM-dsm" "Apache stopped" ..RC=0 ..;; ..status) ..active=‘ /root/ibm-datasrvrmgr/bin /status.sh | grep " ACTIVE" | wc -l ‘ ..if [ "$active" -eq "1" ] ..then ..RC=${OPSTATE_ONLINE} ..else ..RC=${OPSTATE_OFFLINE} ..fi ..;; ..esac ..echo "RC:"${RC} ..exit $RC 

Figure 10 shows the content of the dsm  script. 

