cibadmin — Provides direct access to the cluster configuration
Allows the configuration, or sections of it, to be queried, modified, replaced and deleted.
cibadmin (--query|-Q) -[Vrwlsmfbp] [-i xml-object-id|-o
xml-object-type] [-t t-flag-whatever] [-h hostname]cibadmin (--create|-C) -[Vrwlsmfbp] [-X xml-string]
[-x xml- filename] [-t t-flag-whatever] [-h hostname]cibadmin (--replace-R) -[Vrwlsmfbp] [-i xml-object-id|
-o xml-object-type] [-X xml-string] [-x xml-filename] [-t
t-flag- whatever] [-h hostname]cibadmin (--update|-U) -[Vrwlsmfbp] [-i xml-object-id|
-o xml-object-type] [-X xml-string] [-x xml-filename] [-t
t-flag- whatever] [-h hostname]cibadmin (--modify|-M) -[Vrwlsmfbp] [-i xml-object-id|
-o xml-object-type] [-X xml-string] [-x xml-filename] [-t
t-flag- whatever] [-h hostname]cibadmin (--delete|-D) -[Vrwlsmfbp] [-i xml-object-id|
-o xml-object-type] [-t t-flag-whatever] [-h hostname]cibadmin (--delete_alt|-d) -[Vrwlsmfbp] -o
xml-object-type [-X xml-string|-x xml-filename]
[-t t-flag-whatever] [-h hostname]cibadmin --erase (-E)cibadmin --bump (-B)cibadmin --ismaster (-m)cibadmin --master (-w)cibadmin --slave (-r)cibadmin --sync (-S)cibadmin --help (-?)The cibadmin command is the low-level administrative command for manipulating the Heartbeat CIB. Use it to dump all or part of the CIB, update all or part of it, modify all or part of it, delete the entire CIB, or perform miscellaneous CIB administrative operations.
cibadmin operates on the XML trees of the CIB, largely without knowledge of the meaning of the updates or queries performed. This means that shortcuts that seem natural to humans who understand the meaning of the elements in the XML tree are impossible to use with cibadmin. It requires a complete lack of ambiguity and can only deal with valid XML subtrees (tags and elements) for both input and output.
![]() | |
cibadmin should always be used in preference to
editing the | |
--obj_type object-type,
-o object-type
Specify the type of object on which to operate. Valid values are
nodes, resources,
constraints, crm_status, and
status.
--verbose, -V
Turn on debug mode. Additional -V options increase
the verbosity of the output.
--help, -?
Obtain a help message from cibadmin.
--xpath PATHSPEC,
-A PATHSPEC
Supply a valid XPath to use instead of an obj_type.
--bump, -B
Increase the epoch version counter in the CIB.
Normally this value is increased automatically by the cluster when a
new leader is elected. Manually increasing it can be useful if you
want to make an older configuration obsolete (such as one stored on
inactive cluster nodes).
--create, -C
Create a new CIB from the XML content of the argument.
--delete, -D
Delete the first object matching the supplied criteria, for example,
<op id="rsc1_op1" name="monitor"/>. The tag name
and all attributes must match in order for the element to be deleted
--erase, -E
Erase the contents of the entire CIB.
--ismaster, -m
Print a message indicating whether or not the local instance of the CIB software is the master instance or not. Exits with return code 0 if it is the master instance or 35 if not.
--modify, -M
Find the object somewhere in the CIB's XML tree and update it.
--query, -Q
Query a portion of the CIB.
--replace, -R
Recursively replace an XML object in the CIB.
--sync, -S
Force a resync of all nodes with the CIB on the specified host (if
-h is used) or with the DC (if no -h
option is used).
--xml-text string,
-X string
Specify an XML tag or fragment on which crmadmin should operate. It must be a complete tag or XML fragment.
--xml-file filename,
-x filename
Specify XML from a file on which cibadmin should operate. It must be a complete tag or XML fragment.
--xml_pipe, -p
Specify that the XML on which cibadmin should operate comes from standard input. It must be a complete tag or XML fragment.
--host hostname,
-h hostname
Send command to specified host. Applies to query and sync commands only.
--local, -l
Let a command take effect locally (rarely used, advanced option).
--no-bcast, -b
Command will not be broadcast even if it altered the CIB.
![]() | |
Use this option with care to avoid ending up with a divergent cluster. | |
--sync-call, -s
Wait for call to complete before returning.
To get a copy of the entire active CIB (including status section, etc.) delivered to stdout, issue this command:
cibadmin -Q
To add an IPaddr2 resource to the resources section,
first create a file foo with the following contents:
<primitive id="R_10.10.10.101" class="ocf" type="IPaddr2"
provider="heartbeat">
<instance_attributes id="RA_R_10.10.10.101">
<attributes>
<nvpair id="R_ip_P_ip" name="ip" value="10.10.10.101"/>
<nvpair id="R_ip_P_nic" name="nic" value="eth0"/>
</attributes>
</instance_attributes>
</primitive>
Then issue the following command:
cibadmin--obj_typeresources-U-x foo
To change the IP address of the IPaddr2 resource previously added, issue the command below:
cibadmin-M-X'<nvpair id="R_ip_P_ip" name="ip" value="10.10.10.102"/>'
![]() | |
This does not change the resource name to match the new IP address. To do that, delete then re-add the resource with a new ID tag. | |
To stop (disable) the IP address resource added previously without
removing it, create a file called bar with the
following content in it:
<primitive id="R_10.10.10.101"> <instance_attributes id="RA_R_10.10.10.101"> <attributes> <nvpair id="stop_R_10.10.10.101" name="target-role" value="Stopped"/> </attributes> </instance_attributes> </primitive>
Then issue the following command:
cibadmin--obj_typeresources-U-xbar
To restart the IP address resource stopped by the previous step, issue:
cibadmin-D-X'<nvpair id="stop_R_10.10.10.101">'
To completely remove the IP address resource from the CIB, issue this command:
cibadmin-D-X'<primitive id="R_10.10.10.101"/>'
To replace the CIB with a new manually-edited version of the CIB, use the following command:
cibadmin-R-x$HOME/cib.xml