Sophie

Sophie

distrib > Fedora > 13 > x86_64 > by-pkgid > 734012443e4e360b704f490b8f9d9e91 > files > 18

ocfs2-tools-1.4.3-5.fc13.x86_64.rpm


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.