![]() | Note |
---|---|
This section deals exclusively with setting up DRBD for Red Hat Cluster fail over clusters not involving GFS. For GFS (and GFS2) configurations, please see Chapter 11, Using GFS2 with DRBD. |
This section, like Chapter 8, Integrating DRBD with Pacemaker clusters, assumes you are about to configure a highly available MySQL database with the following configuration parameters:
mysql
, and it manages the device /dev/drbd0
.
/var/lib/mysql
(the default MySQL data directory).
To configure your highly available MySQL database, create or modify
your /etc/cluster/cluster.conf
file to contain the following
configuration items.
To do that, open /etc/cluster/cluster.conf
with your preferred text
editing application. Then, include the following items in your
resource configuration:
<rm> <resources /> <service autostart="1" name="mysql"> <drbd name="drbd-mysql" resource="mysql"> <fs device="/dev/drbd/by-res/mysql/0" mountpoint="/var/lib/mysql" fstype="ext3" name="mysql" options="noatime"/> </drbd> <ip address="10.9.9.180" monitor_link="1"/> <mysql config_file="/etc/my.cnf" listen_address="10.9.9.180" name="mysqld"/> </service> </rm>
![]() | Note |
---|---|
This example assumes a single-volume resource. |
Nesting resource references inside one another in <service/>
is the
Red Hat Cluster way of expressing resource dependencies.
Be sure to increment the config_version
attribute, found on the root
<cluster>
element, after you have completed your
configuration. Then, issue the following commands to commit your
changes to the running cluster configuration:
ccs_tool update /etc/cluster/cluster.conf cman_tool version -r <version>
In the second command, be sure to replace <version> with the new cluster configuration version number.
![]() | Note |
---|---|
Both the |
Thus, when you utilize the drbd
resource agent in cluster
configurations, it is not recommended to utilize
system-config-cluster
nor Conga for cluster configuration
purposes. Using either of these tools to only monitor the cluster’s
status, however, is expected to work fine.