11.3. Configuring CMAN

GFS needs cman, the Red Hat cluster manager, to work. Since cman is not as flexible and easy to configure we will put pacemaker on top of it in the next steps.

[Note]Note

If you don’t want to use pacemaker, please consult the corresponding manuals for cman.

Before we start making a GFS filesystem we will configure cman.

[Note]Note

If you are configuring a two node cluster, you can not expect it to have a quorum. You will need tell cman to ignore it. This is done by setting

# sed -i.orig "s/.*CMAN_QUORUM_TIMEOUT=.*/CMAN_QUORUM_TIMEOUT=0/g" /etc/sysconfig/cman

Next create a cman cluster configuration in /etc/cluster/cluster.conf:

<?xml version="1.0"?>
<cluster name="my-cluster" config_version="1">
        <logging debug="off"/>
        <clusternodes>
                <clusternode name="gfs-machine1" nodeid="1">
                        <fence>
                                <method name="pcmk-redirect">
                                        <device name="pcmk" port="gfs-machine1"/>
                                </method>
                        </fence>
                </clusternode>
                <clusternode name="gfs-machine2" nodeid="2">
                        <fence>
                                <method name="pcmk-redirect">
                                        <device name="pcmk" port="gfs-machine2"/>
                                </method>
                        </fence>
                </clusternode>
        </clusternodes>
        <fencedevices>
                <fencedevice name="pcmk" agent="fence_pcmk"/>
        </fencedevices>
</cluster>

This tells cman that the clustername is my-cluster, the cluster node names are gfs-machine1 and gfs-machine2, and that fencing will be done by pacemaker.

After you have made the configuration start cman.