• No results found

RedHat Linux Enterprise Server

interface

Chapter 17 Clustering

23. In MConsole select the Main Message Store, set the mailbox root to be the the newly created Mailboxes directory.

17.3 RedHat Linux Enterprise Server

17.3.1

Notes

1. You will need to assign one IP address: this is the shared service IP address used by the clustered service. It should have a corresponding DNS name.

2. When setting up M-Switch, the shared service IP address or corresponding DNS name should always be used when one is required (e.g. when configuring X.400 channels). 3. You need at least two nodes in your cluster. Nodes share a disk partition.

4. Each node must possess a Fence. This is a device which enables the Cluster Manager to power off and on a member of the cluster. For testing purposes a manual Fence can be used, but such a system is not supported by RedHat.

5. NEVER mount the shared partition on multiple nodes at the same time.

6. These instructions assume default installation directories, i.e. /etc/isode for configuration, /opt/isode for executables and /var/isode for logs and the Message Switch’s Queue directory.

The mechanism and the configuration used to share a disk partition across the nodes in the cluster is outside the scope of this document. Possible setups you may use include a dual ported disk, or a networked system such as iSCSI.

NB: Isode stores data in the /var/isode directory. At a minimum this directory should be kept on the shared disk. During installation the Isode packages will create directory structures here. One way to ensure that the directory structures are created successfully, is to mount the /var/isode shared disk, on a single node, before installing isode packages.

You should read the document Red Hat Cluster Suite: Configuring and Managing a Cluster at https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/ Cluster_Administration/ch-intro-CA.html.

The above document explains how to install the packages and configure the system. This text explains how this applies to the Isode M-Switch product.

17.3.2

Overview

The RedHat Cluster Manager needs to be installed on each member of the cluster. The installations cooperate to determine which of the cluster members is to act as the current host for the Clustered Service.

Each member of the cluster needs to have a fence configured. For testing this can be set to manual.

A Clustered Service comprises a set of Resources and a set or subset of the systems which are part of the Cluster.

Cluster Resources can be: • a (shared) IP address • a script

• a file system

The shared IP address is a separate IP address from the IP address used for the network card(s). This address is added to the list of addresses used by one of the network cards.

This is done automatically by the Cluster Manager. To see the IP address added by the Cluster Manager, use the command:

ip addr list

The script is an SVR4 startup/shutdown script which takes the arguments start, stop

and status. You should use the /etc/init.d/meta script (required if using M-Vault and or M-Store).

The file system is a disk partition shared across the cluster which can be mounted by each member. The Cluster Manager takes care of mounting and unmounting this partition. The Cluster Configuration is held in an XML file which can be edited by running a web browser, and using a URL provided by lucci, part of the cluster manager software. When the changes are ready, a utility will propagate the changes across the members of the Cluster.

17.3.3

Installation of cluster manager software

You should follow the instructions at http://www.redhat.com/docs/manuals/csgfs/browse/ rh-cs-en/ when determining the packages to install. You will need to install packages appropriate for your kernel.

17.3.4

Configuring the cluster

Once the cluster packages are installed be sure to allow the following ports through the firewall:

1. 5404, 5405 UDP Cluster Manager 2. 11111 TCP ricci

3. 16851 TCP modclusterd 4. 8084 TCP luci

Next run the following command:

passwd ricci

This lets an administrator set the ricci password, which is used to replicate cluster configurations across the nodes.

Configure the cluster manager to start automatically:

chkconfig ricci on chkconfig luci on chkconfig cman on chkconfig rgmanager on chkconfig modclusterd on chkconfig NetworkManager off

Start cluster services, and stop the NetworkManager:

service NetworkManager off service ricci start

service luci start service cman start service rgmanager start

servicce modclusterd start

Starting cman may fail, as a cluster configuration hasn't been created yet. lucci contains a web server, which allows an administrator to create a suitable configuration.

After starting lucci a web address will be displayed, enter this into your web browser. Login to the website, then add the following resources:

• A "File system" Resource. This contains information required to mount and unmount the file system.

• A "IP Address" Resource. This should be the shared IP of the cluster. Please note the netmask is in CIDR format

• A script "Meta". This should point to /etc/init.d/meta

You should now create a "Failover Domain", and configure a suitable fencing device. For convenience Isode includes a "meta" script. This script is used to control other services. By having the "meta" script control other Isode services, the various Isode service effectively becomes just one service. This allows the one Isode "meta" service to be associated with a single shared disk, and shared IP address.

Create the meta.rc file:

cp /etc/isode/meta.rc.sample /etc/isode/meta.rc

Now configure the meta.rc file for the various Isode components.

USE_META_SCRIPT=yes

SCRIPT_DIR="/etc/rc.d/init.d" START_SCRIPTS="dsa pumice pp" USE_X400="yes"

• The "USE_META_SCRIPT" will stop the dsa / pumice / pp scripts from working unless they have been called by the meta script.

• The "SCRIPT_DIR" points to the location of the init.d scripts.

• The "START_SCRIPTS" is a list of scripts the meta service will start and stop. • The "USE_X400" this value is used to ensure that X.400 MTA components are started

and stopped correctly.

You should now configure (but not start) a service group containing the "meta" script. Add the following resources:

• The filesystem resource.

• The IP address resource, as a child of the filesystem resource. • The meta script resource, as a child of the filesystem resource. When starting the "metaService" group the cluster manager will: • Mount the filesystem.

• Pass "stop" as an argument to the meta script, and expect that to fail. • Pass "start" as an argument to the meta script, and expect that to succeed. • Repeatedly pass "status" as an argument to the meta script and have that succeed. In order to configure the Isode services, the shared filesystem and IP address should be started.

To do this the /etc/init.d/meta script should be changed: • After the "start" section of the script add an "exit 0". • After the "status" section of the script add an "exit 0". • After the "stop" section of the script add an "exit 1".

'start') exit 0 result=0 .... 'stop') exit 1 result=0 ... 'status') exit 0 ...

You may now enable the service. You may find it easier to use the command line at this point.

clusvcadm -e metaService

The cluster service will now be enabled, and an attempt to start the service is made. The shared IP address should now be active, and the shared disk should be mounted.

Create a configuration using MConsole in the usual way. Make sure that the clustered IP address / shared hostname is used whenever a hostame is required.

Once the configuration is complete, disable the metaService:

clusvcadm -d metaService

Use "clustat" to check the status of the configuration:

Cluster Status for foobar @ Thu May 2 14:18:27 2013 Member Status: Quorate

Member Name ID Status

--- ---- ---- ---

RH64-Cluster-Node1 1 Online, Local, rgmanager RH64-Cluster-Node2 2 Online, rgmanager

Service Name Owner (Last) State --- ---- --- --- --- service:metaService (RH64-Cluster-Node2) disabled

Finally copy the contents of /etc/isode and /etc/isode/switch over to the remote nodes. This is to ensure that all nodes have the same configuration.

It is possible to force nodes to keep the configuration in sync, by creating a seperate partition in the shared disk, and sharing the /etc/isode directory between nodes.

You should now be able to enable the clustered meta service, and make it move over to the remote node

[root@RH64-Cluster-Node1 switch]# clusvcadm -e metaService Local machine trying to enable service:metaService...Success service:metaService is now running on RH64-Cluster-Node1 [root@RH64-Cluster-Node1 switch]# clusvcadm -r metaService Trying to relocate service:metaService...Success