/etc/ha.d/ha.cf
, as described in
the section called 「The ha.cf
file」.
/etc/ha.d/authkeys
, as described in
the section called 「The authkeys
file」.
/etc/ha.d/haresources
— the resource configuration file, described below.
bob drbddisk::mysql Filesystem::/dev/drbd0::/var/lib/mysql::ext3 \ 10.9.42.1 mysql
bob
. Consequentially, this resource group would be considered the
local resource group on host
bob
, whereas it would be the
foreign resource group on its peer host.
mysql
, which will be promoted to the primary role by the cluster manager (specifically, the
drbddisk
resource agent) on whichever node is currently the active node. Of course, a corresponding resource must exist and be configured in
/etc/drbd.conf
for this to work.
/dev/drbd0
, which contains an ext3 filesystem that is to be mounted at
/var/lib/mysql
(the default location for MySQL data files).
mysql
in order to start the MySQL daemon, which will then find its data files at
/var/lib/mysql
and be able to listen on the service IP address, 192.168.42.1.
haresources
file are always evaluated from left to right when resources are being started, and from right to left when they are being stopped.
![]() |
Note |
---|---|
To have a stacked resource managed by Heartbeat, you must first configure it as outlined in
the section called 「Configuring a stacked resource」.
|
drbdupper
resource agent. That resource agent is distributed, as all other Heartbeat R1 resource agents, in
/etc/ha.d/resource.d
. It is to stacked resources what the
drbddisk
resource agent is to conventional, unstacked resources.
drbdupper
takes care of managing both the lower-level resource
and the stacked resource. Consider the following
haresources
example, which would replace the one given in the previous section:
bob 192.168.42.1 \ drbdupper::mysql-U Filesystem::/dev/drbd1::/var/lib/mysql::ext3 \ mysql
drbdupper
(in this example,
mysql-U
).
Filesystem
resource agent to mount the DRBD device associated with the stacked resource (in this example,
/dev/drbd1
), not the lower-level one.
/usr/lib/heartbeat/hb_takeover
/usr/lib64/heartbeat/hb_takeover
/usr/lib/heartbeat/hb_standby
/usr/lib64/heartbeat/hb_standby
/etc/init.d/heartbeat stop
reboot
poweroff