1o2cb(8)                       OCFS2 Manual Pages                       o2cb(8)
2
3
4

NAME

6       o2cb - Cluster registration utility for the O2CB cluster stack.
7

SYNOPSIS

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

DESCRIPTION

14       o2cb(8) is used to add, remove and list the  information  in  the  O2CB
15       cluster  configuration  file. This utility is also used to register and
16       unregister the cluster, as well as start and stop global heartbeat.
17
18       The  default  location  of  the  configuration  file,  /etc/ocfs2/clus‐
19       ter.conf, can be overridden using the --config-file option.
20
21

OPTIONS

23       --config-file config-file
24              Specify  a  path  to the configuration file. If not provided, it
25              will use the default path of /etc/ocfs2/cluster.conf.
26
27
28       -v, --verbose
29              Verbose mode.
30
31
32       -h, --help
33              Help.
34
35
36       -V, --version
37              Show version and exit.
38
39

O2CB COMMANDS

41       add-cluster cluster-name
42              Adds a cluster to the configuration file. The O2CB configuration
43              file  can  hold multiple clusters. However, only one cluster can
44              be active at any time.
45
46
47       remove-cluster cluster-name
48              Removes a cluster from the configuration file. This command  re‐
49              moves  all the nodes and heartbeat regions assigned to the clus‐
50              ter.
51
52
53       add-node cluster-name node-name [--ip ip-address] [--port port] [--num‐
54       ber node-number]
55              Adds a node to the cluster in the configuration file. It accepts
56              three optional arguments.  If not provided, the  ip-address  de‐
57              faults  to  the one assigned to the node-name, port to 7777, and
58              node-number to the lowest unused node number.
59
60
61       remove-node cluster-name node-name
62              Removes a node from the cluster in the configuration file.
63
64
65       add-heartbeat cluster-name [uuid|device]
66              Adds a heartbeat region to  the  cluster  in  the  configuration
67              file.
68
69
70       remove-heartbeat cluster-name [uuid|device]
71              Removes a heartbeat region from the cluster in the configuration
72              file.
73
74
75       heartbeat-mode cluster-name [local|global]
76              Sets the heartbeat mode for the  cluster  in  the  configuration
77              file.
78
79
80       list-clusters
81              Lists all the cluster names in the configuration file.
82
83
84       list-cluster cluster-name --oneline
85              Lists  all  the  nodes and heartbeat regions associated with the
86              cluster in the configuration file.
87
88
89       list-nodes cluster-name --oneline
90              Lists all the nodes associated with the cluster in the  configu‐
91              ration file.
92
93
94       list-heartbeats cluster-name --oneline
95              Lists  all  the heartbeat regions associated with the cluster in
96              the configuration file.
97
98
99       register-cluster cluster-name
100              Registers the cluster listed in the configuration file with con‐
101              figfs.   If  called  when  the cluster is already registered, it
102              will update configfs with the current configuration.
103
104
105       unregister-cluster cluster-name
106              Unregisters the cluster from configfs.
107
108
109       start-heartbeat cluster-name
110              Starts global heartbeat on all regions for the cluster as listed
111              in  the configuration file. If repeated, it will start heartbeat
112              on new regions and  stop  on  regions  since  removed.  It  will
113              silently exit if global heartbeat has not been enabled.
114
115
116       stop-heartbeat cluster-name
117              Stops  global  heartbeat on all regions for the cluster. It will
118              silently exit if global heartbeat has not been enabled.
119
120
121       cluster-status [cluster-name]
122              Shows whether the given cluster is  offline  or  online.  If  no
123              cluster  is  provided, it shows the currently active cluster, if
124              any.
125
126

EXAMPLE

128       To create a cluster, mycluster having two nodes, node1 and node2, do:
129
130       $ o2cb add-cluster mycluster
131       $ o2cb add-node mycluster node1 --ip 10.10.10.1
132       $ o2cb add-node mycluster node2 --ip 10.10.10.2
133
134       To specify a global heartbeat device, /dev/sda1, do:
135
136       $ o2cb add-heartbeat mycluster /dev/sda1
137
138       To enable global heartbeat, do:
139
140       $ o2cb heartbeat-mode mycluster global
141
142

SEE ALSO

144       o2cb(7) o2cb.sysconfig(5) ocfs2.cluster.conf(5)
145
146

AUTHORS

148       Oracle Corporation
149
150
152       Copyright © 2010, 2012 Oracle. All rights reserved.
153
154
155
156Version 1.8.7                    January 2012                          o2cb(8)
Impressum