Product SiteDocumentation Site

2.3. Come dovrebbe essere aggiornata la configurazione?

Ci sono tre regole base per aggiornare la configurazione del cluster:
Ora che è chiaro com NON modificare la configurazione, è possibile spiegare come invece si debba fare.
The most powerful tool for modifying the configuration is the cibadmin command which talks to a running cluster. With cibadmin, the user can query, add, remove, update or replace any part of the configuration; all changes take effect immediately, so there is no need to perform a reload-like operation.
The simplest way of using cibadmin is to use it to save the current configuration to a temporary file, edit that file with your favorite text or XML editor and then upload the revised configuration.

Esempio 2.4. Utilizzare un editor per modificare la configurazione del cluster in sicurezza

# cibadmin --query > tmp.xml
# vi tmp.xml
# cibadmin --replace --xml-file tmp.xml

Some of the better XML editors can make use of a Relax NG schema to help make sure any changes you make are valid. The schema describing the configuration can normally be found in /usr/lib/heartbeat/pacemaker.rng on most systems.
Se invece la necessità è quella di modificare unicamente la sezione risores, allora è possibile fare

Esempio 2.5. Utilizzare in sicurezza un editor per modificare una sotto sezione della configurazione del cluster

# cibadmin --query --obj_type resources > tmp.xml
# vi tmp.xml
# cibadmin --replace --obj_type resources --xml-file tmp.xml

per consentire la modifica di qualsiasi altra parte della configurazione.