Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

cibadmin(8) [suse man page]

CIBADMIN(8)							  [FIXME: manual]						       CIBADMIN(8)

NAME
cibadmin - read, modify, or administer Heartbeat Cluster Information Base SYNOPSIS
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 (-?) DESCRIPTION
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. Note cibadmin should always be used in preference to editing the cib.xml file by hand--especially if the cluster is active. The cluster goes to great lengths to detect and discourage this practice so that your data is not lost or corrupted. OPTIONS
--id xml-object-id, -i xml-object-id Specify the XML ID of the XML object on which to operate. Note This option is deprecated and may be removed in future versions of cibadmin. --obj_type object-type, -o object-type Specify the type of object on which to operate. Valid values are nodes, resources, status, and constraints. --verbose, -V Turn on debug mode. Additional -V options increase the verbosity of the output. --help, -? Obtain a help message from cibadmin. --erase, -E Erase the contents of the entire CIB. --query, -Q Query a portion of the CIB. --create, -C Create a new CIB from the XML content of the argument. --replace, -R Recursively replace an XML object in the CIB. --update, -U Recursively update an object in the CIB. Updating an object replaces like members in the XML, but does not delete attributes not mentioned. --modify, -M An alias for -U and --update. --delete, -D Delete the first object matching the specified criteria, for example, <tagname id="rsc1_op1" name="monitor"/>. The tag name and all attributes must match for the element to be deleted. --delete_alt, -d Delete the object at the specified fully qualified location, for example, <resource id="rsc1"><operations><op id="rsc1_op1"/>. Requires -o type option. --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. --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). --crm_xml xml-fragment-string , -X xml-fragment-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. SPECIALIZED OPTIONS
--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). --master, -w Force the local CIB instance into read-write mode. In normal circumstances, the cluster ensures that this is set correctly. Warning 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. --slave, -r Force the local CIB instance into read-only mode. In normal circumstances, the cluster ensures that this is set correctly. Warning 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, -f Force a write to the CIB regardless of whether the cluster has quorum. Important 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, -l Let a command take effect locally (rarely used, advanced option). --no-bcast, -b Prevent the result of a command from being broadcast to other nodes even if it modifies the CIB. Important Use this option with care to avoid ending up with a divergent cluster. --sync-call, -s Use the CIB's synchronous API when performing the operation given to cibadmin. This should have no noticeable effect for the user. EXAMPLES
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_type resources -C -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"/>' Note 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_type resources -U -x bar 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 FILES
/var/lib/heartbeat/crm/cib.xml--the CIB (minus status section) on disk. SEE ALSO
???, ???, lrmadmin(8), heartbeat(8) AUTHOR
cibadmin was written by Andrew Beekhof. This manual page was originally written by Alan Robertson. CAVEATS
Avoid working on the automatically maintained copy of the CIB on the local disk. Whenever anything in the cluster changes, the CIB is updated. Therefore using an outdated backup copy of the CIB to propagate your configuration changes might result in an inconsistent cluster. [FIXME: source] 07/05/2010 CIBADMIN(8)
Man Page