HP OSMS Blueprint: Database Server on HP Server Platforms with MySQL and RHEL5

MySQL High Availability Using HP Serviceguard
Introduction to HP Serviceguard and MySQL Toolkit
HP Serviceguard is specialized software for protecting mission-critical applications from a wide
variety of hardware and software failures.
The MySQL toolkit for HP Serviceguard consists of a set of shell scripts used by a package control
script to start, stop, and monitor the MySQL server package. The toolkit simplifies the effort of
making MySQL highly available by integrating MySQL with HP Serviceguard for Linux (SG/LX).
In an SG/LX environment, MySQL must have the same configuration on all cluster nodes that
are configured to run the package. The node currently running the package is called the primary
node. All other nodes are called standby nodes. In the event of a failure on the primary node,
the package fails over to a standby node and the database continues to function. To ensure that
the database can failover properly, all data must be stored on shared storage, and this storage
must be accessible to all nodes configured to run the package.
When the package fails over from one node to another, the following actions occur:
On the primary node:
— The package is halted on the node where it is currently running. As a result, all package
resources are halted.
— The relocatable IP address is removed from this node.
— The file systems are unmounted and all volume groups assigned to this package are
deactivated.
— The systems are going to halt when the storage or networks fail.
On the standby node:
— The volume groups are activated and file systems are mounted.
— The relocatable IP address is moved to the new node.
— All resources are started up, and the database is displayed.
— The clients connect through the same relocatable IP address.
Testing Assumptions
The MySQL toolkit README file describes how to test the High Availability with the MySQL
Toolkit in an SG/LX environment. The file is located in the
/usr/local/cmcluster/mysqltoolkit/ directory. Make sure that you are already familiar
with the HP Serviceguard configuration and with MySQL server concepts. Additionally, verify
that the following installation and configuration procedures have been completed:
You have set up two or more Linux systems, all connected to the appropriate external
hardware for a shared data drive. These systems act as the MySQL Serviceguard cluster
used in the following test example. For example, these may be two or more HP ProLiant or
Integrity servers.
You have set up an additional server to test the MySQL Serviceguard cluster. This server
has the MySQL database installed, as well as the MySQL bench testing tool, also called
sql-bench.
You have set up a shared storage system, such as an HP StorageWorks MSA 1000, MSA
1500, EVA3000, or EVA 4000 system, and this shared storage is located in the /dev/sdx
directory on each server. For this example, the directory /dev/sdb is used on both servers.
You have set up the lock logical unit number (LUN) and logical volumes (LV) on the external
shared storage using the following specifications:
Cluster_Lock_LUN:
DEVICE Name /dev/sdx1
Size 10MB
MySQL High Availability Using HP Serviceguard 23