Now I am going to add a script as a resource to an existing cluster.
Sample Script:
[root@node1 oracle]# cat script.shout
Sat Mar 15 10:01:17 EDT 2014 on node1.cluster.com
[root@node1 oracle]# cat script.sh
#!/bin/ksh
while true
do
echo "`date` on `hostname`" >> ${0}out
sleep 4
done
[root@node1 oracle]#
Sample Script:
[root@node1 oracle]# cat script.shout
Sat Mar 15 10:01:17 EDT 2014 on node1.cluster.com
[root@node1 oracle]# cat script.sh
#!/bin/ksh
while true
do
echo "`date` on `hostname`" >> ${0}out
sleep 4
done
[root@node1 oracle]#
Creating a Process Resource:
[root@node1 oracle]# hares -add oracle_process Process oracle_sg
VCS NOTICE V-16-1-10242 Resource added. Enabled attribute must be set before agent monitors
[root@node1 ~]# hares -modify oracle_process Critical 1
[root@node1 ~]# hares -modify oracle_process UserName root
[root@node1 ~]# hares -modify oracle_process PathName /oracle/script.sh
[root@node1 ~]# hares -modify oracle_process Enabled 1
[root@node1 ~]# hares -link oracle_process oracle_ip