o2cb - Man Page

Cluster registration utility for the O2CB cluster stack.

Synopsis

o2cb [--config-file=path] [-h|--help] [-v|--verbose] [-V|--version] COMMAND [ARGS]

Description

o2cb(8) is used to add, remove and list the information in the O2CB cluster configuration file. This utility is also used to register and unregister the cluster, as well as start and stop global heartbeat.

The default location of the configuration file, /etc/ocfs2/cluster.conf, can be overridden using the --config-file option.

Options

--config-file config-file

Specify a path to the configuration file. If not provided, it will use the default path of /etc/ocfs2/cluster.conf.

-v,  --verbose

Verbose mode.

-h,  --help

Help.

-V,  --version

Show version and exit.

O2cb Commands

add-cluster cluster-name

Adds a cluster to the configuration file. The O2CB configuration file can hold multiple clusters. However, only one cluster can be active at any time.

remove-cluster cluster-name

Removes a cluster from the configuration file. This command removes all the nodes and heartbeat regions assigned to the cluster.

add-node cluster-name node-name [--ip ip-address] [--port port] [--number node-number]

Adds a node to the cluster in the configuration file. It accepts three optional arguments. If not provided, the ip-address defaults to the one assigned to the node-name, port to 7777, and node-number to the lowest unused node number.

remove-node cluster-name node-name

Removes a node from the cluster in the configuration file.

add-heartbeat cluster-name [uuid|device]

Adds a heartbeat region to the cluster in the configuration file.

remove-heartbeat cluster-name [uuid|device]

Removes a heartbeat region from the cluster in the configuration file.

heartbeat-mode cluster-name [local|global]

Sets the heartbeat mode for the cluster in the configuration file.

list-clusters

Lists all the cluster names in the configuration file.

list-cluster cluster-name --oneline

Lists all the nodes and heartbeat regions associated with the cluster in the configuration file.

list-nodes cluster-name --oneline

Lists all the nodes associated with the cluster in the configuration file.

list-heartbeats cluster-name --oneline

Lists all the heartbeat regions associated with the cluster in the configuration file.

register-cluster cluster-name

Registers the cluster listed in the configuration file with configfs. If called when the cluster is already registered, it will update configfs with the current configuration.

unregister-cluster cluster-name

Unregisters the cluster from configfs.

start-heartbeat cluster-name

Starts global heartbeat on all regions for the cluster as listed in the configuration file. If repeated, it will start heartbeat on new regions and stop on regions since removed. It will silently exit if global heartbeat has not been enabled.

stop-heartbeat cluster-name

Stops global heartbeat on all regions for the cluster. It will silently exit if global heartbeat has not been enabled.

cluster-status [cluster-name]

Shows whether the given cluster is offline or online. If no cluster is provided, it shows the currently active cluster, if any.

Example

To create a cluster, mycluster having two nodes, node1 and node2, do:

$ o2cb add-cluster mycluster
$ o2cb add-node mycluster node1 --ip 10.10.10.1
$ o2cb add-node mycluster node2 --ip 10.10.10.2

To specify a global heartbeat device, /dev/sda1, do:

$ o2cb add-heartbeat mycluster /dev/sda1

To enable global heartbeat, do:

$ o2cb heartbeat-mode mycluster global

See Also

o2cb(7) o2cb.sysconfig(5) ocfs2.cluster.conf(5)

Authors

Oracle Corporation

Referenced By

o2cb(7), o2cb.sysconfig(5), ocfs2(7), ocfs2.cluster.conf(5), ocfs2_hb_ctl(8).

January 2012 Version 1.8.8 OCFS2 Manual Pages