Hello,

> 1. Without  restarting or shutting down the cluster, and without
> editing the cib.xml file how can I make a change to the cluster
> configuration (i.e. how can I use haresources2cib.py to generate an
> updated cib.xml and get the cluster to use it without a restart)

I use 8 space wide indenting with that it gets very readable. You can
use "cibadmin -Q" to dump the configuration. Kick out the <cib> tags and
the <status> section than you have a template to work with. Get sure
that you have a unique identifier specified for each section.

I use "cibadmin -U -x /path/to/file.xml" to update my configuration
which works quiet well as long as you don't put resources into a
resource group that were previous outside or vice versa.

If you want a fres start you can always bring all cluster nodes down
call "rm /var/lib/heartbeat/crm/*", bring them up again and call the
above command to get things going again.

> 2. How can I override the defaults (such as timeout) in the resulting
> cib.xml file?

You just add a parameter. And call "cibadmin -U -x /path/to/file".

Here is my cheat sheet you may find it helpful:

 # linux ha

 # Status:
crm_mon -1 -r

 # Dump XML Tree
cibadmin -Q

 # Add a single resource
cibadmin -o resources -C -x 01_drbd

 # Update a single resource
cibadmin -o resources -U -x 02_filesystem

 # Add a single constraint
cibadmin -o constraints -C -x 03_constraint_run_on

 # Update using a input produced from 'cibadmin -Q' minus <crm> tags and 
without the status section
cibadmin -U -x postgres.xml

 # Use the cluster default to determine if a resource should get started
crm_resource -r ms-drbd0 -v '#default' --meta -p target_role

 # Migrate a Resource to a host:
crm_resource -M -r postgres-cluster -H postgres-01

 # A nice man page with many examples at the end
man crm_resource

 # Check if a node is in standby
crm_standby -G -U postgres-01
crm_mon -1 -r

 # Put node into standby mode
crm_standby -U postgres-01 -v on

 # Make node active again (the two commands have the same effect)
crm_standby -U postgres-01 -v off
crm_standby -D -U postgres-01

 # Cleanup (Retry to Start after manual intervention) Resource
crm_resource -C -r tomcat-02 -H tomcat-02

 # Remove a statemen by id if it happens to be twice in there (should be fixed 
upstream)
cibadmin -o resources -D -X '<op id="0a71bc1a-b460-49bb-9d0d-2fe3ada169b9" 
name="monitor" interval="60s" timeout="120s" start_delay="1m"/>'

http://fghaas.wordpress.com/2007/10/04/checking-your-secondarys-integrity/

 # Reload CIB completly
 # - KILL <CIB> and <STATUS> Tags including content
 # Wipe old content (Attention don't do that during production it gets your 
service down: cibadmin -E)
cibadmin -U -x /path/to/profile.xml

http://www.mail-archive.com/[email protected]/msg03187.html
http://www.linux-ha.org/HaNFS
http://www.linux-ha.org/DRBD/NFS
http://www.linux-ha.org/DRBD/HowTov2

drbdsetup /dev/drbd0 primary -o

 # Split Brain Manual Recovery
 # Primary Node:
drbdadm connect all

 # Attach Split Brain Node as Secondary
drbdadm -- --discard-my-data connect

 # Force Split Brain Secondary to be Primary:
drbdadm -- --overwrite-data-of-peer primary all

 # Reload Configuration
/etc/init.d/heartbeat reload
drbdadm adjust all

 # Heartbeat Broadcast link went missing (Attention: All Services get stopped 
on the node)
/etc/init.d/heartbeat restart

http://blogs.linbit.com/florian/2007/10/01/an-underrated-cluster-admins-companion-dopd/

 # List Configured OCF Agents and to operations on them (backend command)
/usr/lib/heartbeat/lrmadmin

 # XML Template generator:
python /usr/lib/heartbeat/crm_primitive.py

 # Delete Cluster Configuration (Attention: Nor for production. The command has
 # to be issued on all nodes and all ha services must be stopped on all nodes
 # in the cluster)
rm /var/lib/heartbeat/crm/*

I attached you an example postgres cluster configuration.

        Thomas

Attachment: postgres.xml
Description: XML document

_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to