HP OSMS Blueprint: HP Manageability Value-Add Software for Open Source Middleware Stacks
Testing Cluster Failover
You can simulate some of the following cases, which cause primary-node failure, to verify the
MySQL Serviceguard cluster failover function.
CAUTION: You should perform the following tests with sample data before trying the tests
with critical production data. In the event of a serious failure or the wrong configuration, data
corruption can result.
• End the primary node's MySQL processes.
• Pull the power cable out on the primary node to cause a power failure.
• Pull the network cable out on the primary node to cause the loss of a network.
• Issue the power off and reboot commands on the primary node.
• End all SG/LX processes on the primary node.
In the event of a failure on the primary node, the package automatically fails over to the standby
node and the database continues to function. Thus, the database fails over successfully.
You can verify that the database continues to function by accessing the MySQL database service
when the primary node fails.
Backing Up Your MySQL Using HP Data Protector
A database backup strategy is a critical part of any database installation. The MySQL database
backup strategy is a two-part process of first extracting data from the database and then using
a backup tool to store the data to backup media, such as tape media or network storage.
MySQL and other vendors provide data extraction tools, which capture and store the data from
the database. Each storage engine in MySQL has unique characteristics that impact backup, so
backup solutions tend to be as custom as a database configuration.
As a mature backup and recovery tool, HP Data Protector manages backup and recovery from
both disks and tapes. It automates high performance backup and recovery, from disk or tape
over unlimited distances, to ensure 24/7 business continuity and seamless integration with HP
storage hardware and management solutions.
This section provides an example of implementing a backup strategy for a MySQL database
installation using HP OpenView Storage Data Protector (Data Protector). If you are currently
using a different backup tool, you can proceed with the general steps that are outlined in the
backup strategy that follows.
MySQL Replication
The MySQL replication feature allows the database on one server to be precisely duplicated on
one or more other servers. This capability is enabled through an asynchronous master/slave
relationship. Each slave server starts out with an exact copy of the data held on the master server.
The master server publishes a binary log to the slave servers of all changes made to the data in
the database. The slave servers read changes to the binary logs that have occurred since the last
successful update. In this way, the slave servers are able to update their copies of the database.
All changes to the database must be made to the master server, but clients may access data for
reading through either the master server or any slave server. The following figure depicts the
replication configuration.
20