/usr/share/doc/ocfs2-tools/README.O2CB is in ocfs2-tools 1.6.4-3ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | O2CB is a simple set of clustering services required to get OCFS2 going.
A more complete cluster infrastructure may replace it later.
[Describing Your Cluster Configuration]
It is recommended that you use ocfs2console to generate your cluster
configuration.
The cluster confguration is stored in /etc/ocfs2/cluster.conf. This is
a hardcoded name right now (boo!), so you have to put it there. The
file is in stanza format, with one stanza describing the generic cluster
attributes and one stanza for each node.
The stanza for the generic cluster attributes looks like so:
cluster:
name = ocfs2
node_count = 2
Both attributes are required. The cluster name must start with a letter
and be made of the usual [-a-ZA-Z0-9_] characters. The node_count
attribute must match the number of node stanzas.
Each node is described by a stanza:
node:
name = ca-test17
cluster = ocfs2
number = 0
ip_address = 139.185.118.117
ip_port = 7777
Each attribute is required. The name has the same character
restrictions that the cluster name does. The cluster attribute _must_
match the name of the cluster, or this node stanza will be ignored.
[Starting the OCFS2 Clustering Services]
O2CB is comprised of a simple node manager, heartbeat, TCP protocol, and
DLM. The basic steps in startup are as follows:
1) Load the nodemanager, heartbeat, and tcp modules
2) Mount the nodemanager and heartbeat pseudo filesystems.
3) Load the cluster information via o2cb_ctl. This adds all the
known nodes to the nodemanager's psuedo filesystem.
4) Load the DLM module.
5) Load the OCFS2 module.
6) Mount an OCFS2 filesystem.
The /etc/init.d/o2cb program is responsible for handling steps 1-3
during the boot of a machine. If you are running from the source
tree, the script is located at vendor/common/o2cb.init. Also, the
o2cb_ctl program needs to be in your path. It lives at
o2cb_ctl/o2cb_ctl in the source tree.
To enable steps 1 and 2 on boot:
# /etc/init.d/o2cb enable
Writing O2CB configuration: OK
or:
# /etc/init.d/o2cb configure
Configuring the O2CB driver.
This will configure the on-boot properties of the O2CB driver.
The following questions will determine whether the driver is loaded on
boot. The current values will be shown in brackets ('[]'). Hitting
<ENTER> without typing an answer will keep that current value. Ctrl-C
will abort.
Load O2CB driver on boot (y/n) [n]: y
Cluster to start on boot (Enter "none" to clear) []:
Writing O2CB configuration: OK
If you want step 3 to occur on boot, you must name the cluster to start:
# /etc/init.d/o2cb configure
Configuring the O2CB driver.
This will configure the on-boot properties of the O2CB driver.
The following questions will determine whether the driver is loaded on
boot. The current values will be shown in brackets ('[]'). Hitting
<ENTER> without typing an answer will keep that current value. Ctrl-C
will abort.
Load O2CB driver on boot (y/n) [n]: y
Cluster to start on boot (Enter "none" to clear) []: ocfs2
Writing O2CB configuration: OK
You can now start the cluster by hand as well, with:
# /etc/init.d/o2cb start
If you don't want to configure O2CB to start on boot, or if you don't
want to configure a specific cluster to start by default, you can run
the steps manually.
To run steps 1 and 2:
# /etc/init.d/o2cb load
To start a cluster (step 3):
# /etc/init.d/o2cb online ocfs2
To stop a cluster and unload the modules, you simply use:
# /etc/init.d/o2cb stop
Unloading the modules doesn't work right now.
|