Installation guide
So, for example, if you have a database that uses an ext3-formatted filesystem, you can disable the
database while preserving the filesystem resource for use in the service.
In the following example snippet of a cluster.conf file, a service uses a MySQL database and
ext3-formatted filesystem resources.
<resources>
<mysql config_file="/etc/my.cnf" name="mysql-resource" shutdown_wait="0"/>
<fs device="/dev/sdb1" force_fsck="0" force_unmount="1" fsid="9349"
fstype="ext3" mountpoint="/opt/db" name="SharedDisk" self_fence="0"/>
</resources>
<service name="ha-mysql">
<fs ref="SharedDisk">
<mysql ref="mysql-resource"/>
</fs>
</service>
In order to stop the MySQL-database and perform maintenance tasks without interfering with the
cluster software (mainly rgmanager), you must first freeze the clustered service:
clusvcadm -Z ha-mysql
You can then stop the MySQL service with the rg_test command:
rg_test test /etc/cluster/cluster.conf stop mysql mysql-resource
When the MySQL database has been shutdown, maintenance can be performed. After finishing the
maintenance, start the MySQL database with rg_test again:
rg_test test /etc/cluster/cluster.conf start mysql mysql-resource
The cluster service is still frozen and will not be monitored by rgmanager. To enable monitoring
again, unfreeze the clustered service:
clusvcadm -U ha-mysql
Note
The rg_test utility will stop all instances of a resource on a given node, potentially causing
undesired results if multiple services on a single node are sharing the same resource. Do not
perform these steps on resources that have multiple instances within the cluster.conf file.
In such cases, it is usually necessary to disable the service for maintenance.
6.6. Disabling t he Clust er Soft ware
It may become necessary to temporarily disable the cluster software on a cluster member. For
example, if a cluster member experiences a hardware failure, you may want to reboot that member,
but prevent it from rejoining the cluster to perform maintenance on the system.
Use the /sbin/chkconfig command to stop the member from joining the cluster at boot-up as
follows:
Chapt er 6 . Managing Red Hat Clust er Wit h syst em- config- clust er
83