Download MySQL Utilities - Oracle Documentation

Transcript
Target Configuration
Note
Pacemaker, Corosync, and DRBD are not include with MySQL Fabric and need to
be installed separately for the target platform.
If Virtual Machines are used, make sure they run in different physical servers to avoid a single point of
failure. If possible, also make the network connectivity redundant.
8.6.3 Target Configuration
The two physical hosts are host1.localdomain (192.168.1.101) and host2.localdomain
(192.168.1.102). It is recommended that you do not rely on an external DNS service (as that is an
additional point of failure) and so these mappings should be configured on each host in the /etc/hosts
file.
A single Virtual IP (VIP) is shown in the figure (192.168.1.200) and this is the address that the
application will connect to when accessing the MySQL Fabric. Pacemaker will be responsible for migrating
this between the two hosts.
One of the final steps in configuring Pacemaker is to add network connectivity monitoring in order to
attempt to have an isolated host stop its MySQL services to avoid a split-brain scenario. This is achieved
by having each host ping an external (not one part of the cluster) IP addresses - in this case the network
router (192.168.1.1).
All the necessary software (i.e. binaries) must be installed in a regular partition, independent on each
node. MySQL socket (mysql.sock) and process-id (mysql.pid) files are stored in a regular partition as
well. The MySQL Server configuration file (my.cnf), the database files (data/*) and the MySQL Fabric
configuration file (fabric.cfg) are stored in a DRBD controlled file system that at any point in time is only
available on one of the two hosts.
Figure 8.1 MySQL Fabric Setup using DRBD and Pacemaker
246