Este contenido no está disponible en el idioma seleccionado.

6.5. Disabling Resources of a Clustered Service for Maintenance


At times, it may be necessary to to stop a resource that is part of a clustered service. You can configure services in the cluster.conf file to have hierarchical resources (similar to a dependency tree) to disable a resource in a service without disabling other resources within that service.
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.
Red Hat logoGithubRedditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

© 2024 Red Hat, Inc.