RE: determine active or passive node

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since Cluster Services requires the init script to have a status
function, just use that in your scripts. I do this with a MySQL backup
script, like this:

/sbin/service mysqld status >/dev/null 2>/dev/null
if test $? -eq 0
then
   # run backup
else
   # MySQL is not running on this server at this time
   echo "MySQL not running on this node."
   exit 0
fi


--Jeff
SME - UNIX
OpSource Inc.

PGP Key ID 0x6CB364CA 

> -----Original Message-----
> I have a cluster (running a db2 service) due for production shortly.
> Certain service related cron jobs need to run only on the active node.
> I'd rather not reinvent the wheel.  Does anyone have any code 
> that checks if the current node is active?  Would you be 
> willing to share it in exchange for karma?

--
Linux-cluster mailing list
Linux-cluster@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cluster

[Index of Archives]     [Corosync Cluster Engine]     [GFS]     [Linux Virtualization]     [Centos Virtualization]     [Centos]     [Linux RAID]     [Fedora Users]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Camping]

  Powered by Linux