cibadmin — read, modify, or administer Heartbeat Cluster Information Base
cibadmin (--cib_query|-Q) -[Vrwlsmfbp] [-i xml-object-id|-o
xml-object-type] [-t t-flag-whatever] [-h hostname]
cibadmin (--cib_create|-C) -[Vrwlsmfbp] [-X xml-string]
[-x xml- filename] [-t t-flag-whatever] [-h hostname]
cibadmin (--cib_replace|-R) -[Vrwlsmfbp] [-i xml-object-id|
-o xml-object-type] [-X xml-string] [-x xml-filename] [-t
t-flag- whatever] [-h hostname]
cibadmin (--cib_update|-U) -[Vrwlsmfbp] [-i xml-object-id|
-o xml-object-type] [-X xml-string] [-x xml-filename] [-t
t-flag- whatever] [-h hostname]
cibadmin (--cib_modify|-M) -[Vrwlsmfbp] [-i xml-object-id|
-o xml-object-type] [-X xml-string] [-x xml-filename] [-t
t-flag- whatever] [-h hostname]
cibadmin (--cib_delete|-D) -[Vrwlsmfbp] [-i xml-object-id|
-o xml-object-type] [-t t-flag-whatever] [-h hostname]
cibadmin (--cib_delete_alt|-d) -[Vrwlsmfbp] -o
xml-object-type [-X xml-string|-x xml-filename]
[-t t-flag-whatever] [-h hostname]
cibadmin --cib_erase (-E)cibadmin --cib_bump (-B)cibadmin --cib_ismaster (-m)cibadmin --cib_slave (-r)cibadmin --cib_sync (-S)cibadmin --cib_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 | |
--id xml-object-id,
-i xml-object-id
Specify the XML ID of the XML object on which to operate.
![]() | |
This option is deprecated and may be removed in future versions of cibadmin. | |
--obj_type object-type, -o object-typeSpecify the type of object on which to operate. Valid values are
nodes, resources,
status, and constraints.
--verbose, -VTurn on debug mode. Additional -V options increase
the verbosity of the
output.
--help, -?Obtain a help message from cibadmin.
--cib_erase, -EErase the contents of the entire CIB.
--cib_query, -QQuery a portion of the CIB.
--cib_create, -CCreate a new CIB from the XML content of the argument.
--cib_replace, -RRecursively replace an XML object in the CIB.
--cib_update, -URecursively update an object in the CIB. Updating an object replaces like members in the XML, but does not delete attributes not mentioned.
--cib_modify, -MAn alias for -U and --cib_update.
--cib_delete, -DDelete the first object matching the specified criteria, for example,
<. The tag name and all attributes must match
for the element to be deleted.tagname id="rsc1_op1"
name="monitor"/>
--cib_delete_alt, -dDelete the object at the specified fully qualified location, for example,
<resource id="rsc1"><operations><op
id="rsc1_op1"/>. Requires -o
type option.
--cib_ismaster, -mPrint 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.
--cib_sync, -SForce 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).
--crm_xml xml-fragment-string
, -X xml-fragment-stringSpecify an XML tag or fragment on which crmadmin should operate. It must be a complete tag or XML fragment.
--xml-file filename,
-x filenameSpecify XML from a file on which cibadmin should operate. It must be a complete tag or XML fragment.
--xml_pipe, -pSpecify that the XML on which cibadmin should operate comes from standard input. It must be a complete tag or XML fragment.
--cib_bump, -BIncrease 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).
--cib_master, -wForce the local CIB instance into read-write mode. In normal circumstances, the cluster ensures that this is set correctly.
![]() | |
This is a highly dangerous command in that it results in multiple instances of the CIB in read-write mode. Having more than one host respond to updates results in an inconsistent cluster. | |
--cib_slave, -rForce the local CIB instance into read-only mode. In normal circumstances, the cluster ensures that this is set correctly.
![]() | |
This is a highly dangerous command in that you may end up without any instance of the CIB in read-write mode. In this case, no instance would respond to requests that have not been sent to a specific node. | |
--force_quorum, -fForce a write to the CIB regardless of whether the cluster has quorum.
![]() | |
Use this option with utmost care and avoid using it at a time when (part of) the cluster does not have quorum. Otherwise, this results in divergence between a small subset of the cluster nodes and the majority of the cluster. The worst case is if the majority of the cluster is also running (as in a partitioned cluster) and is also making changes. The problem arises when the complete cluster regains quorum and starts acting as one again. Before it can do so, it must pick the one configuration to continue to use. This is clearly problematic if there are significant configuration differences between the nodes. | |
--host hostname,
-h hostname
Specify the host to which to send this command (rarely used, advanced option).
--local, -lLet a command take effect locally (rarely used, advanced option).
--no-bcast, -bPrevent the result of a command from being broadcast to other nodes even if it modifies the CIB.
![]() | |
Use this option with care to avoid ending up with a divergent cluster. | |
--sync-call, -sUse the CIB's synchronous API when performing the operation given to cibadmin. This should have no noticeable effect for the user.
To get a copy of the entire active CIB (including status section, etc.) delivered to stdout, issue this command:
cibadmin -QTo 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