<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.old.lustre.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sven</id>
	<title>Obsolete Lustre Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.old.lustre.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sven"/>
	<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Special:Contributions/Sven"/>
	<updated>2026-04-12T04:11:28Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.7</generator>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12050</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12050"/>
		<updated>2010-12-14T14:37:57Z</updated>

		<summary type="html">&lt;p&gt;Sven: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is an old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI. For other methods of fencing refer to the RedHat Cluster documentation.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
Setting up RedHat Cluster consists of three steps: &lt;br /&gt;
* setup &#039;&#039;openais&#039;&#039;,&lt;br /&gt;
* configure the cluster and, &lt;br /&gt;
* start the RedHat cluster services&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58; 226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58; 5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. In the example shown above, it is assumed that one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD/ISO image in the &#039;&#039;Cluster&#039;&#039; sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If yum is not set up correctly, the rpm packages and their dependencies need to be installed manually.&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustrefs resource script ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure your Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
Next the nodes which form the cluster need to be specified. Each cluster node need to be specified separately wrapped in an surrounding &#039;&#039;clusternodes&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;clusternodes&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre1&amp;quot; nodeid=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre1-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre2&amp;quot; nodeid=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre2-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
  &amp;lt;/clusternodes&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each cluster node is given a name which must be it&#039;s hostname or IP address. Additionally a unique node ID needs to be specified. &lt;br /&gt;
The &#039;&#039;fence&#039;&#039; tag assigned to each node specifies a fence device to use to shut down this cluster node. The fence devices are defined elsewhere in &#039;&#039;cluster.conf&#039;&#039; (see below for details).&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
Fencing is essential to keep data on the Lustre file system consistent. Even with Multi-Mount-Protection enabled, fencing can make sure that a node in an unclear state is brought down for more analysis by the administrator.&lt;br /&gt;
&lt;br /&gt;
To configure fencing, first some fence daemon options need to be specified. the &#039;&#039;fence_daemon&#039;&#039; tag is a direct child of the &#039;&#039;cluster&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon clean_start=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Depending on the hardware configuration, these values may differ for different installations. Please see the notes in the cluster_schema_rhel5 document (linked above) for details.&lt;br /&gt;
&lt;br /&gt;
Each Lustre node in a cluster should be equipped with a fencing device. RedHat cluster supports a number of devices. More details on which devices are supported and how to configure them can be found in the cluster schema document.&lt;br /&gt;
For this example IPMI based fencing devices are used.&lt;br /&gt;
The &#039;&#039;fencedevices&#039;&#039; section may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fencedevices&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre1-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.1&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot; option=&amp;quot;off&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre2-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.2&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot; option=&amp;quot;off&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/fencedevices&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Every fence device has a number of attributes:&lt;br /&gt;
&#039;&#039;name&#039;&#039; is used to define a name for this fencing device. This name is referred to in the &#039;&#039;fence&#039;&#039; part of the &#039;&#039;clusternode&#039;&#039; definition (see above). The &#039;&#039;agent&#039;&#039; defines the kind of fencing device to use. In this example an IPMI-over-Lan device is used. The remaining attributes are specific for the &#039;&#039;ipmilan&#039;&#039; device and are self-explanatory.&lt;br /&gt;
&lt;br /&gt;
=== Resource Manager ===&lt;br /&gt;
&lt;br /&gt;
The resource manager block of the &#039;&#039;cluster.conf&#039;&#039; is wrapped in a &#039;&#039;rm&#039;&#039; tag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;rm&amp;gt;&lt;br /&gt;
    ..&lt;br /&gt;
  &amp;lt;/rm&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
It contains definitions of resources, failover domains, and services.&lt;br /&gt;
&lt;br /&gt;
==== Resources ====&lt;br /&gt;
In the &#039;&#039;resources&#039;&#039; block of the &#039;&#039;cluster.conf&#039;&#039; file all Lustre targets of both clustered nodes are specified. In this example, four Lustre object storage targets are defined:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;resources&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target1&amp;quot; mountpoint=&amp;quot;/mnt/ost1&amp;quot; device=&amp;quot;/path/to/ost1/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target2&amp;quot; mountpoint=&amp;quot;/mnt/ost2&amp;quot; device=&amp;quot;/path/to/ost2/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target3&amp;quot; mountpoint=&amp;quot;/mnt/ost3&amp;quot; device=&amp;quot;/path/to/ost3/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target4&amp;quot; mountpoint=&amp;quot;/mnt/ost4&amp;quot; device=&amp;quot;/path/to/ost4/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/resources&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use the &#039;&#039;lustrefs&#039;&#039; resource definition it is essential that the lustrefs.sh script is installed in &#039;&#039;/usr/share/cluster&#039;&#039; as described above. To verify the script is installed correctly and has correct permission run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/share/cluster/lustrefs.sh --help&lt;br /&gt;
usage: /usr/share/cluster/lustrefs.sh {start|stop|status|monitor|restart|meta-data|verify-all}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each &#039;&#039;lustrefs&#039;&#039; resource has a number of attributes. &#039;&#039;name&#039;&#039; defines how the resource can be addressed.&lt;br /&gt;
&lt;br /&gt;
==== Failover Domains ====&lt;br /&gt;
Usually RedHat cluster is used to provide a service on a number of nodes, where one node takes over the service of a failed node. In this example a number of Lustre targets is provided by each of the Lustre server nodes. To allow such a configuration, the definition of two Failover domains is necessary. The definition of &#039;&#039;failoverdomains&#039;&#039; may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;failoverdomains&amp;gt;&lt;br /&gt;
     &amp;lt;failoverdomain name=&amp;quot;first_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
      &amp;lt;failoverdomain name=&amp;quot;second_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;         &lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
    &amp;lt;/failoverdomains&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, two fail-over-domains are created by adding the same nodes to each fail-over-domain, but the nodes are assigned different priorities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Services ====&lt;br /&gt;
As a final configuration step the resources defined earlier are assigned to their fail-over-domain. This is done by defining a service for each of the Lustre nodes in the cluster and assign a domain. For the resources and fail-over-domains defined earlier this may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;first_first&amp;quot; name=&amp;quot;lustre_2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;second_first&amp;quot; name=&amp;quot;lustre_1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target4&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example &#039;&#039;target1&#039;&#039; and &#039;&#039;target2&#039;&#039; are assigned to the first node and &#039;&#039;target3&#039;&#039; and &#039;&#039;target4&#039;&#039; are assigned to the second node by default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Start RedHat Cluster ===&lt;br /&gt;
Before bringing up RedHat cluster, make sure &#039;&#039;cluster.conf&#039;&#039; is update/edited on both Lustre server nodes. Usually &#039;&#039;cluster.conf&#039;&#039; should be the same on both nodes. The only exception is, if the device paths differ on both nodes. &lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;cman&#039;&#039; service ====&lt;br /&gt;
&lt;br /&gt;
With &#039;&#039;cluster.conf&#039;&#039; in place of both nodes it&#039;s time to start the &#039;&#039;cman&#039;&#039; service.&lt;br /&gt;
this is done by running&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
service cman start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
on both clustered nodes. To verify &#039;&#039;cman&#039;&#039; is running &#039;&#039;clustat&#039;&#039; can be used:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bash-3.2# clustat &lt;br /&gt;
Cluster Status for Lustre @ Tue Dec 14 11:27:36 2010&lt;br /&gt;
Member Status: Quorate&lt;br /&gt;
&lt;br /&gt;
 Member Name                                      ID   Status&lt;br /&gt;
 ------ ----                                      ---- ------&lt;br /&gt;
 lustre1                                             1 Online, Local&lt;br /&gt;
 lustre2                                             2 Online&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To enable the &#039;&#039;cman&#039;&#039; service permanently run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chkconfig cman on&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;rgmanager&#039;&#039; service ====&lt;br /&gt;
With &#039;&#039;cman&#039;&#039; up and running it&#039;s time to start the resource group manager &#039;&#039;rgmanager&#039;&#039; by running&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
service rgmanager start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
rgmanager will than start to bring up the Lustre targets assigned to each of the Lustre nodes. &lt;br /&gt;
&lt;br /&gt;
==== Verifying RedHat Cluster ====&lt;br /&gt;
&lt;br /&gt;
To verify the state of the cluster run &#039;&#039;clustat&#039;&#039; again. With the above configuration the output should look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bash-3.2# clustat&lt;br /&gt;
Cluster Status for Lustre @ Tue Dec 14 13:12:07 2010&lt;br /&gt;
Member Status: Quorate&lt;br /&gt;
&lt;br /&gt;
 Member Name                                    ID   Status&lt;br /&gt;
 ------ ----                                    ---- ------&lt;br /&gt;
 lustre1                                           1 Online, Local, rgmanager&lt;br /&gt;
 lustre2                                           2 Online, rgmanager&lt;br /&gt;
&lt;br /&gt;
 Service Name                       Owner (Last)                       State         &lt;br /&gt;
 ------- ----                       ----- ------                       -----         &lt;br /&gt;
 service:lustre_1                   lustre1                            started       &lt;br /&gt;
 service:lustre_2                   lustre2                            started       &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Relocate services ===&lt;br /&gt;
It may be necessary to relocate running lustre services manually. This can be done using &lt;br /&gt;
&#039;&#039;clusvcadm&#039;&#039; as shown in the example below. First the service &#039;&#039;lustre_2&#039;&#039; is assigned to node &#039;&#039;lustre2&#039;&#039;. After calling &#039;&#039;clusvcadm -r lustre_2&#039;&#039; this service is relocated to node &#039;&#039;lustre1&#039;&#039;, as show in the last &#039;&#039;clustat&#039;&#039; output.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bash-3.2# clustat&lt;br /&gt;
Cluster Status for Lustre @ Tue Dec 14 15:00:00 2010&lt;br /&gt;
Member Status: Quorate&lt;br /&gt;
&lt;br /&gt;
 Member Name                            ID   Status&lt;br /&gt;
 ------ ----                            ---- ------&lt;br /&gt;
 lustre1                                   1 Online, Local, rgmanager&lt;br /&gt;
 lustre2                                   2 Online, rgmanager&lt;br /&gt;
&lt;br /&gt;
 Service Name                   Owner (Last)                  State         &lt;br /&gt;
 ------- ----                   ----- ------                  -----         &lt;br /&gt;
 service:lustre_1               lustre1                       started       &lt;br /&gt;
 service:lustre_2               lustre2                       started       &lt;br /&gt;
bash-3.2# clusvcadm -r lustre_2  &lt;br /&gt;
Trying to relocate service:lustre_2...Success&lt;br /&gt;
service:lustre_2 is now running on ldk-2-2-eth2&lt;br /&gt;
bash-3.2# clustat&lt;br /&gt;
Cluster Status for Lustre @ Tue Dec 14 15:01:00 2010&lt;br /&gt;
Member Status: Quorate&lt;br /&gt;
&lt;br /&gt;
 Member Name                            ID   Status&lt;br /&gt;
 ------ ----                            ---- ------&lt;br /&gt;
 lustre1                                   1 Online, Local, rgmanager&lt;br /&gt;
 lustre2                                   2 Online, rgmanager&lt;br /&gt;
&lt;br /&gt;
 Service Name                   Owner (Last)                  State         &lt;br /&gt;
 ------- ----                   ----- ------                  -----         &lt;br /&gt;
 service:lustre_1               lustre1                       started       &lt;br /&gt;
 service:lustre_2               lustre1                       started       &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Other tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat cluster is a complex system of programs and services. There are a number of tools available to interact and/or make working with RedHat Cluster easier. In this section a number of these tools are presented. For more details read the man pages. &lt;br /&gt;
&lt;br /&gt;
; cman_tool : can be used to manage the cman subsystem. It can be used to add or remove nodes to a cluster configuration&lt;br /&gt;
; ccs_tool : may be used to update the configuration of the running cluster&lt;br /&gt;
; clustat : show the status of the cluster and if and where services are currently running&lt;br /&gt;
; clusvcadm : can be used to enable, disable or relocate services in a cluster &lt;br /&gt;
; system-config-cluster : a graphical user interface for cluster configuration&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12049</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12049"/>
		<updated>2010-12-14T14:13:16Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Start RedHat Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If yum is not set up correctly, the rpm packages and their dependencies need to be installed manually.&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
Next the nodes which form the cluster need to be specified. Each cluster node need to be specified separately wrapped in an surrounding &#039;&#039;clusternodes&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;clusternodes&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre1&amp;quot; nodeid=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre1-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre2&amp;quot; nodeid=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre2-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
  &amp;lt;/clusternodes&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each cluster node is given a name which must be it&#039;s hostname or IP address. Additionally a unique node ID needs to be specified. &lt;br /&gt;
The &#039;&#039;fence&#039;&#039; tag assigned to each node specifies a fence device to use to shut down this cluster node. The fence devices are defined elsewhere in &#039;&#039;cluster.conf&#039;&#039; (see below for details).&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
Fencing is essential to keep data on the Lustre file system consistent. Even with Multi-Mount-Protection enabled, fencing can make sure that a node in an unclear state is brought down for more analysis by the administrator.&lt;br /&gt;
&lt;br /&gt;
To configure fencing, first some fence daemon options need to be specified. the &#039;&#039;fence_daemon&#039;&#039; tag is a direct child of the &#039;&#039;cluster&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon clean_start=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Depending on the hardware configuration, these values may differ for different installations. Please see the notes in the cluster_schema_rhel5 document (linked above) for details.&lt;br /&gt;
&lt;br /&gt;
Each Lustre node in a cluster should be equipped with a fencing device. RedHat cluster supports a number of devices. More details on which devices are supported and how to configure them can be found in the cluster schema document.&lt;br /&gt;
For this example IPMI based fencing devices are used.&lt;br /&gt;
The &#039;&#039;fencedevices&#039;&#039; section may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fencedevices&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre1-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.1&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot; option=&amp;quot;off&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre2-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.2&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot; option=&amp;quot;off&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/fencedevices&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Every fence device has a number of attributes:&lt;br /&gt;
&#039;&#039;name&#039;&#039; is used to define a name for this fencing device. This name is referred to in the &#039;&#039;fence&#039;&#039; part of the &#039;&#039;clusternode&#039;&#039; definition (see above). The &#039;&#039;agent&#039;&#039; defines the kind of fencing device to use. In this example an IPMI-over-Lan device is used. The remaining attributes are specific for the &#039;&#039;ipmilan&#039;&#039; device and are self-explanatory.&lt;br /&gt;
&lt;br /&gt;
=== Resource Manager ===&lt;br /&gt;
&lt;br /&gt;
The resource manager block of the &#039;&#039;cluster.conf&#039;&#039; is wrapped in a &#039;&#039;rm&#039;&#039; tag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;rm&amp;gt;&lt;br /&gt;
    ..&lt;br /&gt;
  &amp;lt;/rm&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
It contains definitions of resources, failover domains, and services.&lt;br /&gt;
&lt;br /&gt;
==== Resources ====&lt;br /&gt;
In the &#039;&#039;resources&#039;&#039; block of the &#039;&#039;cluster.conf&#039;&#039; file all Lustre targets of both clustered nodes are specified. In this example, four Lustre object storage targets are defined:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;resources&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target1&amp;quot; mountpoint=&amp;quot;/mnt/ost1&amp;quot; device=&amp;quot;/path/to/ost1/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target2&amp;quot; mountpoint=&amp;quot;/mnt/ost2&amp;quot; device=&amp;quot;/path/to/ost2/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target3&amp;quot; mountpoint=&amp;quot;/mnt/ost3&amp;quot; device=&amp;quot;/path/to/ost3/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target4&amp;quot; mountpoint=&amp;quot;/mnt/ost4&amp;quot; device=&amp;quot;/path/to/ost4/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/resources&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use the &#039;&#039;lustrefs&#039;&#039; resource definition it is essential that the lustrefs.sh script is installed in &#039;&#039;/usr/share/cluster&#039;&#039; as described above. To verify the script is installed correctly and has correct permission run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/share/cluster/lustrefs.sh --help&lt;br /&gt;
usage: /usr/share/cluster/lustrefs.sh {start|stop|status|monitor|restart|meta-data|verify-all}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each &#039;&#039;lustrefs&#039;&#039; resource has a number of attributes. &#039;&#039;name&#039;&#039; defines how the resource can be addressed.&lt;br /&gt;
&lt;br /&gt;
==== Failover Domains ====&lt;br /&gt;
Usually RedHat cluster is used to provide a service on a number of nodes, where one node takes over the service of a failed node. In this example a number of Lustre targets is provided by each of the Lustre server nodes. To allow such a configuration, the definition of two Failover domains is necessary. The definition of &#039;&#039;failoverdomains&#039;&#039; may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;failoverdomains&amp;gt;&lt;br /&gt;
     &amp;lt;failoverdomain name=&amp;quot;first_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
      &amp;lt;failoverdomain name=&amp;quot;second_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;         &lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
    &amp;lt;/failoverdomains&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, two fail-over-domains are created by adding the same nodes to each fail-over-domain, but the nodes are assigned different priorities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Services ====&lt;br /&gt;
As a final configuration step the resources defined earlier are assigned to their fail-over-domain. This is done by defining a service for each of the Lustre nodes in the cluster and assign a domain. For the resources and fail-over-domains defined earlier this may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;first_first&amp;quot; name=&amp;quot;lustre_2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;second_first&amp;quot; name=&amp;quot;lustre_1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target4&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example &#039;&#039;target1&#039;&#039; and &#039;&#039;target2&#039;&#039; are assigned to the first node and &#039;&#039;target3&#039;&#039; and &#039;&#039;target4&#039;&#039; are assigned to the second node by default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Start RedHat Cluster ===&lt;br /&gt;
Before bringing up RedHat cluster, make sure &#039;&#039;cluster.conf&#039;&#039; is update/edited on both Lustre server nodes. Usually &#039;&#039;cluster.conf&#039;&#039; should be the same on both nodes. The only exception is, if the device paths differ on both nodes. &lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;cman&#039;&#039; service ====&lt;br /&gt;
&lt;br /&gt;
With &#039;&#039;cluster.conf&#039;&#039; in place of both nodes it&#039;s time to start the &#039;&#039;cman&#039;&#039; service.&lt;br /&gt;
this is done by running&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
service cman start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
on both clustered nodes. To verify &#039;&#039;cman&#039;&#039; is running &#039;&#039;clustat&#039;&#039; can be used:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bash-3.2# clustat &lt;br /&gt;
Cluster Status for Lustre @ Tue Dec 14 11:27:36 2010&lt;br /&gt;
Member Status: Quorate&lt;br /&gt;
&lt;br /&gt;
 Member Name                                      ID   Status&lt;br /&gt;
 ------ ----                                      ---- ------&lt;br /&gt;
 lustre1                                             1 Online, Local&lt;br /&gt;
 lustre2                                             2 Online&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To enable the &#039;&#039;cman&#039;&#039; service permanently run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chkconfig cman on&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;rgmanager&#039;&#039; service ====&lt;br /&gt;
With &#039;&#039;cman&#039;&#039; up and running it&#039;s time to start the resource group manager &#039;&#039;rgmanager&#039;&#039; by running&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
service rgmanager start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
rgmanager will than start to bring up the Lustre targets assigned to each of the Lustre nodes. &lt;br /&gt;
&lt;br /&gt;
==== Verifying RedHat Cluster ====&lt;br /&gt;
&lt;br /&gt;
To verify the state of the cluster run &#039;&#039;clustat&#039;&#039; again. With the above configuration the output should look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bash-3.2# clustat&lt;br /&gt;
Cluster Status for Lustre @ Tue Dec 14 13:12:07 2010&lt;br /&gt;
Member Status: Quorate&lt;br /&gt;
&lt;br /&gt;
 Member Name                                    ID   Status&lt;br /&gt;
 ------ ----                                    ---- ------&lt;br /&gt;
 lustre1                                           1 Online, Local, rgmanager&lt;br /&gt;
 lustre2                                           2 Online, rgmanager&lt;br /&gt;
&lt;br /&gt;
 Service Name                       Owner (Last)                       State         &lt;br /&gt;
 ------- ----                       ----- ------                       -----         &lt;br /&gt;
 service:lustre_1                   lustre1                            started       &lt;br /&gt;
 service:lustre_2                   lustre2                            started       &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Relocate services ===&lt;br /&gt;
It may be necessary to relocate running lustre services manually. This can be done using &lt;br /&gt;
&#039;&#039;clusvcadm&#039;&#039; as shown in the example below. First the service &#039;&#039;lustre_2&#039;&#039; is assigned to node &#039;&#039;lustre2&#039;&#039;. After calling &#039;&#039;clusvcadm -r lustre_2&#039;&#039; this service is relocated to node &#039;&#039;lustre1&#039;&#039;, as show in the last &#039;&#039;clustat&#039;&#039; output.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bash-3.2# clustat&lt;br /&gt;
Cluster Status for Lustre @ Tue Dec 14 15:00:00 2010&lt;br /&gt;
Member Status: Quorate&lt;br /&gt;
&lt;br /&gt;
 Member Name                            ID   Status&lt;br /&gt;
 ------ ----                            ---- ------&lt;br /&gt;
 lustre1                                   1 Online, Local, rgmanager&lt;br /&gt;
 lustre2                                   2 Online, rgmanager&lt;br /&gt;
&lt;br /&gt;
 Service Name                   Owner (Last)                  State         &lt;br /&gt;
 ------- ----                   ----- ------                  -----         &lt;br /&gt;
 service:lustre_1               lustre1                       started       &lt;br /&gt;
 service:lustre_2               lustre2                       started       &lt;br /&gt;
bash-3.2# clusvcadm -r lustre_2  &lt;br /&gt;
Trying to relocate service:lustre_2...Success&lt;br /&gt;
service:lustre_2 is now running on ldk-2-2-eth2&lt;br /&gt;
bash-3.2# clustat&lt;br /&gt;
Cluster Status for Lustre @ Tue Dec 14 15:01:00 2010&lt;br /&gt;
Member Status: Quorate&lt;br /&gt;
&lt;br /&gt;
 Member Name                            ID   Status&lt;br /&gt;
 ------ ----                            ---- ------&lt;br /&gt;
 lustre1                                   1 Online, Local, rgmanager&lt;br /&gt;
 lustre2                                   2 Online, rgmanager&lt;br /&gt;
&lt;br /&gt;
 Service Name                   Owner (Last)                  State         &lt;br /&gt;
 ------- ----                   ----- ------                  -----         &lt;br /&gt;
 service:lustre_1               lustre1                       started       &lt;br /&gt;
 service:lustre_2               lustre1                       started       &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Other tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat cluster is a complex system of programs and services. There are a number of tools available to interact and/or make working with RedHat Cluster easier. In this section a number of these tools are presented. For more details read the man pages. &lt;br /&gt;
&lt;br /&gt;
; cman_tool : can be used to manage the cman subsystem. It can be used to add or remove nodes to a cluster configuration&lt;br /&gt;
; ccs_tool : may be used to update the configuration of the running cluster&lt;br /&gt;
; clustat : show the status of the cluster and if and where services are currently running&lt;br /&gt;
; clusvcadm : can be used to enable, disable or relocate services in a cluster &lt;br /&gt;
; system-config-cluster : a graphical user interface for cluster configuration&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12048</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12048"/>
		<updated>2010-12-14T14:01:32Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Useful tools to use with RedHat Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If yum is not set up correctly, the rpm packages and their dependencies need to be installed manually.&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
Next the nodes which form the cluster need to be specified. Each cluster node need to be specified separately wrapped in an surrounding &#039;&#039;clusternodes&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;clusternodes&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre1&amp;quot; nodeid=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre1-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre2&amp;quot; nodeid=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre2-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
  &amp;lt;/clusternodes&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each cluster node is given a name which must be it&#039;s hostname or IP address. Additionally a unique node ID needs to be specified. &lt;br /&gt;
The &#039;&#039;fence&#039;&#039; tag assigned to each node specifies a fence device to use to shut down this cluster node. The fence devices are defined elsewhere in &#039;&#039;cluster.conf&#039;&#039; (see below for details).&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
Fencing is essential to keep data on the Lustre file system consistent. Even with Multi-Mount-Protection enabled, fencing can make sure that a node in an unclear state is brought down for more analysis by the administrator.&lt;br /&gt;
&lt;br /&gt;
To configure fencing, first some fence daemon options need to be specified. the &#039;&#039;fence_daemon&#039;&#039; tag is a direct child of the &#039;&#039;cluster&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon clean_start=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Depending on the hardware configuration, these values may differ for different installations. Please see the notes in the cluster_schema_rhel5 document (linked above) for details.&lt;br /&gt;
&lt;br /&gt;
Each Lustre node in a cluster should be equipped with a fencing device. RedHat cluster supports a number of devices. More details on which devices are supported and how to configure them can be found in the cluster schema document.&lt;br /&gt;
For this example IPMI based fencing devices are used.&lt;br /&gt;
The &#039;&#039;fencedevices&#039;&#039; section may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fencedevices&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre1-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.1&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot; option=&amp;quot;off&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre2-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.2&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot; option=&amp;quot;off&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/fencedevices&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Every fence device has a number of attributes:&lt;br /&gt;
&#039;&#039;name&#039;&#039; is used to define a name for this fencing device. This name is referred to in the &#039;&#039;fence&#039;&#039; part of the &#039;&#039;clusternode&#039;&#039; definition (see above). The &#039;&#039;agent&#039;&#039; defines the kind of fencing device to use. In this example an IPMI-over-Lan device is used. The remaining attributes are specific for the &#039;&#039;ipmilan&#039;&#039; device and are self-explanatory.&lt;br /&gt;
&lt;br /&gt;
=== Resource Manager ===&lt;br /&gt;
&lt;br /&gt;
The resource manager block of the &#039;&#039;cluster.conf&#039;&#039; is wrapped in a &#039;&#039;rm&#039;&#039; tag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;rm&amp;gt;&lt;br /&gt;
    ..&lt;br /&gt;
  &amp;lt;/rm&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
It contains definitions of resources, failover domains, and services.&lt;br /&gt;
&lt;br /&gt;
==== Resources ====&lt;br /&gt;
In the &#039;&#039;resources&#039;&#039; block of the &#039;&#039;cluster.conf&#039;&#039; file all Lustre targets of both clustered nodes are specified. In this example, four Lustre object storage targets are defined:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;resources&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target1&amp;quot; mountpoint=&amp;quot;/mnt/ost1&amp;quot; device=&amp;quot;/path/to/ost1/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target2&amp;quot; mountpoint=&amp;quot;/mnt/ost2&amp;quot; device=&amp;quot;/path/to/ost2/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target3&amp;quot; mountpoint=&amp;quot;/mnt/ost3&amp;quot; device=&amp;quot;/path/to/ost3/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target4&amp;quot; mountpoint=&amp;quot;/mnt/ost4&amp;quot; device=&amp;quot;/path/to/ost4/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/resources&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use the &#039;&#039;lustrefs&#039;&#039; resource definition it is essential that the lustrefs.sh script is installed in &#039;&#039;/usr/share/cluster&#039;&#039; as described above. To verify the script is installed correctly and has correct permission run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/share/cluster/lustrefs.sh --help&lt;br /&gt;
usage: /usr/share/cluster/lustrefs.sh {start|stop|status|monitor|restart|meta-data|verify-all}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each &#039;&#039;lustrefs&#039;&#039; resource has a number of attributes. &#039;&#039;name&#039;&#039; defines how the resource can be addressed.&lt;br /&gt;
&lt;br /&gt;
==== Failover Domains ====&lt;br /&gt;
Usually RedHat cluster is used to provide a service on a number of nodes, where one node takes over the service of a failed node. In this example a number of Lustre targets is provided by each of the Lustre server nodes. To allow such a configuration, the definition of two Failover domains is necessary. The definition of &#039;&#039;failoverdomains&#039;&#039; may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;failoverdomains&amp;gt;&lt;br /&gt;
     &amp;lt;failoverdomain name=&amp;quot;first_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
      &amp;lt;failoverdomain name=&amp;quot;second_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;         &lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
    &amp;lt;/failoverdomains&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, two fail-over-domains are created by adding the same nodes to each fail-over-domain, but the nodes are assigned different priorities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Services ====&lt;br /&gt;
As a final configuration step the resources defined earlier are assigned to their fail-over-domain. This is done by defining a service for each of the Lustre nodes in the cluster and assign a domain. For the resources and fail-over-domains defined earlier this may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;first_first&amp;quot; name=&amp;quot;lustre_2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;second_first&amp;quot; name=&amp;quot;lustre_1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target4&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example &#039;&#039;target1&#039;&#039; and &#039;&#039;target2&#039;&#039; are assigned to the first node and &#039;&#039;target3&#039;&#039; and &#039;&#039;target4&#039;&#039; are assigned to the second node by default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Start RedHat Cluster ===&lt;br /&gt;
Before bringing up RedHat cluster, make sure &#039;&#039;cluster.conf&#039;&#039; is update/edited on both Lustre server nodes. Usually &#039;&#039;cluster.conf&#039;&#039; should be the same on both nodes. The only exception is, if the device paths differ on both nodes. &lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;cman&#039;&#039; service ====&lt;br /&gt;
&lt;br /&gt;
With &#039;&#039;cluster.conf&#039;&#039; in place of both nodes it&#039;s time to start the &#039;&#039;cman&#039;&#039; service.&lt;br /&gt;
this is done by running&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
service cman start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
on both clustered nodes. To verify &#039;&#039;cman&#039;&#039; is running &#039;&#039;clustat&#039;&#039; can be used:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bash-3.2# clustat &lt;br /&gt;
Cluster Status for Lustre @ Tue Dec 14 11:27:36 2010&lt;br /&gt;
Member Status: Quorate&lt;br /&gt;
&lt;br /&gt;
 Member Name                                      ID   Status&lt;br /&gt;
 ------ ----                                      ---- ------&lt;br /&gt;
 lustre1                                             1 Online, Local&lt;br /&gt;
 lustre2                                             2 Online&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To enable the &#039;&#039;cman&#039;&#039; service permanently run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chkconfig cman on&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;rgmanager&#039;&#039; service ====&lt;br /&gt;
With &#039;&#039;cman&#039;&#039; up and running it&#039;s time to start the resource group manager &#039;&#039;rgmanager&#039;&#039; by running&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
service rgmanager start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
rgmanager will than start to bring up the Lustre targets assigned to each of the Lustre nodes. &lt;br /&gt;
&lt;br /&gt;
==== Verifying RedHat Cluster ====&lt;br /&gt;
&lt;br /&gt;
To verify the state of the cluster run &#039;&#039;clustat&#039;&#039; again. With the above configuration the output should look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bash-3.2# clustat&lt;br /&gt;
Cluster Status for Lustre @ Tue Dec 14 13:12:07 2010&lt;br /&gt;
Member Status: Quorate&lt;br /&gt;
&lt;br /&gt;
 Member Name                                    ID   Status&lt;br /&gt;
 ------ ----                                    ---- ------&lt;br /&gt;
 lustre1                                           1 Online, Local, rgmanager&lt;br /&gt;
 lustre2                                           2 Online, rgmanager&lt;br /&gt;
&lt;br /&gt;
 Service Name                       Owner (Last)                       State         &lt;br /&gt;
 ------- ----                       ----- ------                       -----         &lt;br /&gt;
 service:lustre_1                   lustre1                            started       &lt;br /&gt;
 service:lustre_2                   lustre2                            started       &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Other tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat cluster is a complex system of programs and services. There are a number of tools available to interact and/or make working with RedHat Cluster easier. In this section a number of these tools are presented. For more details read the man pages. &lt;br /&gt;
&lt;br /&gt;
; cman_tool : can be used to manage the cman subsystem. It can be used to add or remove nodes to a cluster configuration&lt;br /&gt;
; ccs_tool : may be used to update the configuration of the running cluster&lt;br /&gt;
; clustat : show the status of the cluster and if and where services are currently running&lt;br /&gt;
; clusvcadm : can be used to enable, disable or relocate services in a cluster &lt;br /&gt;
; system-config-cluster : a graphical user interface for cluster configuration&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12047</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12047"/>
		<updated>2010-12-14T13:58:32Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Useful tools to use with RedHat Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If yum is not set up correctly, the rpm packages and their dependencies need to be installed manually.&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
Next the nodes which form the cluster need to be specified. Each cluster node need to be specified separately wrapped in an surrounding &#039;&#039;clusternodes&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;clusternodes&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre1&amp;quot; nodeid=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre1-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre2&amp;quot; nodeid=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre2-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
  &amp;lt;/clusternodes&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each cluster node is given a name which must be it&#039;s hostname or IP address. Additionally a unique node ID needs to be specified. &lt;br /&gt;
The &#039;&#039;fence&#039;&#039; tag assigned to each node specifies a fence device to use to shut down this cluster node. The fence devices are defined elsewhere in &#039;&#039;cluster.conf&#039;&#039; (see below for details).&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
Fencing is essential to keep data on the Lustre file system consistent. Even with Multi-Mount-Protection enabled, fencing can make sure that a node in an unclear state is brought down for more analysis by the administrator.&lt;br /&gt;
&lt;br /&gt;
To configure fencing, first some fence daemon options need to be specified. the &#039;&#039;fence_daemon&#039;&#039; tag is a direct child of the &#039;&#039;cluster&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon clean_start=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Depending on the hardware configuration, these values may differ for different installations. Please see the notes in the cluster_schema_rhel5 document (linked above) for details.&lt;br /&gt;
&lt;br /&gt;
Each Lustre node in a cluster should be equipped with a fencing device. RedHat cluster supports a number of devices. More details on which devices are supported and how to configure them can be found in the cluster schema document.&lt;br /&gt;
For this example IPMI based fencing devices are used.&lt;br /&gt;
The &#039;&#039;fencedevices&#039;&#039; section may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fencedevices&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre1-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.1&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot; option=&amp;quot;off&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre2-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.2&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot; option=&amp;quot;off&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/fencedevices&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Every fence device has a number of attributes:&lt;br /&gt;
&#039;&#039;name&#039;&#039; is used to define a name for this fencing device. This name is referred to in the &#039;&#039;fence&#039;&#039; part of the &#039;&#039;clusternode&#039;&#039; definition (see above). The &#039;&#039;agent&#039;&#039; defines the kind of fencing device to use. In this example an IPMI-over-Lan device is used. The remaining attributes are specific for the &#039;&#039;ipmilan&#039;&#039; device and are self-explanatory.&lt;br /&gt;
&lt;br /&gt;
=== Resource Manager ===&lt;br /&gt;
&lt;br /&gt;
The resource manager block of the &#039;&#039;cluster.conf&#039;&#039; is wrapped in a &#039;&#039;rm&#039;&#039; tag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;rm&amp;gt;&lt;br /&gt;
    ..&lt;br /&gt;
  &amp;lt;/rm&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
It contains definitions of resources, failover domains, and services.&lt;br /&gt;
&lt;br /&gt;
==== Resources ====&lt;br /&gt;
In the &#039;&#039;resources&#039;&#039; block of the &#039;&#039;cluster.conf&#039;&#039; file all Lustre targets of both clustered nodes are specified. In this example, four Lustre object storage targets are defined:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;resources&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target1&amp;quot; mountpoint=&amp;quot;/mnt/ost1&amp;quot; device=&amp;quot;/path/to/ost1/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target2&amp;quot; mountpoint=&amp;quot;/mnt/ost2&amp;quot; device=&amp;quot;/path/to/ost2/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target3&amp;quot; mountpoint=&amp;quot;/mnt/ost3&amp;quot; device=&amp;quot;/path/to/ost3/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target4&amp;quot; mountpoint=&amp;quot;/mnt/ost4&amp;quot; device=&amp;quot;/path/to/ost4/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/resources&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use the &#039;&#039;lustrefs&#039;&#039; resource definition it is essential that the lustrefs.sh script is installed in &#039;&#039;/usr/share/cluster&#039;&#039; as described above. To verify the script is installed correctly and has correct permission run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/share/cluster/lustrefs.sh --help&lt;br /&gt;
usage: /usr/share/cluster/lustrefs.sh {start|stop|status|monitor|restart|meta-data|verify-all}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each &#039;&#039;lustrefs&#039;&#039; resource has a number of attributes. &#039;&#039;name&#039;&#039; defines how the resource can be addressed.&lt;br /&gt;
&lt;br /&gt;
==== Failover Domains ====&lt;br /&gt;
Usually RedHat cluster is used to provide a service on a number of nodes, where one node takes over the service of a failed node. In this example a number of Lustre targets is provided by each of the Lustre server nodes. To allow such a configuration, the definition of two Failover domains is necessary. The definition of &#039;&#039;failoverdomains&#039;&#039; may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;failoverdomains&amp;gt;&lt;br /&gt;
     &amp;lt;failoverdomain name=&amp;quot;first_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
      &amp;lt;failoverdomain name=&amp;quot;second_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;         &lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
    &amp;lt;/failoverdomains&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, two fail-over-domains are created by adding the same nodes to each fail-over-domain, but the nodes are assigned different priorities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Services ====&lt;br /&gt;
As a final configuration step the resources defined earlier are assigned to their fail-over-domain. This is done by defining a service for each of the Lustre nodes in the cluster and assign a domain. For the resources and fail-over-domains defined earlier this may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;first_first&amp;quot; name=&amp;quot;lustre_2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;second_first&amp;quot; name=&amp;quot;lustre_1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target4&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example &#039;&#039;target1&#039;&#039; and &#039;&#039;target2&#039;&#039; are assigned to the first node and &#039;&#039;target3&#039;&#039; and &#039;&#039;target4&#039;&#039; are assigned to the second node by default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Start RedHat Cluster ===&lt;br /&gt;
Before bringing up RedHat cluster, make sure &#039;&#039;cluster.conf&#039;&#039; is update/edited on both Lustre server nodes. Usually &#039;&#039;cluster.conf&#039;&#039; should be the same on both nodes. The only exception is, if the device paths differ on both nodes. &lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;cman&#039;&#039; service ====&lt;br /&gt;
&lt;br /&gt;
With &#039;&#039;cluster.conf&#039;&#039; in place of both nodes it&#039;s time to start the &#039;&#039;cman&#039;&#039; service.&lt;br /&gt;
this is done by running&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
service cman start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
on both clustered nodes. To verify &#039;&#039;cman&#039;&#039; is running &#039;&#039;clustat&#039;&#039; can be used:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bash-3.2# clustat &lt;br /&gt;
Cluster Status for Lustre @ Tue Dec 14 11:27:36 2010&lt;br /&gt;
Member Status: Quorate&lt;br /&gt;
&lt;br /&gt;
 Member Name                                      ID   Status&lt;br /&gt;
 ------ ----                                      ---- ------&lt;br /&gt;
 lustre1                                             1 Online, Local&lt;br /&gt;
 lustre2                                             2 Online&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To enable the &#039;&#039;cman&#039;&#039; service permanently run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chkconfig cman on&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;rgmanager&#039;&#039; service ====&lt;br /&gt;
With &#039;&#039;cman&#039;&#039; up and running it&#039;s time to start the resource group manager &#039;&#039;rgmanager&#039;&#039; by running&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
service rgmanager start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
rgmanager will than start to bring up the Lustre targets assigned to each of the Lustre nodes. &lt;br /&gt;
&lt;br /&gt;
==== Verifying RedHat Cluster ====&lt;br /&gt;
&lt;br /&gt;
To verify the state of the cluster run &#039;&#039;clustat&#039;&#039; again. With the above configuration the output should look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bash-3.2# clustat&lt;br /&gt;
Cluster Status for Lustre @ Tue Dec 14 13:12:07 2010&lt;br /&gt;
Member Status: Quorate&lt;br /&gt;
&lt;br /&gt;
 Member Name                                    ID   Status&lt;br /&gt;
 ------ ----                                    ---- ------&lt;br /&gt;
 lustre1                                           1 Online, Local, rgmanager&lt;br /&gt;
 lustre2                                           2 Online, rgmanager&lt;br /&gt;
&lt;br /&gt;
 Service Name                       Owner (Last)                       State         &lt;br /&gt;
 ------- ----                       ----- ------                       -----         &lt;br /&gt;
 service:lustre_1                   lustre1                            started       &lt;br /&gt;
 service:lustre_2                   lustre2                            started       &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Useful tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat cluster is a complex system of programs and services. There are a number of tools available to interact and/or make working with RedHat Cluster easier. In this section a number of these tools are presented. For more details read the man pages. &lt;br /&gt;
&lt;br /&gt;
; cman_tool : can be used to manage the cman subsystem. It can be used to add or remove nodes to a cluster configuration&lt;br /&gt;
; ccs_tool : may be used to update the configuration of the running cluster&lt;br /&gt;
; clustat : show the status of the cluster and if and where services are currently running&lt;br /&gt;
; clusvcadm : can be used to enable, disable or relocate services in a cluster &lt;br /&gt;
; system-config-cluster : a graphical user interface for cluster configuration&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12046</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12046"/>
		<updated>2010-12-14T13:32:53Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Useful tools to use with RedHat Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If yum is not set up correctly, the rpm packages and their dependencies need to be installed manually.&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
Next the nodes which form the cluster need to be specified. Each cluster node need to be specified separately wrapped in an surrounding &#039;&#039;clusternodes&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;clusternodes&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre1&amp;quot; nodeid=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre1-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre2&amp;quot; nodeid=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre2-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
  &amp;lt;/clusternodes&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each cluster node is given a name which must be it&#039;s hostname or IP address. Additionally a unique node ID needs to be specified. &lt;br /&gt;
The &#039;&#039;fence&#039;&#039; tag assigned to each node specifies a fence device to use to shut down this cluster node. The fence devices are defined elsewhere in &#039;&#039;cluster.conf&#039;&#039; (see below for details).&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
Fencing is essential to keep data on the Lustre file system consistent. Even with Multi-Mount-Protection enabled, fencing can make sure that a node in an unclear state is brought down for more analysis by the administrator.&lt;br /&gt;
&lt;br /&gt;
To configure fencing, first some fence daemon options need to be specified. the &#039;&#039;fence_daemon&#039;&#039; tag is a direct child of the &#039;&#039;cluster&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon clean_start=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Depending on the hardware configuration, these values may differ for different installations. Please see the notes in the cluster_schema_rhel5 document (linked above) for details.&lt;br /&gt;
&lt;br /&gt;
Each Lustre node in a cluster should be equipped with a fencing device. RedHat cluster supports a number of devices. More details on which devices are supported and how to configure them can be found in the cluster schema document.&lt;br /&gt;
For this example IPMI based fencing devices are used.&lt;br /&gt;
The &#039;&#039;fencedevices&#039;&#039; section may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fencedevices&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre1-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.1&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot; option=&amp;quot;off&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre2-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.2&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot; option=&amp;quot;off&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/fencedevices&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Every fence device has a number of attributes:&lt;br /&gt;
&#039;&#039;name&#039;&#039; is used to define a name for this fencing device. This name is referred to in the &#039;&#039;fence&#039;&#039; part of the &#039;&#039;clusternode&#039;&#039; definition (see above). The &#039;&#039;agent&#039;&#039; defines the kind of fencing device to use. In this example an IPMI-over-Lan device is used. The remaining attributes are specific for the &#039;&#039;ipmilan&#039;&#039; device and are self-explanatory.&lt;br /&gt;
&lt;br /&gt;
=== Resource Manager ===&lt;br /&gt;
&lt;br /&gt;
The resource manager block of the &#039;&#039;cluster.conf&#039;&#039; is wrapped in a &#039;&#039;rm&#039;&#039; tag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;rm&amp;gt;&lt;br /&gt;
    ..&lt;br /&gt;
  &amp;lt;/rm&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
It contains definitions of resources, failover domains, and services.&lt;br /&gt;
&lt;br /&gt;
==== Resources ====&lt;br /&gt;
In the &#039;&#039;resources&#039;&#039; block of the &#039;&#039;cluster.conf&#039;&#039; file all Lustre targets of both clustered nodes are specified. In this example, four Lustre object storage targets are defined:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;resources&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target1&amp;quot; mountpoint=&amp;quot;/mnt/ost1&amp;quot; device=&amp;quot;/path/to/ost1/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target2&amp;quot; mountpoint=&amp;quot;/mnt/ost2&amp;quot; device=&amp;quot;/path/to/ost2/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target3&amp;quot; mountpoint=&amp;quot;/mnt/ost3&amp;quot; device=&amp;quot;/path/to/ost3/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target4&amp;quot; mountpoint=&amp;quot;/mnt/ost4&amp;quot; device=&amp;quot;/path/to/ost4/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/resources&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use the &#039;&#039;lustrefs&#039;&#039; resource definition it is essential that the lustrefs.sh script is installed in &#039;&#039;/usr/share/cluster&#039;&#039; as described above. To verify the script is installed correctly and has correct permission run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/share/cluster/lustrefs.sh --help&lt;br /&gt;
usage: /usr/share/cluster/lustrefs.sh {start|stop|status|monitor|restart|meta-data|verify-all}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each &#039;&#039;lustrefs&#039;&#039; resource has a number of attributes. &#039;&#039;name&#039;&#039; defines how the resource can be addressed.&lt;br /&gt;
&lt;br /&gt;
==== Failover Domains ====&lt;br /&gt;
Usually RedHat cluster is used to provide a service on a number of nodes, where one node takes over the service of a failed node. In this example a number of Lustre targets is provided by each of the Lustre server nodes. To allow such a configuration, the definition of two Failover domains is necessary. The definition of &#039;&#039;failoverdomains&#039;&#039; may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;failoverdomains&amp;gt;&lt;br /&gt;
     &amp;lt;failoverdomain name=&amp;quot;first_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
      &amp;lt;failoverdomain name=&amp;quot;second_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;         &lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
    &amp;lt;/failoverdomains&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, two fail-over-domains are created by adding the same nodes to each fail-over-domain, but the nodes are assigned different priorities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Services ====&lt;br /&gt;
As a final configuration step the resources defined earlier are assigned to their fail-over-domain. This is done by defining a service for each of the Lustre nodes in the cluster and assign a domain. For the resources and fail-over-domains defined earlier this may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;first_first&amp;quot; name=&amp;quot;lustre_2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;second_first&amp;quot; name=&amp;quot;lustre_1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target4&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example &#039;&#039;target1&#039;&#039; and &#039;&#039;target2&#039;&#039; are assigned to the first node and &#039;&#039;target3&#039;&#039; and &#039;&#039;target4&#039;&#039; are assigned to the second node by default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Start RedHat Cluster ===&lt;br /&gt;
Before bringing up RedHat cluster, make sure &#039;&#039;cluster.conf&#039;&#039; is update/edited on both Lustre server nodes. Usually &#039;&#039;cluster.conf&#039;&#039; should be the same on both nodes. The only exception is, if the device paths differ on both nodes. &lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;cman&#039;&#039; service ====&lt;br /&gt;
&lt;br /&gt;
With &#039;&#039;cluster.conf&#039;&#039; in place of both nodes it&#039;s time to start the &#039;&#039;cman&#039;&#039; service.&lt;br /&gt;
this is done by running&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
service cman start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
on both clustered nodes. To verify &#039;&#039;cman&#039;&#039; is running &#039;&#039;clustat&#039;&#039; can be used:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bash-3.2# clustat &lt;br /&gt;
Cluster Status for Lustre @ Tue Dec 14 11:27:36 2010&lt;br /&gt;
Member Status: Quorate&lt;br /&gt;
&lt;br /&gt;
 Member Name                                      ID   Status&lt;br /&gt;
 ------ ----                                      ---- ------&lt;br /&gt;
 lustre1                                             1 Online, Local&lt;br /&gt;
 lustre2                                             2 Online&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To enable the &#039;&#039;cman&#039;&#039; service permanently run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chkconfig cman on&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;rgmanager&#039;&#039; service ====&lt;br /&gt;
With &#039;&#039;cman&#039;&#039; up and running it&#039;s time to start the resource group manager &#039;&#039;rgmanager&#039;&#039; by running&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
service rgmanager start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
rgmanager will than start to bring up the Lustre targets assigned to each of the Lustre nodes. &lt;br /&gt;
&lt;br /&gt;
==== Verifying RedHat Cluster ====&lt;br /&gt;
&lt;br /&gt;
To verify the state of the cluster run &#039;&#039;clustat&#039;&#039; again. With the above configuration the output should look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bash-3.2# clustat&lt;br /&gt;
Cluster Status for Lustre @ Tue Dec 14 13:12:07 2010&lt;br /&gt;
Member Status: Quorate&lt;br /&gt;
&lt;br /&gt;
 Member Name                                    ID   Status&lt;br /&gt;
 ------ ----                                    ---- ------&lt;br /&gt;
 lustre1                                           1 Online, Local, rgmanager&lt;br /&gt;
 lustre2                                           2 Online, rgmanager&lt;br /&gt;
&lt;br /&gt;
 Service Name                       Owner (Last)                       State         &lt;br /&gt;
 ------- ----                       ----- ------                       -----         &lt;br /&gt;
 service:lustre_1                   lustre1                            started       &lt;br /&gt;
 service:lustre_2                   lustre2                            started       &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Useful tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat cluster is a complex system of programs and services. There are a number of tools available to interact and/or make working with RedHat Cluster easier. In this section a number of these tools are presented. For more details read the man pages. &lt;br /&gt;
&lt;br /&gt;
; cman_tool : can be used to manage the cman subsystem. It can be used to add or remove nodes to a cluster configuration&lt;br /&gt;
; ccs_tool : &lt;br /&gt;
; clustat : &lt;br /&gt;
; clusvcadm : &lt;br /&gt;
; system-config-cluster :&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12045</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12045"/>
		<updated>2010-12-14T13:29:36Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* cman_tool */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If yum is not set up correctly, the rpm packages and their dependencies need to be installed manually.&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
Next the nodes which form the cluster need to be specified. Each cluster node need to be specified separately wrapped in an surrounding &#039;&#039;clusternodes&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;clusternodes&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre1&amp;quot; nodeid=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre1-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre2&amp;quot; nodeid=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre2-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
  &amp;lt;/clusternodes&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each cluster node is given a name which must be it&#039;s hostname or IP address. Additionally a unique node ID needs to be specified. &lt;br /&gt;
The &#039;&#039;fence&#039;&#039; tag assigned to each node specifies a fence device to use to shut down this cluster node. The fence devices are defined elsewhere in &#039;&#039;cluster.conf&#039;&#039; (see below for details).&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
Fencing is essential to keep data on the Lustre file system consistent. Even with Multi-Mount-Protection enabled, fencing can make sure that a node in an unclear state is brought down for more analysis by the administrator.&lt;br /&gt;
&lt;br /&gt;
To configure fencing, first some fence daemon options need to be specified. the &#039;&#039;fence_daemon&#039;&#039; tag is a direct child of the &#039;&#039;cluster&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon clean_start=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Depending on the hardware configuration, these values may differ for different installations. Please see the notes in the cluster_schema_rhel5 document (linked above) for details.&lt;br /&gt;
&lt;br /&gt;
Each Lustre node in a cluster should be equipped with a fencing device. RedHat cluster supports a number of devices. More details on which devices are supported and how to configure them can be found in the cluster schema document.&lt;br /&gt;
For this example IPMI based fencing devices are used.&lt;br /&gt;
The &#039;&#039;fencedevices&#039;&#039; section may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fencedevices&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre1-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.1&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot; option=&amp;quot;off&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre2-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.2&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot; option=&amp;quot;off&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/fencedevices&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Every fence device has a number of attributes:&lt;br /&gt;
&#039;&#039;name&#039;&#039; is used to define a name for this fencing device. This name is referred to in the &#039;&#039;fence&#039;&#039; part of the &#039;&#039;clusternode&#039;&#039; definition (see above). The &#039;&#039;agent&#039;&#039; defines the kind of fencing device to use. In this example an IPMI-over-Lan device is used. The remaining attributes are specific for the &#039;&#039;ipmilan&#039;&#039; device and are self-explanatory.&lt;br /&gt;
&lt;br /&gt;
=== Resource Manager ===&lt;br /&gt;
&lt;br /&gt;
The resource manager block of the &#039;&#039;cluster.conf&#039;&#039; is wrapped in a &#039;&#039;rm&#039;&#039; tag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;rm&amp;gt;&lt;br /&gt;
    ..&lt;br /&gt;
  &amp;lt;/rm&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
It contains definitions of resources, failover domains, and services.&lt;br /&gt;
&lt;br /&gt;
==== Resources ====&lt;br /&gt;
In the &#039;&#039;resources&#039;&#039; block of the &#039;&#039;cluster.conf&#039;&#039; file all Lustre targets of both clustered nodes are specified. In this example, four Lustre object storage targets are defined:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;resources&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target1&amp;quot; mountpoint=&amp;quot;/mnt/ost1&amp;quot; device=&amp;quot;/path/to/ost1/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target2&amp;quot; mountpoint=&amp;quot;/mnt/ost2&amp;quot; device=&amp;quot;/path/to/ost2/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target3&amp;quot; mountpoint=&amp;quot;/mnt/ost3&amp;quot; device=&amp;quot;/path/to/ost3/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target4&amp;quot; mountpoint=&amp;quot;/mnt/ost4&amp;quot; device=&amp;quot;/path/to/ost4/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/resources&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use the &#039;&#039;lustrefs&#039;&#039; resource definition it is essential that the lustrefs.sh script is installed in &#039;&#039;/usr/share/cluster&#039;&#039; as described above. To verify the script is installed correctly and has correct permission run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/share/cluster/lustrefs.sh --help&lt;br /&gt;
usage: /usr/share/cluster/lustrefs.sh {start|stop|status|monitor|restart|meta-data|verify-all}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each &#039;&#039;lustrefs&#039;&#039; resource has a number of attributes. &#039;&#039;name&#039;&#039; defines how the resource can be addressed.&lt;br /&gt;
&lt;br /&gt;
==== Failover Domains ====&lt;br /&gt;
Usually RedHat cluster is used to provide a service on a number of nodes, where one node takes over the service of a failed node. In this example a number of Lustre targets is provided by each of the Lustre server nodes. To allow such a configuration, the definition of two Failover domains is necessary. The definition of &#039;&#039;failoverdomains&#039;&#039; may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;failoverdomains&amp;gt;&lt;br /&gt;
     &amp;lt;failoverdomain name=&amp;quot;first_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
      &amp;lt;failoverdomain name=&amp;quot;second_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;         &lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
    &amp;lt;/failoverdomains&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, two fail-over-domains are created by adding the same nodes to each fail-over-domain, but the nodes are assigned different priorities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Services ====&lt;br /&gt;
As a final configuration step the resources defined earlier are assigned to their fail-over-domain. This is done by defining a service for each of the Lustre nodes in the cluster and assign a domain. For the resources and fail-over-domains defined earlier this may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;first_first&amp;quot; name=&amp;quot;lustre_2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;second_first&amp;quot; name=&amp;quot;lustre_1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target4&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example &#039;&#039;target1&#039;&#039; and &#039;&#039;target2&#039;&#039; are assigned to the first node and &#039;&#039;target3&#039;&#039; and &#039;&#039;target4&#039;&#039; are assigned to the second node by default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Start RedHat Cluster ===&lt;br /&gt;
Before bringing up RedHat cluster, make sure &#039;&#039;cluster.conf&#039;&#039; is update/edited on both Lustre server nodes. Usually &#039;&#039;cluster.conf&#039;&#039; should be the same on both nodes. The only exception is, if the device paths differ on both nodes. &lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;cman&#039;&#039; service ====&lt;br /&gt;
&lt;br /&gt;
With &#039;&#039;cluster.conf&#039;&#039; in place of both nodes it&#039;s time to start the &#039;&#039;cman&#039;&#039; service.&lt;br /&gt;
this is done by running&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
service cman start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
on both clustered nodes. To verify &#039;&#039;cman&#039;&#039; is running &#039;&#039;clustat&#039;&#039; can be used:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bash-3.2# clustat &lt;br /&gt;
Cluster Status for Lustre @ Tue Dec 14 11:27:36 2010&lt;br /&gt;
Member Status: Quorate&lt;br /&gt;
&lt;br /&gt;
 Member Name                                      ID   Status&lt;br /&gt;
 ------ ----                                      ---- ------&lt;br /&gt;
 lustre1                                             1 Online, Local&lt;br /&gt;
 lustre2                                             2 Online&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To enable the &#039;&#039;cman&#039;&#039; service permanently run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chkconfig cman on&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;rgmanager&#039;&#039; service ====&lt;br /&gt;
With &#039;&#039;cman&#039;&#039; up and running it&#039;s time to start the resource group manager &#039;&#039;rgmanager&#039;&#039; by running&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
service rgmanager start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
rgmanager will than start to bring up the Lustre targets assigned to each of the Lustre nodes. &lt;br /&gt;
&lt;br /&gt;
==== Verifying RedHat Cluster ====&lt;br /&gt;
&lt;br /&gt;
To verify the state of the cluster run &#039;&#039;clustat&#039;&#039; again. With the above configuration the output should look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bash-3.2# clustat&lt;br /&gt;
Cluster Status for Lustre @ Tue Dec 14 13:12:07 2010&lt;br /&gt;
Member Status: Quorate&lt;br /&gt;
&lt;br /&gt;
 Member Name                                    ID   Status&lt;br /&gt;
 ------ ----                                    ---- ------&lt;br /&gt;
 lustre1                                           1 Online, Local, rgmanager&lt;br /&gt;
 lustre2                                           2 Online, rgmanager&lt;br /&gt;
&lt;br /&gt;
 Service Name                       Owner (Last)                       State         &lt;br /&gt;
 ------- ----                       ----- ------                       -----         &lt;br /&gt;
 service:lustre_1                   lustre1                            started       &lt;br /&gt;
 service:lustre_2                   lustre2                            started       &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Useful tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat cluster is a complex system of programs and services. There are a number of tools available to interact and/or make working with RedHat Cluster easier. In this section a number of these tools are presented. For more details read the man pages. &lt;br /&gt;
&lt;br /&gt;
=== cman_tool ===&lt;br /&gt;
&lt;br /&gt;
cman_tool can be used to manage the cman subsystem. It can be used to add or remove nodes to a cluster configuration&lt;br /&gt;
&lt;br /&gt;
=== ccs_tool ===&lt;br /&gt;
&lt;br /&gt;
=== clustat ===&lt;br /&gt;
&lt;br /&gt;
=== clusvcadm ===&lt;br /&gt;
&lt;br /&gt;
=== system-config-cluster ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12044</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12044"/>
		<updated>2010-12-14T12:14:55Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Start RedHat Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If yum is not set up correctly, the rpm packages and their dependencies need to be installed manually.&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
Next the nodes which form the cluster need to be specified. Each cluster node need to be specified separately wrapped in an surrounding &#039;&#039;clusternodes&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;clusternodes&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre1&amp;quot; nodeid=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre1-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre2&amp;quot; nodeid=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre2-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
  &amp;lt;/clusternodes&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each cluster node is given a name which must be it&#039;s hostname or IP address. Additionally a unique node ID needs to be specified. &lt;br /&gt;
The &#039;&#039;fence&#039;&#039; tag assigned to each node specifies a fence device to use to shut down this cluster node. The fence devices are defined elsewhere in &#039;&#039;cluster.conf&#039;&#039; (see below for details).&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
Fencing is essential to keep data on the Lustre file system consistent. Even with Multi-Mount-Protection enabled, fencing can make sure that a node in an unclear state is brought down for more analysis by the administrator.&lt;br /&gt;
&lt;br /&gt;
To configure fencing, first some fence daemon options need to be specified. the &#039;&#039;fence_daemon&#039;&#039; tag is a direct child of the &#039;&#039;cluster&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon clean_start=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Depending on the hardware configuration, these values may differ for different installations. Please see the notes in the cluster_schema_rhel5 document (linked above) for details.&lt;br /&gt;
&lt;br /&gt;
Each Lustre node in a cluster should be equipped with a fencing device. RedHat cluster supports a number of devices. More details on which devices are supported and how to configure them can be found in the cluster schema document.&lt;br /&gt;
For this example IPMI based fencing devices are used.&lt;br /&gt;
The &#039;&#039;fencedevices&#039;&#039; section may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fencedevices&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre1-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.1&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot; option=&amp;quot;off&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre2-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.2&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot; option=&amp;quot;off&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/fencedevices&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Every fence device has a number of attributes:&lt;br /&gt;
&#039;&#039;name&#039;&#039; is used to define a name for this fencing device. This name is referred to in the &#039;&#039;fence&#039;&#039; part of the &#039;&#039;clusternode&#039;&#039; definition (see above). The &#039;&#039;agent&#039;&#039; defines the kind of fencing device to use. In this example an IPMI-over-Lan device is used. The remaining attributes are specific for the &#039;&#039;ipmilan&#039;&#039; device and are self-explanatory.&lt;br /&gt;
&lt;br /&gt;
=== Resource Manager ===&lt;br /&gt;
&lt;br /&gt;
The resource manager block of the &#039;&#039;cluster.conf&#039;&#039; is wrapped in a &#039;&#039;rm&#039;&#039; tag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;rm&amp;gt;&lt;br /&gt;
    ..&lt;br /&gt;
  &amp;lt;/rm&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
It contains definitions of resources, failover domains, and services.&lt;br /&gt;
&lt;br /&gt;
==== Resources ====&lt;br /&gt;
In the &#039;&#039;resources&#039;&#039; block of the &#039;&#039;cluster.conf&#039;&#039; file all Lustre targets of both clustered nodes are specified. In this example, four Lustre object storage targets are defined:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;resources&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target1&amp;quot; mountpoint=&amp;quot;/mnt/ost1&amp;quot; device=&amp;quot;/path/to/ost1/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target2&amp;quot; mountpoint=&amp;quot;/mnt/ost2&amp;quot; device=&amp;quot;/path/to/ost2/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target3&amp;quot; mountpoint=&amp;quot;/mnt/ost3&amp;quot; device=&amp;quot;/path/to/ost3/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target4&amp;quot; mountpoint=&amp;quot;/mnt/ost4&amp;quot; device=&amp;quot;/path/to/ost4/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/resources&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use the &#039;&#039;lustrefs&#039;&#039; resource definition it is essential that the lustrefs.sh script is installed in &#039;&#039;/usr/share/cluster&#039;&#039; as described above. To verify the script is installed correctly and has correct permission run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/share/cluster/lustrefs.sh --help&lt;br /&gt;
usage: /usr/share/cluster/lustrefs.sh {start|stop|status|monitor|restart|meta-data|verify-all}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each &#039;&#039;lustrefs&#039;&#039; resource has a number of attributes. &#039;&#039;name&#039;&#039; defines how the resource can be addressed.&lt;br /&gt;
&lt;br /&gt;
==== Failover Domains ====&lt;br /&gt;
Usually RedHat cluster is used to provide a service on a number of nodes, where one node takes over the service of a failed node. In this example a number of Lustre targets is provided by each of the Lustre server nodes. To allow such a configuration, the definition of two Failover domains is necessary. The definition of &#039;&#039;failoverdomains&#039;&#039; may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;failoverdomains&amp;gt;&lt;br /&gt;
     &amp;lt;failoverdomain name=&amp;quot;first_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
      &amp;lt;failoverdomain name=&amp;quot;second_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;         &lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
    &amp;lt;/failoverdomains&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, two fail-over-domains are created by adding the same nodes to each fail-over-domain, but the nodes are assigned different priorities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Services ====&lt;br /&gt;
As a final configuration step the resources defined earlier are assigned to their fail-over-domain. This is done by defining a service for each of the Lustre nodes in the cluster and assign a domain. For the resources and fail-over-domains defined earlier this may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;first_first&amp;quot; name=&amp;quot;lustre_2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;second_first&amp;quot; name=&amp;quot;lustre_1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target4&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example &#039;&#039;target1&#039;&#039; and &#039;&#039;target2&#039;&#039; are assigned to the first node and &#039;&#039;target3&#039;&#039; and &#039;&#039;target4&#039;&#039; are assigned to the second node by default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Start RedHat Cluster ===&lt;br /&gt;
Before bringing up RedHat cluster, make sure &#039;&#039;cluster.conf&#039;&#039; is update/edited on both Lustre server nodes. Usually &#039;&#039;cluster.conf&#039;&#039; should be the same on both nodes. The only exception is, if the device paths differ on both nodes. &lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;cman&#039;&#039; service ====&lt;br /&gt;
&lt;br /&gt;
With &#039;&#039;cluster.conf&#039;&#039; in place of both nodes it&#039;s time to start the &#039;&#039;cman&#039;&#039; service.&lt;br /&gt;
this is done by running&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
service cman start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
on both clustered nodes. To verify &#039;&#039;cman&#039;&#039; is running &#039;&#039;clustat&#039;&#039; can be used:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bash-3.2# clustat &lt;br /&gt;
Cluster Status for Lustre @ Tue Dec 14 11:27:36 2010&lt;br /&gt;
Member Status: Quorate&lt;br /&gt;
&lt;br /&gt;
 Member Name                                      ID   Status&lt;br /&gt;
 ------ ----                                      ---- ------&lt;br /&gt;
 lustre1                                             1 Online, Local&lt;br /&gt;
 lustre2                                             2 Online&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To enable the &#039;&#039;cman&#039;&#039; service permanently run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chkconfig cman on&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;rgmanager&#039;&#039; service ====&lt;br /&gt;
With &#039;&#039;cman&#039;&#039; up and running it&#039;s time to start the resource group manager &#039;&#039;rgmanager&#039;&#039; by running&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
service rgmanager start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
rgmanager will than start to bring up the Lustre targets assigned to each of the Lustre nodes. &lt;br /&gt;
&lt;br /&gt;
==== Verifying RedHat Cluster ====&lt;br /&gt;
&lt;br /&gt;
To verify the state of the cluster run &#039;&#039;clustat&#039;&#039; again. With the above configuration the output should look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bash-3.2# clustat&lt;br /&gt;
Cluster Status for Lustre @ Tue Dec 14 13:12:07 2010&lt;br /&gt;
Member Status: Quorate&lt;br /&gt;
&lt;br /&gt;
 Member Name                                    ID   Status&lt;br /&gt;
 ------ ----                                    ---- ------&lt;br /&gt;
 lustre1                                           1 Online, Local, rgmanager&lt;br /&gt;
 lustre2                                           2 Online, rgmanager&lt;br /&gt;
&lt;br /&gt;
 Service Name                       Owner (Last)                       State         &lt;br /&gt;
 ------- ----                       ----- ------                       -----         &lt;br /&gt;
 service:lustre_1                   lustre1                            started       &lt;br /&gt;
 service:lustre_2                   lustre2                            started       &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Useful tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat cluster is a complex system of programs and services. There are a number of tools available to interact and/or make working with RedHat Cluster easier. In this section a number of these tools are presented. For more details read the man pages. &lt;br /&gt;
&lt;br /&gt;
=== cman_tool ===&lt;br /&gt;
&lt;br /&gt;
=== ccs_tool ===&lt;br /&gt;
&lt;br /&gt;
=== clustat ===&lt;br /&gt;
&lt;br /&gt;
=== clusvcadm ===&lt;br /&gt;
&lt;br /&gt;
=== system-config-cluster ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12043</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12043"/>
		<updated>2010-12-14T10:30:18Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Start RedHat Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If yum is not set up correctly, the rpm packages and their dependencies need to be installed manually.&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
Next the nodes which form the cluster need to be specified. Each cluster node need to be specified separately wrapped in an surrounding &#039;&#039;clusternodes&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;clusternodes&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre1&amp;quot; nodeid=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre1-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre2&amp;quot; nodeid=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre2-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
  &amp;lt;/clusternodes&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each cluster node is given a name which must be it&#039;s hostname or IP address. Additionally a unique node ID needs to be specified. &lt;br /&gt;
The &#039;&#039;fence&#039;&#039; tag assigned to each node specifies a fence device to use to shut down this cluster node. The fence devices are defined elsewhere in &#039;&#039;cluster.conf&#039;&#039; (see below for details).&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
Fencing is essential to keep data on the Lustre file system consistent. Even with Multi-Mount-Protection enabled, fencing can make sure that a node in an unclear state is brought down for more analysis by the administrator.&lt;br /&gt;
&lt;br /&gt;
To configure fencing, first some fence daemon options need to be specified. the &#039;&#039;fence_daemon&#039;&#039; tag is a direct child of the &#039;&#039;cluster&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon clean_start=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Depending on the hardware configuration, these values may differ for different installations. Please see the notes in the cluster_schema_rhel5 document (linked above) for details.&lt;br /&gt;
&lt;br /&gt;
Each Lustre node in a cluster should be equipped with a fencing device. RedHat cluster supports a number of devices. More details on which devices are supported and how to configure them can be found in the cluster schema document.&lt;br /&gt;
For this example IPMI based fencing devices are used.&lt;br /&gt;
The &#039;&#039;fencedevices&#039;&#039; section may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fencedevices&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre1-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.1&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot; option=&amp;quot;off&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre2-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.2&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot; option=&amp;quot;off&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/fencedevices&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Every fence device has a number of attributes:&lt;br /&gt;
&#039;&#039;name&#039;&#039; is used to define a name for this fencing device. This name is referred to in the &#039;&#039;fence&#039;&#039; part of the &#039;&#039;clusternode&#039;&#039; definition (see above). The &#039;&#039;agent&#039;&#039; defines the kind of fencing device to use. In this example an IPMI-over-Lan device is used. The remaining attributes are specific for the &#039;&#039;ipmilan&#039;&#039; device and are self-explanatory.&lt;br /&gt;
&lt;br /&gt;
=== Resource Manager ===&lt;br /&gt;
&lt;br /&gt;
The resource manager block of the &#039;&#039;cluster.conf&#039;&#039; is wrapped in a &#039;&#039;rm&#039;&#039; tag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;rm&amp;gt;&lt;br /&gt;
    ..&lt;br /&gt;
  &amp;lt;/rm&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
It contains definitions of resources, failover domains, and services.&lt;br /&gt;
&lt;br /&gt;
==== Resources ====&lt;br /&gt;
In the &#039;&#039;resources&#039;&#039; block of the &#039;&#039;cluster.conf&#039;&#039; file all Lustre targets of both clustered nodes are specified. In this example, four Lustre object storage targets are defined:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;resources&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target1&amp;quot; mountpoint=&amp;quot;/mnt/ost1&amp;quot; device=&amp;quot;/path/to/ost1/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target2&amp;quot; mountpoint=&amp;quot;/mnt/ost2&amp;quot; device=&amp;quot;/path/to/ost2/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target3&amp;quot; mountpoint=&amp;quot;/mnt/ost3&amp;quot; device=&amp;quot;/path/to/ost3/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target4&amp;quot; mountpoint=&amp;quot;/mnt/ost4&amp;quot; device=&amp;quot;/path/to/ost4/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/resources&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use the &#039;&#039;lustrefs&#039;&#039; resource definition it is essential that the lustrefs.sh script is installed in &#039;&#039;/usr/share/cluster&#039;&#039; as described above. To verify the script is installed correctly and has correct permission run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/share/cluster/lustrefs.sh --help&lt;br /&gt;
usage: /usr/share/cluster/lustrefs.sh {start|stop|status|monitor|restart|meta-data|verify-all}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each &#039;&#039;lustrefs&#039;&#039; resource has a number of attributes. &#039;&#039;name&#039;&#039; defines how the resource can be addressed.&lt;br /&gt;
&lt;br /&gt;
==== Failover Domains ====&lt;br /&gt;
Usually RedHat cluster is used to provide a service on a number of nodes, where one node takes over the service of a failed node. In this example a number of Lustre targets is provided by each of the Lustre server nodes. To allow such a configuration, the definition of two Failover domains is necessary. The definition of &#039;&#039;failoverdomains&#039;&#039; may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;failoverdomains&amp;gt;&lt;br /&gt;
     &amp;lt;failoverdomain name=&amp;quot;first_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
      &amp;lt;failoverdomain name=&amp;quot;second_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;         &lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
    &amp;lt;/failoverdomains&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, two fail-over-domains are created by adding the same nodes to each fail-over-domain, but the nodes are assigned different priorities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Services ====&lt;br /&gt;
As a final configuration step the resources defined earlier are assigned to their fail-over-domain. This is done by defining a service for each of the Lustre nodes in the cluster and assign a domain. For the resources and fail-over-domains defined earlier this may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;first_first&amp;quot; name=&amp;quot;lustre_2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;second_first&amp;quot; name=&amp;quot;lustre_1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target4&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example &#039;&#039;target1&#039;&#039; and &#039;&#039;target2&#039;&#039; are assigned to the first node and &#039;&#039;target3&#039;&#039; and &#039;&#039;target4&#039;&#039; are assigned to the second node by default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Start RedHat Cluster ===&lt;br /&gt;
Before bringing up RedHat cluster, make sure &#039;&#039;cluster.conf&#039;&#039; is update/edited on both Lustre server nodes. Usually &#039;&#039;cluster.conf&#039;&#039; should be the same on both nodes. The only exception is, if the device paths differ on both nodes. &lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;cman&#039;&#039; service ====&lt;br /&gt;
&lt;br /&gt;
With &#039;&#039;cluster.conf&#039;&#039; in place of both nodes it&#039;s time to start the &#039;&#039;cman&#039;&#039; service.&lt;br /&gt;
this is done by running&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
service cman start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
on both clustered nodes. To verify &#039;&#039;cman&#039;&#039; is running &#039;&#039;clustat&#039;&#039; can be used:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bash-3.2# clustat &lt;br /&gt;
Cluster Status for Lustre @ Tue Dec 14 11:27:36 2010&lt;br /&gt;
Member Status: Quorate&lt;br /&gt;
&lt;br /&gt;
 Member Name                                      ID   Status&lt;br /&gt;
 ------ ----                                      ---- ------&lt;br /&gt;
 lustre1                                             1 Online, Local&lt;br /&gt;
 lustre2                                             2 Online&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To enable the &#039;&#039;cman&#039;&#039; service permanently run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chkconfig cman on&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;rgmanager&#039;&#039; service ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== verifying RedHat Cluster ====&lt;br /&gt;
&lt;br /&gt;
== Useful tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat cluster is a complex system of programs and services. There are a number of tools available to interact and/or make working with RedHat Cluster easier. In this section a number of these tools are presented. For more details read the man pages. &lt;br /&gt;
&lt;br /&gt;
=== cman_tool ===&lt;br /&gt;
&lt;br /&gt;
=== ccs_tool ===&lt;br /&gt;
&lt;br /&gt;
=== clustat ===&lt;br /&gt;
&lt;br /&gt;
=== clusvcadm ===&lt;br /&gt;
&lt;br /&gt;
=== system-config-cluster ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12042</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12042"/>
		<updated>2010-12-14T10:05:02Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Tools to use with RedHat Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If yum is not set up correctly, the rpm packages and their dependencies need to be installed manually.&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
Next the nodes which form the cluster need to be specified. Each cluster node need to be specified separately wrapped in an surrounding &#039;&#039;clusternodes&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;clusternodes&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre1&amp;quot; nodeid=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre1-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre2&amp;quot; nodeid=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre2-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
  &amp;lt;/clusternodes&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each cluster node is given a name which must be it&#039;s hostname or IP address. Additionally a unique node ID needs to be specified. &lt;br /&gt;
The &#039;&#039;fence&#039;&#039; tag assigned to each node specifies a fence device to use to shut down this cluster node. The fence devices are defined elsewhere in &#039;&#039;cluster.conf&#039;&#039; (see below for details).&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
Fencing is essential to keep data on the Lustre file system consistent. Even with Multi-Mount-Protection enabled, fencing can make sure that a node in an unclear state is brought down for more analysis by the administrator.&lt;br /&gt;
&lt;br /&gt;
To configure fencing, first some fence daemon options need to be specified. the &#039;&#039;fence_daemon&#039;&#039; tag is a direct child of the &#039;&#039;cluster&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon clean_start=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Depending on the hardware configuration, these values may differ for different installations. Please see the notes in the cluster_schema_rhel5 document (linked above) for details.&lt;br /&gt;
&lt;br /&gt;
Each Lustre node in a cluster should be equipped with a fencing device. RedHat cluster supports a number of devices. More details on which devices are supported and how to configure them can be found in the cluster schema document.&lt;br /&gt;
For this example IPMI based fencing devices are used.&lt;br /&gt;
The &#039;&#039;fencedevices&#039;&#039; section may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fencedevices&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre1-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.1&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot; option=&amp;quot;off&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre2-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.2&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot; option=&amp;quot;off&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/fencedevices&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Every fence device has a number of attributes:&lt;br /&gt;
&#039;&#039;name&#039;&#039; is used to define a name for this fencing device. This name is referred to in the &#039;&#039;fence&#039;&#039; part of the &#039;&#039;clusternode&#039;&#039; definition (see above). The &#039;&#039;agent&#039;&#039; defines the kind of fencing device to use. In this example an IPMI-over-Lan device is used. The remaining attributes are specific for the &#039;&#039;ipmilan&#039;&#039; device and are self-explanatory.&lt;br /&gt;
&lt;br /&gt;
=== Resource Manager ===&lt;br /&gt;
&lt;br /&gt;
The resource manager block of the &#039;&#039;cluster.conf&#039;&#039; is wrapped in a &#039;&#039;rm&#039;&#039; tag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;rm&amp;gt;&lt;br /&gt;
    ..&lt;br /&gt;
  &amp;lt;/rm&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
It contains definitions of resources, failover domains, and services.&lt;br /&gt;
&lt;br /&gt;
==== Resources ====&lt;br /&gt;
In the &#039;&#039;resources&#039;&#039; block of the &#039;&#039;cluster.conf&#039;&#039; file all Lustre targets of both clustered nodes are specified. In this example, four Lustre object storage targets are defined:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;resources&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target1&amp;quot; mountpoint=&amp;quot;/mnt/ost1&amp;quot; device=&amp;quot;/path/to/ost1/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target2&amp;quot; mountpoint=&amp;quot;/mnt/ost2&amp;quot; device=&amp;quot;/path/to/ost2/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target3&amp;quot; mountpoint=&amp;quot;/mnt/ost3&amp;quot; device=&amp;quot;/path/to/ost3/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target4&amp;quot; mountpoint=&amp;quot;/mnt/ost4&amp;quot; device=&amp;quot;/path/to/ost4/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/resources&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use the &#039;&#039;lustrefs&#039;&#039; resource definition it is essential that the lustrefs.sh script is installed in &#039;&#039;/usr/share/cluster&#039;&#039; as described above. To verify the script is installed correctly and has correct permission run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/share/cluster/lustrefs.sh --help&lt;br /&gt;
usage: /usr/share/cluster/lustrefs.sh {start|stop|status|monitor|restart|meta-data|verify-all}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each &#039;&#039;lustrefs&#039;&#039; resource has a number of attributes. &#039;&#039;name&#039;&#039; defines how the resource can be addressed.&lt;br /&gt;
&lt;br /&gt;
==== Failover Domains ====&lt;br /&gt;
Usually RedHat cluster is used to provide a service on a number of nodes, where one node takes over the service of a failed node. In this example a number of Lustre targets is provided by each of the Lustre server nodes. To allow such a configuration, the definition of two Failover domains is necessary. The definition of &#039;&#039;failoverdomains&#039;&#039; may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;failoverdomains&amp;gt;&lt;br /&gt;
     &amp;lt;failoverdomain name=&amp;quot;first_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
      &amp;lt;failoverdomain name=&amp;quot;second_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;         &lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
    &amp;lt;/failoverdomains&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, two fail-over-domains are created by adding the same nodes to each fail-over-domain, but the nodes are assigned different priorities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Services ====&lt;br /&gt;
As a final configuration step the resources defined earlier are assigned to their fail-over-domain. This is done by defining a service for each of the Lustre nodes in the cluster and assign a domain. For the resources and fail-over-domains defined earlier this may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;first_first&amp;quot; name=&amp;quot;lustre_2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;second_first&amp;quot; name=&amp;quot;lustre_1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target4&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example &#039;&#039;target1&#039;&#039; and &#039;&#039;target2&#039;&#039; are assigned to the first node and &#039;&#039;target3&#039;&#039; and &#039;&#039;target4&#039;&#039; are assigned to the second node by default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Start RedHat Cluster ===&lt;br /&gt;
Before bringing up RedHat cluster, make sure &#039;&#039;cluster.conf&#039;&#039; is update/edited on both Lustre server nodes. Usually &#039;&#039;cluster.conf&#039;&#039; should be the same on both nodes. The only exception is, if the device paths differ on both nodes. &lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;cman&#039;&#039; service ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;cman&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;rgmanager&#039;&#039; service ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== verifying RedHat Cluster ====&lt;br /&gt;
&lt;br /&gt;
== Useful tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat cluster is a complex system of programs and services. There are a number of tools available to interact and/or make working with RedHat Cluster easier. In this section a number of these tools are presented. For more details read the man pages. &lt;br /&gt;
&lt;br /&gt;
=== cman_tool ===&lt;br /&gt;
&lt;br /&gt;
=== ccs_tool ===&lt;br /&gt;
&lt;br /&gt;
=== clustat ===&lt;br /&gt;
&lt;br /&gt;
=== clusvcadm ===&lt;br /&gt;
&lt;br /&gt;
=== system-config-cluster ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12041</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12041"/>
		<updated>2010-12-14T10:00:08Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Configure RedHat Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If yum is not set up correctly, the rpm packages and their dependencies need to be installed manually.&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
Next the nodes which form the cluster need to be specified. Each cluster node need to be specified separately wrapped in an surrounding &#039;&#039;clusternodes&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;clusternodes&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre1&amp;quot; nodeid=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre1-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre2&amp;quot; nodeid=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre2-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
  &amp;lt;/clusternodes&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each cluster node is given a name which must be it&#039;s hostname or IP address. Additionally a unique node ID needs to be specified. &lt;br /&gt;
The &#039;&#039;fence&#039;&#039; tag assigned to each node specifies a fence device to use to shut down this cluster node. The fence devices are defined elsewhere in &#039;&#039;cluster.conf&#039;&#039; (see below for details).&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
Fencing is essential to keep data on the Lustre file system consistent. Even with Multi-Mount-Protection enabled, fencing can make sure that a node in an unclear state is brought down for more analysis by the administrator.&lt;br /&gt;
&lt;br /&gt;
To configure fencing, first some fence daemon options need to be specified. the &#039;&#039;fence_daemon&#039;&#039; tag is a direct child of the &#039;&#039;cluster&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon clean_start=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Depending on the hardware configuration, these values may differ for different installations. Please see the notes in the cluster_schema_rhel5 document (linked above) for details.&lt;br /&gt;
&lt;br /&gt;
Each Lustre node in a cluster should be equipped with a fencing device. RedHat cluster supports a number of devices. More details on which devices are supported and how to configure them can be found in the cluster schema document.&lt;br /&gt;
For this example IPMI based fencing devices are used.&lt;br /&gt;
The &#039;&#039;fencedevices&#039;&#039; section may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fencedevices&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre1-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.1&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot; option=&amp;quot;off&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre2-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.2&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot; option=&amp;quot;off&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/fencedevices&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Every fence device has a number of attributes:&lt;br /&gt;
&#039;&#039;name&#039;&#039; is used to define a name for this fencing device. This name is referred to in the &#039;&#039;fence&#039;&#039; part of the &#039;&#039;clusternode&#039;&#039; definition (see above). The &#039;&#039;agent&#039;&#039; defines the kind of fencing device to use. In this example an IPMI-over-Lan device is used. The remaining attributes are specific for the &#039;&#039;ipmilan&#039;&#039; device and are self-explanatory.&lt;br /&gt;
&lt;br /&gt;
=== Resource Manager ===&lt;br /&gt;
&lt;br /&gt;
The resource manager block of the &#039;&#039;cluster.conf&#039;&#039; is wrapped in a &#039;&#039;rm&#039;&#039; tag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;rm&amp;gt;&lt;br /&gt;
    ..&lt;br /&gt;
  &amp;lt;/rm&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
It contains definitions of resources, failover domains, and services.&lt;br /&gt;
&lt;br /&gt;
==== Resources ====&lt;br /&gt;
In the &#039;&#039;resources&#039;&#039; block of the &#039;&#039;cluster.conf&#039;&#039; file all Lustre targets of both clustered nodes are specified. In this example, four Lustre object storage targets are defined:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;resources&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target1&amp;quot; mountpoint=&amp;quot;/mnt/ost1&amp;quot; device=&amp;quot;/path/to/ost1/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target2&amp;quot; mountpoint=&amp;quot;/mnt/ost2&amp;quot; device=&amp;quot;/path/to/ost2/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target3&amp;quot; mountpoint=&amp;quot;/mnt/ost3&amp;quot; device=&amp;quot;/path/to/ost3/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target4&amp;quot; mountpoint=&amp;quot;/mnt/ost4&amp;quot; device=&amp;quot;/path/to/ost4/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/resources&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use the &#039;&#039;lustrefs&#039;&#039; resource definition it is essential that the lustrefs.sh script is installed in &#039;&#039;/usr/share/cluster&#039;&#039; as described above. To verify the script is installed correctly and has correct permission run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/share/cluster/lustrefs.sh --help&lt;br /&gt;
usage: /usr/share/cluster/lustrefs.sh {start|stop|status|monitor|restart|meta-data|verify-all}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each &#039;&#039;lustrefs&#039;&#039; resource has a number of attributes. &#039;&#039;name&#039;&#039; defines how the resource can be addressed.&lt;br /&gt;
&lt;br /&gt;
==== Failover Domains ====&lt;br /&gt;
Usually RedHat cluster is used to provide a service on a number of nodes, where one node takes over the service of a failed node. In this example a number of Lustre targets is provided by each of the Lustre server nodes. To allow such a configuration, the definition of two Failover domains is necessary. The definition of &#039;&#039;failoverdomains&#039;&#039; may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;failoverdomains&amp;gt;&lt;br /&gt;
     &amp;lt;failoverdomain name=&amp;quot;first_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
      &amp;lt;failoverdomain name=&amp;quot;second_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;         &lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
    &amp;lt;/failoverdomains&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, two fail-over-domains are created by adding the same nodes to each fail-over-domain, but the nodes are assigned different priorities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Services ====&lt;br /&gt;
As a final configuration step the resources defined earlier are assigned to their fail-over-domain. This is done by defining a service for each of the Lustre nodes in the cluster and assign a domain. For the resources and fail-over-domains defined earlier this may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;first_first&amp;quot; name=&amp;quot;lustre_2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;second_first&amp;quot; name=&amp;quot;lustre_1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target4&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example &#039;&#039;target1&#039;&#039; and &#039;&#039;target2&#039;&#039; are assigned to the first node and &#039;&#039;target3&#039;&#039; and &#039;&#039;target4&#039;&#039; are assigned to the second node by default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Start RedHat Cluster ===&lt;br /&gt;
Before bringing up RedHat cluster, make sure &#039;&#039;cluster.conf&#039;&#039; is update/edited on both Lustre server nodes. Usually &#039;&#039;cluster.conf&#039;&#039; should be the same on both nodes. The only exception is, if the device paths differ on both nodes. &lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;cman&#039;&#039; service ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;cman&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;rgmanager&#039;&#039; service ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== verifying RedHat Cluster ====&lt;br /&gt;
&lt;br /&gt;
== Tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
=== cman_tool ===&lt;br /&gt;
&lt;br /&gt;
=== ccs_tool ===&lt;br /&gt;
&lt;br /&gt;
=== clustat ===&lt;br /&gt;
&lt;br /&gt;
=== clusvcadm ===&lt;br /&gt;
&lt;br /&gt;
=== system-config-cluster ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12040</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12040"/>
		<updated>2010-12-14T09:33:04Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Services */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If yum is not set up correctly, the rpm packages and their dependencies need to be installed manually.&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
Next the nodes which form the cluster need to be specified. Each cluster node need to be specified separately wrapped in an surrounding &#039;&#039;clusternodes&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;clusternodes&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre1&amp;quot; nodeid=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre1-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre2&amp;quot; nodeid=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre2-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
  &amp;lt;/clusternodes&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each cluster node is given a name which must be it&#039;s hostname or IP address. Additionally a unique node ID needs to be specified. &lt;br /&gt;
The &#039;&#039;fence&#039;&#039; tag assigned to each node specifies a fence device to use to shut down this cluster node. The fence devices are defined elsewhere in &#039;&#039;cluster.conf&#039;&#039; (see below for details).&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
Fencing is essential to keep data on the Lustre file system consistent. Even with Multi-Mount-Protection enabled, fencing can make sure that a node in an unclear state is brought down for more analysis by the administrator.&lt;br /&gt;
&lt;br /&gt;
To configure fencing, first some fence daemon options need to be specified. the &#039;&#039;fence_daemon&#039;&#039; tag is a direct child of the &#039;&#039;cluster&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon clean_start=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Depending on the hardware configuration, these values may differ for different installations. Please see the notes in the cluster_schema_rhel5 document (linked above) for details.&lt;br /&gt;
&lt;br /&gt;
Each Lustre node in a cluster should be equipped with a fencing device. RedHat cluster supports a number of devices. More details on which devices are supported and how to configure them can be found in the cluster schema document.&lt;br /&gt;
For this example IPMI based fencing devices are used.&lt;br /&gt;
The &#039;&#039;fencedevices&#039;&#039; section may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fencedevices&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre1-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.1&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot; option=&amp;quot;off&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre2-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.2&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot; option=&amp;quot;off&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/fencedevices&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Every fence device has a number of attributes:&lt;br /&gt;
&#039;&#039;name&#039;&#039; is used to define a name for this fencing device. This name is referred to in the &#039;&#039;fence&#039;&#039; part of the &#039;&#039;clusternode&#039;&#039; definition (see above). The &#039;&#039;agent&#039;&#039; defines the kind of fencing device to use. In this example an IPMI-over-Lan device is used. The remaining attributes are specific for the &#039;&#039;ipmilan&#039;&#039; device and are self-explanatory.&lt;br /&gt;
&lt;br /&gt;
=== Resource Manager ===&lt;br /&gt;
&lt;br /&gt;
The resource manager block of the &#039;&#039;cluster.conf&#039;&#039; is wrapped in a &#039;&#039;rm&#039;&#039; tag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;rm&amp;gt;&lt;br /&gt;
    ..&lt;br /&gt;
  &amp;lt;/rm&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
It contains definitions of resources, failover domains, and services.&lt;br /&gt;
&lt;br /&gt;
==== Resources ====&lt;br /&gt;
In the &#039;&#039;resources&#039;&#039; block of the &#039;&#039;cluster.conf&#039;&#039; file all Lustre targets of both clustered nodes are specified. In this example, four Lustre object storage targets are defined:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;resources&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target1&amp;quot; mountpoint=&amp;quot;/mnt/ost1&amp;quot; device=&amp;quot;/path/to/ost1/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target2&amp;quot; mountpoint=&amp;quot;/mnt/ost2&amp;quot; device=&amp;quot;/path/to/ost2/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target3&amp;quot; mountpoint=&amp;quot;/mnt/ost3&amp;quot; device=&amp;quot;/path/to/ost3/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target4&amp;quot; mountpoint=&amp;quot;/mnt/ost4&amp;quot; device=&amp;quot;/path/to/ost4/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/resources&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use the &#039;&#039;lustrefs&#039;&#039; resource definition it is essential that the lustrefs.sh script is installed in &#039;&#039;/usr/share/cluster&#039;&#039; as described above. To verify the script is installed correctly and has correct permission run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/share/cluster/lustrefs.sh --help&lt;br /&gt;
usage: /usr/share/cluster/lustrefs.sh {start|stop|status|monitor|restart|meta-data|verify-all}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each &#039;&#039;lustrefs&#039;&#039; resource has a number of attributes. &#039;&#039;name&#039;&#039; defines how the resource can be addressed.&lt;br /&gt;
&lt;br /&gt;
==== Failover Domains ====&lt;br /&gt;
Usually RedHat cluster is used to provide a service on a number of nodes, where one node takes over the service of a failed node. In this example a number of Lustre targets is provided by each of the Lustre server nodes. To allow such a configuration, the definition of two Failover domains is necessary. The definition of &#039;&#039;failoverdomains&#039;&#039; may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;failoverdomains&amp;gt;&lt;br /&gt;
     &amp;lt;failoverdomain name=&amp;quot;first_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
      &amp;lt;failoverdomain name=&amp;quot;second_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;         &lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
    &amp;lt;/failoverdomains&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, two fail-over-domains are created by adding the same nodes to each fail-over-domain, but the nodes are assigned different priorities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Services ====&lt;br /&gt;
As a final configuration step the resources defined earlier are assigned to their fail-over-domain. This is done by defining a service for each of the Lustre nodes in the cluster and assign a domain. For the resources and fail-over-domains defined earlier this may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;first_first&amp;quot; name=&amp;quot;lustre_2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;second_first&amp;quot; name=&amp;quot;lustre_1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target4&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example &#039;&#039;target1&#039;&#039; and &#039;&#039;target2&#039;&#039; are assigned to the first node and &#039;&#039;target3&#039;&#039; and &#039;&#039;target4&#039;&#039; are assigned to the second node by default.&lt;br /&gt;
&lt;br /&gt;
== Tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
=== cman_tool ===&lt;br /&gt;
&lt;br /&gt;
=== ccs_tool ===&lt;br /&gt;
&lt;br /&gt;
=== clustat ===&lt;br /&gt;
&lt;br /&gt;
=== clusvcadm ===&lt;br /&gt;
&lt;br /&gt;
=== system-config-cluster ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12039</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12039"/>
		<updated>2010-12-14T09:12:44Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Services */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If yum is not set up correctly, the rpm packages and their dependencies need to be installed manually.&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
Next the nodes which form the cluster need to be specified. Each cluster node need to be specified separately wrapped in an surrounding &#039;&#039;clusternodes&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;clusternodes&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre1&amp;quot; nodeid=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre1-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre2&amp;quot; nodeid=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre2-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
  &amp;lt;/clusternodes&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each cluster node is given a name which must be it&#039;s hostname or IP address. Additionally a unique node ID needs to be specified. &lt;br /&gt;
The &#039;&#039;fence&#039;&#039; tag assigned to each node specifies a fence device to use to shut down this cluster node. The fence devices are defined elsewhere in &#039;&#039;cluster.conf&#039;&#039; (see below for details).&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
Fencing is essential to keep data on the Lustre file system consistent. Even with Multi-Mount-Protection enabled, fencing can make sure that a node in an unclear state is brought down for more analysis by the administrator.&lt;br /&gt;
&lt;br /&gt;
To configure fencing, first some fence daemon options need to be specified. the &#039;&#039;fence_daemon&#039;&#039; tag is a direct child of the &#039;&#039;cluster&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon clean_start=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Depending on the hardware configuration, these values may differ for different installations. Please see the notes in the cluster_schema_rhel5 document (linked above) for details.&lt;br /&gt;
&lt;br /&gt;
Each Lustre node in a cluster should be equipped with a fencing device. RedHat cluster supports a number of devices. More details on which devices are supported and how to configure them can be found in the cluster schema document.&lt;br /&gt;
For this example IPMI based fencing devices are used.&lt;br /&gt;
The &#039;&#039;fencedevices&#039;&#039; section may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fencedevices&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre1-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.1&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot; option=&amp;quot;off&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre2-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.2&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot; option=&amp;quot;off&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/fencedevices&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Every fence device has a number of attributes:&lt;br /&gt;
&#039;&#039;name&#039;&#039; is used to define a name for this fencing device. This name is referred to in the &#039;&#039;fence&#039;&#039; part of the &#039;&#039;clusternode&#039;&#039; definition (see above). The &#039;&#039;agent&#039;&#039; defines the kind of fencing device to use. In this example an IPMI-over-Lan device is used. The remaining attributes are specific for the &#039;&#039;ipmilan&#039;&#039; device and are self-explanatory.&lt;br /&gt;
&lt;br /&gt;
=== Resource Manager ===&lt;br /&gt;
&lt;br /&gt;
The resource manager block of the &#039;&#039;cluster.conf&#039;&#039; is wrapped in a &#039;&#039;rm&#039;&#039; tag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;rm&amp;gt;&lt;br /&gt;
    ..&lt;br /&gt;
  &amp;lt;/rm&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
It contains definitions of resources, failover domains, and services.&lt;br /&gt;
&lt;br /&gt;
==== Resources ====&lt;br /&gt;
In the &#039;&#039;resources&#039;&#039; block of the &#039;&#039;cluster.conf&#039;&#039; file all Lustre targets of both clustered nodes are specified. In this example, four Lustre object storage targets are defined:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;resources&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target1&amp;quot; mountpoint=&amp;quot;/mnt/ost1&amp;quot; device=&amp;quot;/path/to/ost1/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target2&amp;quot; mountpoint=&amp;quot;/mnt/ost2&amp;quot; device=&amp;quot;/path/to/ost2/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target3&amp;quot; mountpoint=&amp;quot;/mnt/ost3&amp;quot; device=&amp;quot;/path/to/ost3/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target4&amp;quot; mountpoint=&amp;quot;/mnt/ost4&amp;quot; device=&amp;quot;/path/to/ost4/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/resources&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use the &#039;&#039;lustrefs&#039;&#039; resource definition it is essential that the lustrefs.sh script is installed in &#039;&#039;/usr/share/cluster&#039;&#039; as described above. To verify the script is installed correctly and has correct permission run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/share/cluster/lustrefs.sh --help&lt;br /&gt;
usage: /usr/share/cluster/lustrefs.sh {start|stop|status|monitor|restart|meta-data|verify-all}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each &#039;&#039;lustrefs&#039;&#039; resource has a number of attributes. &#039;&#039;name&#039;&#039; defines how the resource can be addressed.&lt;br /&gt;
&lt;br /&gt;
==== Failover Domains ====&lt;br /&gt;
Usually RedHat cluster is used to provide a service on a number of nodes, where one node takes over the service of a failed node. In this example a number of Lustre targets is provided by each of the Lustre server nodes. To allow such a configuration, the definition of two Failover domains is necessary. The definition of &#039;&#039;failoverdomains&#039;&#039; may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;failoverdomains&amp;gt;&lt;br /&gt;
     &amp;lt;failoverdomain name=&amp;quot;first_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
      &amp;lt;failoverdomain name=&amp;quot;second_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;         &lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
    &amp;lt;/failoverdomains&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, two fail-over-domains are created by adding the same nodes to each fail-over-domain, but the nodes are assigned different priorities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Services ====&lt;br /&gt;
As a final configuration step the resources defined earlier are assigned to their fail-over-domain. This is done by defining a service for each of the Lustre nodes in the cluster and assign a domain. For the resources and fail-over-domains defined earlier this may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;second_first&amp;quot; name=&amp;quot;lustre_2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;first_first&amp;quot; name=&amp;quot;lustre_1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target4&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
=== cman_tool ===&lt;br /&gt;
&lt;br /&gt;
=== ccs_tool ===&lt;br /&gt;
&lt;br /&gt;
=== clustat ===&lt;br /&gt;
&lt;br /&gt;
=== clusvcadm ===&lt;br /&gt;
&lt;br /&gt;
=== system-config-cluster ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12038</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12038"/>
		<updated>2010-12-14T08:11:33Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Fencing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If yum is not set up correctly, the rpm packages and their dependencies need to be installed manually.&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
Next the nodes which form the cluster need to be specified. Each cluster node need to be specified separately wrapped in an surrounding &#039;&#039;clusternodes&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;clusternodes&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre1&amp;quot; nodeid=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre1-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre2&amp;quot; nodeid=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre2-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
  &amp;lt;/clusternodes&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each cluster node is given a name which must be it&#039;s hostname or IP address. Additionally a unique node ID needs to be specified. &lt;br /&gt;
The &#039;&#039;fence&#039;&#039; tag assigned to each node specifies a fence device to use to shut down this cluster node. The fence devices are defined elsewhere in &#039;&#039;cluster.conf&#039;&#039; (see below for details).&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
Fencing is essential to keep data on the Lustre file system consistent. Even with Multi-Mount-Protection enabled, fencing can make sure that a node in an unclear state is brought down for more analysis by the administrator.&lt;br /&gt;
&lt;br /&gt;
To configure fencing, first some fence daemon options need to be specified. the &#039;&#039;fence_daemon&#039;&#039; tag is a direct child of the &#039;&#039;cluster&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon clean_start=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Depending on the hardware configuration, these values may differ for different installations. Please see the notes in the cluster_schema_rhel5 document (linked above) for details.&lt;br /&gt;
&lt;br /&gt;
Each Lustre node in a cluster should be equipped with a fencing device. RedHat cluster supports a number of devices. More details on which devices are supported and how to configure them can be found in the cluster schema document.&lt;br /&gt;
For this example IPMI based fencing devices are used.&lt;br /&gt;
The &#039;&#039;fencedevices&#039;&#039; section may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fencedevices&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre1-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.1&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot; option=&amp;quot;off&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre2-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.2&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot; option=&amp;quot;off&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/fencedevices&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Every fence device has a number of attributes:&lt;br /&gt;
&#039;&#039;name&#039;&#039; is used to define a name for this fencing device. This name is referred to in the &#039;&#039;fence&#039;&#039; part of the &#039;&#039;clusternode&#039;&#039; definition (see above). The &#039;&#039;agent&#039;&#039; defines the kind of fencing device to use. In this example an IPMI-over-Lan device is used. The remaining attributes are specific for the &#039;&#039;ipmilan&#039;&#039; device and are self-explanatory.&lt;br /&gt;
&lt;br /&gt;
=== Resource Manager ===&lt;br /&gt;
&lt;br /&gt;
The resource manager block of the &#039;&#039;cluster.conf&#039;&#039; is wrapped in a &#039;&#039;rm&#039;&#039; tag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;rm&amp;gt;&lt;br /&gt;
    ..&lt;br /&gt;
  &amp;lt;/rm&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
It contains definitions of resources, failover domains, and services.&lt;br /&gt;
&lt;br /&gt;
==== Resources ====&lt;br /&gt;
In the &#039;&#039;resources&#039;&#039; block of the &#039;&#039;cluster.conf&#039;&#039; file all Lustre targets of both clustered nodes are specified. In this example, four Lustre object storage targets are defined:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;resources&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target1&amp;quot; mountpoint=&amp;quot;/mnt/ost1&amp;quot; device=&amp;quot;/path/to/ost1/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target2&amp;quot; mountpoint=&amp;quot;/mnt/ost2&amp;quot; device=&amp;quot;/path/to/ost2/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target3&amp;quot; mountpoint=&amp;quot;/mnt/ost3&amp;quot; device=&amp;quot;/path/to/ost3/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target4&amp;quot; mountpoint=&amp;quot;/mnt/ost4&amp;quot; device=&amp;quot;/path/to/ost4/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/resources&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use the &#039;&#039;lustrefs&#039;&#039; resource definition it is essential that the lustrefs.sh script is installed in &#039;&#039;/usr/share/cluster&#039;&#039; as described above. To verify the script is installed correctly and has correct permission run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/share/cluster/lustrefs.sh --help&lt;br /&gt;
usage: /usr/share/cluster/lustrefs.sh {start|stop|status|monitor|restart|meta-data|verify-all}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each &#039;&#039;lustrefs&#039;&#039; resource has a number of attributes. &#039;&#039;name&#039;&#039; defines how the resource can be addressed.&lt;br /&gt;
&lt;br /&gt;
==== Failover Domains ====&lt;br /&gt;
Usually RedHat cluster is used to provide a service on a number of nodes, where one node takes over the service of a failed node. In this example a number of Lustre targets is provided by each of the Lustre server nodes. To allow such a configuration, the definition of two Failover domains is necessary. The definition of &#039;&#039;failoverdomains&#039;&#039; may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;failoverdomains&amp;gt;&lt;br /&gt;
     &amp;lt;failoverdomain name=&amp;quot;first_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
      &amp;lt;failoverdomain name=&amp;quot;second_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;         &lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
    &amp;lt;/failoverdomains&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, two fail-over-domains are created by adding the same nodes to each fail-over-domain, but the nodes are assigned different priorities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Services ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;second_first&amp;quot; name=&amp;quot;lustre_2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;first_first&amp;quot; name=&amp;quot;lustre_1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target4&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
=== cman_tool ===&lt;br /&gt;
&lt;br /&gt;
=== ccs_tool ===&lt;br /&gt;
&lt;br /&gt;
=== clustat ===&lt;br /&gt;
&lt;br /&gt;
=== clusvcadm ===&lt;br /&gt;
&lt;br /&gt;
=== system-config-cluster ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12037</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12037"/>
		<updated>2010-12-13T16:11:45Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Resources */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If yum is not set up correctly, the rpm packages and their dependencies need to be installed manually.&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
Next the nodes which form the cluster need to be specified. Each cluster node need to be specified separately wrapped in an surrounding &#039;&#039;clusternodes&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;clusternodes&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre1&amp;quot; nodeid=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre1-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre2&amp;quot; nodeid=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre2-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
  &amp;lt;/clusternodes&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each cluster node is given a name which must be it&#039;s hostname or IP address. Additionally a unique node ID needs to be specified. &lt;br /&gt;
The &#039;&#039;fence&#039;&#039; tag assigned to each node specifies a fence device to use to shut down this cluster node. The fence devices are defined elsewhere in &#039;&#039;cluster.conf&#039;&#039; (see below for details).&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
Fencing is essential to keep data on the Lustre file system consistent. Even with Multi-Mount-Protection enabled, fencing can make sure that a node in an unclear state is brought down for more analysis by the administrator.&lt;br /&gt;
&lt;br /&gt;
To configure fencing, first some fence daemon options need to be specified. the &#039;&#039;fence_daemon&#039;&#039; tag is a direct child of the &#039;&#039;cluster&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon clean_start=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Depending on the hardware configuration, these values may differ for different installations. Please see the notes in the cluster_schema_rhel5 document (linked above) for details.&lt;br /&gt;
&lt;br /&gt;
Each Lustre node in a cluster should be equipped with a fencing device. RedHat cluster supports a number of devices. More details on which devices are supported and how to configure them can be found in the cluster schema document.&lt;br /&gt;
For this example IPMI based fencing devices are used.&lt;br /&gt;
The &#039;&#039;fencedevices&#039;&#039; section may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fencedevices&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre1-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.1&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre2-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.2&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/fencedevices&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Every fence device has a number of attributes:&lt;br /&gt;
&#039;&#039;name&#039;&#039; is used to define a name for this fencing device. This name is referred to in the &#039;&#039;fence&#039;&#039; part of the &#039;&#039;clusternode&#039;&#039; definition (see above). The &#039;&#039;agent&#039;&#039; defines the kind of fencing device to use. In this example an IPMI-over-Lan device is used. The remaining attributes are specific for the &#039;&#039;ipmilan&#039;&#039; device and are self-explanatory.&lt;br /&gt;
&lt;br /&gt;
=== Resource Manager ===&lt;br /&gt;
&lt;br /&gt;
The resource manager block of the &#039;&#039;cluster.conf&#039;&#039; is wrapped in a &#039;&#039;rm&#039;&#039; tag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;rm&amp;gt;&lt;br /&gt;
    ..&lt;br /&gt;
  &amp;lt;/rm&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
It contains definitions of resources, failover domains, and services.&lt;br /&gt;
&lt;br /&gt;
==== Resources ====&lt;br /&gt;
In the &#039;&#039;resources&#039;&#039; block of the &#039;&#039;cluster.conf&#039;&#039; file all Lustre targets of both clustered nodes are specified. In this example, four Lustre object storage targets are defined:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;resources&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target1&amp;quot; mountpoint=&amp;quot;/mnt/ost1&amp;quot; device=&amp;quot;/path/to/ost1/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target2&amp;quot; mountpoint=&amp;quot;/mnt/ost2&amp;quot; device=&amp;quot;/path/to/ost2/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target3&amp;quot; mountpoint=&amp;quot;/mnt/ost3&amp;quot; device=&amp;quot;/path/to/ost3/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target4&amp;quot; mountpoint=&amp;quot;/mnt/ost4&amp;quot; device=&amp;quot;/path/to/ost4/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/resources&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use the &#039;&#039;lustrefs&#039;&#039; resource definition it is essential that the lustrefs.sh script is installed in &#039;&#039;/usr/share/cluster&#039;&#039; as described above. To verify the script is installed correctly and has correct permission run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/share/cluster/lustrefs.sh --help&lt;br /&gt;
usage: /usr/share/cluster/lustrefs.sh {start|stop|status|monitor|restart|meta-data|verify-all}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each &#039;&#039;lustrefs&#039;&#039; resource has a number of attributes. &#039;&#039;name&#039;&#039; defines how the resource can be addressed.&lt;br /&gt;
&lt;br /&gt;
==== Failover Domains ====&lt;br /&gt;
Usually RedHat cluster is used to provide a service on a number of nodes, where one node takes over the service of a failed node. In this example a number of Lustre targets is provided by each of the Lustre server nodes. To allow such a configuration, the definition of two Failover domains is necessary. The definition of &#039;&#039;failoverdomains&#039;&#039; may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;failoverdomains&amp;gt;&lt;br /&gt;
     &amp;lt;failoverdomain name=&amp;quot;first_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
      &amp;lt;failoverdomain name=&amp;quot;second_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;         &lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
    &amp;lt;/failoverdomains&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, two fail-over-domains are created by adding the same nodes to each fail-over-domain, but the nodes are assigned different priorities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Services ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;second_first&amp;quot; name=&amp;quot;lustre_2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;first_first&amp;quot; name=&amp;quot;lustre_1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target4&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
=== cman_tool ===&lt;br /&gt;
&lt;br /&gt;
=== ccs_tool ===&lt;br /&gt;
&lt;br /&gt;
=== clustat ===&lt;br /&gt;
&lt;br /&gt;
=== clusvcadm ===&lt;br /&gt;
&lt;br /&gt;
=== system-config-cluster ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12036</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12036"/>
		<updated>2010-12-13T16:11:21Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Resources */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If yum is not set up correctly, the rpm packages and their dependencies need to be installed manually.&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
Next the nodes which form the cluster need to be specified. Each cluster node need to be specified separately wrapped in an surrounding &#039;&#039;clusternodes&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;clusternodes&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre1&amp;quot; nodeid=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre1-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre2&amp;quot; nodeid=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre2-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
  &amp;lt;/clusternodes&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each cluster node is given a name which must be it&#039;s hostname or IP address. Additionally a unique node ID needs to be specified. &lt;br /&gt;
The &#039;&#039;fence&#039;&#039; tag assigned to each node specifies a fence device to use to shut down this cluster node. The fence devices are defined elsewhere in &#039;&#039;cluster.conf&#039;&#039; (see below for details).&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
Fencing is essential to keep data on the Lustre file system consistent. Even with Multi-Mount-Protection enabled, fencing can make sure that a node in an unclear state is brought down for more analysis by the administrator.&lt;br /&gt;
&lt;br /&gt;
To configure fencing, first some fence daemon options need to be specified. the &#039;&#039;fence_daemon&#039;&#039; tag is a direct child of the &#039;&#039;cluster&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon clean_start=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Depending on the hardware configuration, these values may differ for different installations. Please see the notes in the cluster_schema_rhel5 document (linked above) for details.&lt;br /&gt;
&lt;br /&gt;
Each Lustre node in a cluster should be equipped with a fencing device. RedHat cluster supports a number of devices. More details on which devices are supported and how to configure them can be found in the cluster schema document.&lt;br /&gt;
For this example IPMI based fencing devices are used.&lt;br /&gt;
The &#039;&#039;fencedevices&#039;&#039; section may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fencedevices&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre1-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.1&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre2-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.2&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/fencedevices&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Every fence device has a number of attributes:&lt;br /&gt;
&#039;&#039;name&#039;&#039; is used to define a name for this fencing device. This name is referred to in the &#039;&#039;fence&#039;&#039; part of the &#039;&#039;clusternode&#039;&#039; definition (see above). The &#039;&#039;agent&#039;&#039; defines the kind of fencing device to use. In this example an IPMI-over-Lan device is used. The remaining attributes are specific for the &#039;&#039;ipmilan&#039;&#039; device and are self-explanatory.&lt;br /&gt;
&lt;br /&gt;
=== Resource Manager ===&lt;br /&gt;
&lt;br /&gt;
The resource manager block of the &#039;&#039;cluster.conf&#039;&#039; is wrapped in a &#039;&#039;rm&#039;&#039; tag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;rm&amp;gt;&lt;br /&gt;
    ..&lt;br /&gt;
  &amp;lt;/rm&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
It contains definitions of resources, failover domains, and services.&lt;br /&gt;
&lt;br /&gt;
==== Resources ====&lt;br /&gt;
In the &#039;&#039;resources&#039;&#039; block of the &#039;&#039;cluster.conf&#039;&#039; file all Lustre targets of both clustered nodes are specified. In this example, four Lustre object storage targets are defined:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;resources&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target1&amp;quot; mountpoint=&amp;quot;/mnt/ost1&amp;quot; device=&amp;quot;/path/to/ost1/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target2&amp;quot; mountpoint=&amp;quot;/mnt/ost2&amp;quot; device=&amp;quot;/path/to/ost2/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target3&amp;quot; mountpoint=&amp;quot;/mnt/ost3&amp;quot; device=&amp;quot;/path/to/ost3/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target4&amp;quot; mountpoint=&amp;quot;/mnt/ost4&amp;quot; device=&amp;quot;/path/to/ost4/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/resources&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To use the &#039;&#039;lustrefs&#039;&#039; resource definition it is essential that the lustrefs.sh script is installed in &#039;&#039;/usr/share/cluster&#039;&#039; as described above. To verify the script is installed correctly and has correct permission run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/share/cluster/lustrefs.sh --help&lt;br /&gt;
usage: /usr/share/cluster/lustrefs.sh {start|stop|status|monitor|restart|meta-data|verify-all}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each &#039;lustrefs&#039;&#039; resource has a number of attributes. &#039;&#039;name&#039;&#039; defines how the resource can be addressed.&lt;br /&gt;
&lt;br /&gt;
==== Failover Domains ====&lt;br /&gt;
Usually RedHat cluster is used to provide a service on a number of nodes, where one node takes over the service of a failed node. In this example a number of Lustre targets is provided by each of the Lustre server nodes. To allow such a configuration, the definition of two Failover domains is necessary. The definition of &#039;&#039;failoverdomains&#039;&#039; may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;failoverdomains&amp;gt;&lt;br /&gt;
     &amp;lt;failoverdomain name=&amp;quot;first_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
      &amp;lt;failoverdomain name=&amp;quot;second_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;         &lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
    &amp;lt;/failoverdomains&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, two fail-over-domains are created by adding the same nodes to each fail-over-domain, but the nodes are assigned different priorities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Services ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;second_first&amp;quot; name=&amp;quot;lustre_2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;first_first&amp;quot; name=&amp;quot;lustre_1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target4&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
=== cman_tool ===&lt;br /&gt;
&lt;br /&gt;
=== ccs_tool ===&lt;br /&gt;
&lt;br /&gt;
=== clustat ===&lt;br /&gt;
&lt;br /&gt;
=== clusvcadm ===&lt;br /&gt;
&lt;br /&gt;
=== system-config-cluster ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12035</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12035"/>
		<updated>2010-12-13T15:55:39Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Resource Manager */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If yum is not set up correctly, the rpm packages and their dependencies need to be installed manually.&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
Next the nodes which form the cluster need to be specified. Each cluster node need to be specified separately wrapped in an surrounding &#039;&#039;clusternodes&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;clusternodes&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre1&amp;quot; nodeid=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre1-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre2&amp;quot; nodeid=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre2-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
  &amp;lt;/clusternodes&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each cluster node is given a name which must be it&#039;s hostname or IP address. Additionally a unique node ID needs to be specified. &lt;br /&gt;
The &#039;&#039;fence&#039;&#039; tag assigned to each node specifies a fence device to use to shut down this cluster node. The fence devices are defined elsewhere in &#039;&#039;cluster.conf&#039;&#039; (see below for details).&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
Fencing is essential to keep data on the Lustre file system consistent. Even with Multi-Mount-Protection enabled, fencing can make sure that a node in an unclear state is brought down for more analysis by the administrator.&lt;br /&gt;
&lt;br /&gt;
To configure fencing, first some fence daemon options need to be specified. the &#039;&#039;fence_daemon&#039;&#039; tag is a direct child of the &#039;&#039;cluster&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon clean_start=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Depending on the hardware configuration, these values may differ for different installations. Please see the notes in the cluster_schema_rhel5 document (linked above) for details.&lt;br /&gt;
&lt;br /&gt;
Each Lustre node in a cluster should be equipped with a fencing device. RedHat cluster supports a number of devices. More details on which devices are supported and how to configure them can be found in the cluster schema document.&lt;br /&gt;
For this example IPMI based fencing devices are used.&lt;br /&gt;
The &#039;&#039;fencedevices&#039;&#039; section may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fencedevices&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre1-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.1&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre2-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.2&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/fencedevices&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Every fence device has a number of attributes:&lt;br /&gt;
&#039;&#039;name&#039;&#039; is used to define a name for this fencing device. This name is referred to in the &#039;&#039;fence&#039;&#039; part of the &#039;&#039;clusternode&#039;&#039; definition (see above). The &#039;&#039;agent&#039;&#039; defines the kind of fencing device to use. In this example an IPMI-over-Lan device is used. The remaining attributes are specific for the &#039;&#039;ipmilan&#039;&#039; device and are self-explanatory.&lt;br /&gt;
&lt;br /&gt;
=== Resource Manager ===&lt;br /&gt;
&lt;br /&gt;
The resource manager block of the &#039;&#039;cluster.conf&#039;&#039; is wrapped in a &#039;&#039;rm&#039;&#039; tag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;rm&amp;gt;&lt;br /&gt;
    ..&lt;br /&gt;
  &amp;lt;/rm&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
It contains definitions of resources, failover domains, and services.&lt;br /&gt;
&lt;br /&gt;
==== Resources ====&lt;br /&gt;
In the &#039;&#039;resources&#039;&#039; block of the &#039;&#039;cluster.conf&#039;&#039; file all Lustre targets of both clustered nodes are specified. In this example, four Lustre object storage targets are defined:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;resources&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target1&amp;quot; mountpoint=&amp;quot;/mnt/ost1&amp;quot; device=&amp;quot;/path/to/ost1/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target2&amp;quot; mountpoint=&amp;quot;/mnt/ost2&amp;quot; device=&amp;quot;/path/to/ost2/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target3&amp;quot; mountpoint=&amp;quot;/mnt/ost3&amp;quot; device=&amp;quot;/path/to/ost3/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target4&amp;quot; mountpoint=&amp;quot;/mnt/ost4&amp;quot; device=&amp;quot;/path/to/ost4/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/resources&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Failover Domains ====&lt;br /&gt;
Usually RedHat cluster is used to provide a service on a number of nodes, where one node takes over the service of a failed node. In this example a number of Lustre targets is provided by each of the Lustre server nodes. To allow such a configuration, the definition of two Failover domains is necessary. The definition of &#039;&#039;failoverdomains&#039;&#039; may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;failoverdomains&amp;gt;&lt;br /&gt;
     &amp;lt;failoverdomain name=&amp;quot;first_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
      &amp;lt;failoverdomain name=&amp;quot;second_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;         &lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
    &amp;lt;/failoverdomains&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, two fail-over-domains are created by adding the same nodes to each fail-over-domain, but the nodes are assigned different priorities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Services ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;second_first&amp;quot; name=&amp;quot;lustre_2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;first_first&amp;quot; name=&amp;quot;lustre_1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target4&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
=== cman_tool ===&lt;br /&gt;
&lt;br /&gt;
=== ccs_tool ===&lt;br /&gt;
&lt;br /&gt;
=== clustat ===&lt;br /&gt;
&lt;br /&gt;
=== clusvcadm ===&lt;br /&gt;
&lt;br /&gt;
=== system-config-cluster ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12034</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12034"/>
		<updated>2010-12-13T15:37:50Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Failover Domains */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If yum is not set up correctly, the rpm packages and their dependencies need to be installed manually.&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
Next the nodes which form the cluster need to be specified. Each cluster node need to be specified separately wrapped in an surrounding &#039;&#039;clusternodes&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;clusternodes&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre1&amp;quot; nodeid=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre1-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre2&amp;quot; nodeid=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre2-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
  &amp;lt;/clusternodes&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each cluster node is given a name which must be it&#039;s hostname or IP address. Additionally a unique node ID needs to be specified. &lt;br /&gt;
The &#039;&#039;fence&#039;&#039; tag assigned to each node specifies a fence device to use to shut down this cluster node. The fence devices are defined elsewhere in &#039;&#039;cluster.conf&#039;&#039; (see below for details).&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
Fencing is essential to keep data on the Lustre file system consistent. Even with Multi-Mount-Protection enabled, fencing can make sure that a node in an unclear state is brought down for more analysis by the administrator.&lt;br /&gt;
&lt;br /&gt;
To configure fencing, first some fence daemon options need to be specified. the &#039;&#039;fence_daemon&#039;&#039; tag is a direct child of the &#039;&#039;cluster&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon clean_start=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Depending on the hardware configuration, these values may differ for different installations. Please see the notes in the cluster_schema_rhel5 document (linked above) for details.&lt;br /&gt;
&lt;br /&gt;
Each Lustre node in a cluster should be equipped with a fencing device. RedHat cluster supports a number of devices. More details on which devices are supported and how to configure them can be found in the cluster schema document.&lt;br /&gt;
For this example IPMI based fencing devices are used.&lt;br /&gt;
The &#039;&#039;fencedevices&#039;&#039; section may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fencedevices&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre1-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.1&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre2-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.2&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/fencedevices&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Every fence device has a number of attributes:&lt;br /&gt;
&#039;&#039;name&#039;&#039; is used to define a name for this fencing device. This name is referred to in the &#039;&#039;fence&#039;&#039; part of the &#039;&#039;clusternode&#039;&#039; definition (see above). The &#039;&#039;agent&#039;&#039; defines the kind of fencing device to use. In this example an IPMI-over-Lan device is used. The remaining attributes are specific for the &#039;&#039;ipmilan&#039;&#039; device and are self-explanatory.&lt;br /&gt;
&lt;br /&gt;
=== Resource Manager ===&lt;br /&gt;
&lt;br /&gt;
The resource manager block of the &#039;&#039;cluster.conf&#039;&#039; is wrapped in a &#039;&#039;rm&#039;&#039; tag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;rm&amp;gt;&lt;br /&gt;
    ..&lt;br /&gt;
  &amp;lt;/rm&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
It contains definitions of failover domains, resources and services.&lt;br /&gt;
&lt;br /&gt;
==== Failover Domains ====&lt;br /&gt;
Usually RedHat cluster is used to provide a service on a number of nodes, where one node takes over the service of a failed node. In this example a number of Lustre targets is provided by each of the Lustre server nodes. To allow such a configuration, the definition of two Failover domains is necessary. The definition of &#039;&#039;failoverdomains&#039;&#039; may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;failoverdomains&amp;gt;&lt;br /&gt;
     &amp;lt;failoverdomain name=&amp;quot;first_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
      &amp;lt;failoverdomain name=&amp;quot;second_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;         &lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
    &amp;lt;/failoverdomains&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, two fail-over-domains are created by adding the same nodes to each fail-over-domain, but the nodes are assigned different priorities.&lt;br /&gt;
&lt;br /&gt;
==== Resources ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;resources&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target1&amp;quot; mountpoint=&amp;quot;/mnt/ost1&amp;quot; device=&amp;quot;/path/to/ost1/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target2&amp;quot; mountpoint=&amp;quot;/mnt/ost2&amp;quot; device=&amp;quot;/path/to/ost2/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target3&amp;quot; mountpoint=&amp;quot;/mnt/ost3&amp;quot; device=&amp;quot;/path/to/ost3/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target4&amp;quot; mountpoint=&amp;quot;/mnt/ost4&amp;quot; device=&amp;quot;/path/to/ost4/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/resources&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Services ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;second_first&amp;quot; name=&amp;quot;lustre_2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;first_first&amp;quot; name=&amp;quot;lustre_1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target4&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
=== cman_tool ===&lt;br /&gt;
&lt;br /&gt;
=== ccs_tool ===&lt;br /&gt;
&lt;br /&gt;
=== clustat ===&lt;br /&gt;
&lt;br /&gt;
=== clusvcadm ===&lt;br /&gt;
&lt;br /&gt;
=== system-config-cluster ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12033</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12033"/>
		<updated>2010-12-13T15:34:18Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Resource Manager */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If yum is not set up correctly, the rpm packages and their dependencies need to be installed manually.&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
Next the nodes which form the cluster need to be specified. Each cluster node need to be specified separately wrapped in an surrounding &#039;&#039;clusternodes&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;clusternodes&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre1&amp;quot; nodeid=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre1-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre2&amp;quot; nodeid=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre2-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
  &amp;lt;/clusternodes&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each cluster node is given a name which must be it&#039;s hostname or IP address. Additionally a unique node ID needs to be specified. &lt;br /&gt;
The &#039;&#039;fence&#039;&#039; tag assigned to each node specifies a fence device to use to shut down this cluster node. The fence devices are defined elsewhere in &#039;&#039;cluster.conf&#039;&#039; (see below for details).&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
Fencing is essential to keep data on the Lustre file system consistent. Even with Multi-Mount-Protection enabled, fencing can make sure that a node in an unclear state is brought down for more analysis by the administrator.&lt;br /&gt;
&lt;br /&gt;
To configure fencing, first some fence daemon options need to be specified. the &#039;&#039;fence_daemon&#039;&#039; tag is a direct child of the &#039;&#039;cluster&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon clean_start=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Depending on the hardware configuration, these values may differ for different installations. Please see the notes in the cluster_schema_rhel5 document (linked above) for details.&lt;br /&gt;
&lt;br /&gt;
Each Lustre node in a cluster should be equipped with a fencing device. RedHat cluster supports a number of devices. More details on which devices are supported and how to configure them can be found in the cluster schema document.&lt;br /&gt;
For this example IPMI based fencing devices are used.&lt;br /&gt;
The &#039;&#039;fencedevices&#039;&#039; section may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fencedevices&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre1-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.1&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre2-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.2&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/fencedevices&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Every fence device has a number of attributes:&lt;br /&gt;
&#039;&#039;name&#039;&#039; is used to define a name for this fencing device. This name is referred to in the &#039;&#039;fence&#039;&#039; part of the &#039;&#039;clusternode&#039;&#039; definition (see above). The &#039;&#039;agent&#039;&#039; defines the kind of fencing device to use. In this example an IPMI-over-Lan device is used. The remaining attributes are specific for the &#039;&#039;ipmilan&#039;&#039; device and are self-explanatory.&lt;br /&gt;
&lt;br /&gt;
=== Resource Manager ===&lt;br /&gt;
&lt;br /&gt;
The resource manager block of the &#039;&#039;cluster.conf&#039;&#039; is wrapped in a &#039;&#039;rm&#039;&#039; tag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;rm&amp;gt;&lt;br /&gt;
    ..&lt;br /&gt;
  &amp;lt;/rm&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
It contains definitions of failover domains, resources and services.&lt;br /&gt;
&lt;br /&gt;
==== Failover Domains ====&lt;br /&gt;
Usually RedHat cluster is used to provide a service on a number of nodes, where one node takes over the service of a failed node. In this example a number of Lustre targets is provided by each of the Lustre server nodes. To allow such a configuration, the definition of two Failover domains is necessary. The definition of &#039;&#039;failoverdomains&#039;&#039; may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;failoverdomains&amp;gt;&lt;br /&gt;
     &amp;lt;failoverdomain name=&amp;quot;first_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
      &amp;lt;failoverdomain name=&amp;quot;second_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;         &lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
    &amp;lt;/failoverdomains&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Two fail-over-domain are where nodes are assigned different priorities. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Resources ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;resources&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target1&amp;quot; mountpoint=&amp;quot;/mnt/ost1&amp;quot; device=&amp;quot;/path/to/ost1/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target2&amp;quot; mountpoint=&amp;quot;/mnt/ost2&amp;quot; device=&amp;quot;/path/to/ost2/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target3&amp;quot; mountpoint=&amp;quot;/mnt/ost3&amp;quot; device=&amp;quot;/path/to/ost3/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target4&amp;quot; mountpoint=&amp;quot;/mnt/ost4&amp;quot; device=&amp;quot;/path/to/ost4/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/resources&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Services ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;second_first&amp;quot; name=&amp;quot;lustre_2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;first_first&amp;quot; name=&amp;quot;lustre_1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target4&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
=== cman_tool ===&lt;br /&gt;
&lt;br /&gt;
=== ccs_tool ===&lt;br /&gt;
&lt;br /&gt;
=== clustat ===&lt;br /&gt;
&lt;br /&gt;
=== clusvcadm ===&lt;br /&gt;
&lt;br /&gt;
=== system-config-cluster ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12032</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12032"/>
		<updated>2010-12-13T15:04:26Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Fencing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If yum is not set up correctly, the rpm packages and their dependencies need to be installed manually.&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
Next the nodes which form the cluster need to be specified. Each cluster node need to be specified separately wrapped in an surrounding &#039;&#039;clusternodes&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;clusternodes&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre1&amp;quot; nodeid=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre1-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre2&amp;quot; nodeid=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre2-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
  &amp;lt;/clusternodes&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each cluster node is given a name which must be it&#039;s hostname or IP address. Additionally a unique node ID needs to be specified. &lt;br /&gt;
The &#039;&#039;fence&#039;&#039; tag assigned to each node specifies a fence device to use to shut down this cluster node. The fence devices are defined elsewhere in &#039;&#039;cluster.conf&#039;&#039; (see below for details).&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
Fencing is essential to keep data on the Lustre file system consistent. Even with Multi-Mount-Protection enabled, fencing can make sure that a node in an unclear state is brought down for more analysis by the administrator.&lt;br /&gt;
&lt;br /&gt;
To configure fencing, first some fence daemon options need to be specified. the &#039;&#039;fence_daemon&#039;&#039; tag is a direct child of the &#039;&#039;cluster&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon clean_start=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Depending on the hardware configuration, these values may differ for different installations. Please see the notes in the cluster_schema_rhel5 document (linked above) for details.&lt;br /&gt;
&lt;br /&gt;
Each Lustre node in a cluster should be equipped with a fencing device. RedHat cluster supports a number of devices. More details on which devices are supported and how to configure them can be found in the cluster schema document.&lt;br /&gt;
For this example IPMI based fencing devices are used.&lt;br /&gt;
The &#039;&#039;fencedevices&#039;&#039; section may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fencedevices&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre1-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.1&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre2-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.2&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/fencedevices&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Every fence device has a number of attributes:&lt;br /&gt;
&#039;&#039;name&#039;&#039; is used to define a name for this fencing device. This name is referred to in the &#039;&#039;fence&#039;&#039; part of the &#039;&#039;clusternode&#039;&#039; definition (see above). The &#039;&#039;agent&#039;&#039; defines the kind of fencing device to use. In this example an IPMI-over-Lan device is used. The remaining attributes are specific for the &#039;&#039;ipmilan&#039;&#039; device and are self-explanatory.&lt;br /&gt;
&lt;br /&gt;
=== Resource Manager ===&lt;br /&gt;
&lt;br /&gt;
==== Failover Domains ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;failoverdomains&amp;gt;&lt;br /&gt;
     &amp;lt;failoverdomain name=&amp;quot;second_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
      &amp;lt;failoverdomain name=&amp;quot;first_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;         &lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
    &amp;lt;/failoverdomains&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Resources ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;resources&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target1&amp;quot; mountpoint=&amp;quot;/mnt/ost1&amp;quot; device=&amp;quot;/path/to/ost1/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target2&amp;quot; mountpoint=&amp;quot;/mnt/ost2&amp;quot; device=&amp;quot;/path/to/ost2/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target3&amp;quot; mountpoint=&amp;quot;/mnt/ost3&amp;quot; device=&amp;quot;/path/to/ost3/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target4&amp;quot; mountpoint=&amp;quot;/mnt/ost4&amp;quot; device=&amp;quot;/path/to/ost4/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/resources&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Services ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;second_first&amp;quot; name=&amp;quot;lustre_2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;first_first&amp;quot; name=&amp;quot;lustre_1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target4&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
=== cman_tool ===&lt;br /&gt;
&lt;br /&gt;
=== ccs_tool ===&lt;br /&gt;
&lt;br /&gt;
=== clustat ===&lt;br /&gt;
&lt;br /&gt;
=== clusvcadm ===&lt;br /&gt;
&lt;br /&gt;
=== system-config-cluster ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12031</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12031"/>
		<updated>2010-12-13T14:53:50Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Installing RedHat Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If yum is not set up correctly, the rpm packages and their dependencies need to be installed manually.&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
Next the nodes which form the cluster need to be specified. Each cluster node need to be specified separately wrapped in an surrounding &#039;&#039;clusternodes&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;clusternodes&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre1&amp;quot; nodeid=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre1-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre2&amp;quot; nodeid=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre2-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
  &amp;lt;/clusternodes&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each cluster node is given a name which must be it&#039;s hostname or IP address. Additionally a unique node ID needs to be specified. &lt;br /&gt;
The &#039;&#039;fence&#039;&#039; tag assigned to each node specifies a fence device to use to shut down this cluster node. The fence devices are defined elsewhere in &#039;&#039;cluster.conf&#039;&#039; (see below for details).&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
Fencing is essential to keep data on the Lustre file system consistent. Even with Multi-Mount-Protection enabled, fencing can make sure that a node in an unclear state is brought down for more analysis by the administrator.&lt;br /&gt;
&lt;br /&gt;
To configure fencing, first some fence daemon options need to be specified. the &#039;&#039;fence_daemon&#039;&#039; tag is a direct child of the &#039;&#039;cluster&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon clean_start=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Depending on the hardware configuration, these values may differ for different installations. Please see the notes in the cluster_schema_rhel5 document (linked above) for details.&lt;br /&gt;
&lt;br /&gt;
Each Lustre node in a cluster should be equipped with a fencing device. RedHat cluster supports a number of devices. More details on which devices are supported and how to configure them can be found in the cluster schema document.&lt;br /&gt;
For this example IPMI based fencing devices are used.&lt;br /&gt;
The &#039;&#039;fencedevices&#039;&#039; section may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fencedevices&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre1-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.1&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre2-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.2&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/fencedevices&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resource Manager ===&lt;br /&gt;
&lt;br /&gt;
==== Failover Domains ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;failoverdomains&amp;gt;&lt;br /&gt;
     &amp;lt;failoverdomain name=&amp;quot;second_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
      &amp;lt;failoverdomain name=&amp;quot;first_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;         &lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
    &amp;lt;/failoverdomains&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Resources ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;resources&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target1&amp;quot; mountpoint=&amp;quot;/mnt/ost1&amp;quot; device=&amp;quot;/path/to/ost1/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target2&amp;quot; mountpoint=&amp;quot;/mnt/ost2&amp;quot; device=&amp;quot;/path/to/ost2/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target3&amp;quot; mountpoint=&amp;quot;/mnt/ost3&amp;quot; device=&amp;quot;/path/to/ost3/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target4&amp;quot; mountpoint=&amp;quot;/mnt/ost4&amp;quot; device=&amp;quot;/path/to/ost4/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/resources&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Services ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;second_first&amp;quot; name=&amp;quot;lustre_2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;first_first&amp;quot; name=&amp;quot;lustre_1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target4&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
=== cman_tool ===&lt;br /&gt;
&lt;br /&gt;
=== ccs_tool ===&lt;br /&gt;
&lt;br /&gt;
=== clustat ===&lt;br /&gt;
&lt;br /&gt;
=== clusvcadm ===&lt;br /&gt;
&lt;br /&gt;
=== system-config-cluster ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12030</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12030"/>
		<updated>2010-12-13T14:53:27Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Installing RedHat Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If yum is not set up correctly, the rpm pacakges and their dependencies need to be installed manually.&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
Next the nodes which form the cluster need to be specified. Each cluster node need to be specified separately wrapped in an surrounding &#039;&#039;clusternodes&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;clusternodes&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre1&amp;quot; nodeid=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre1-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre2&amp;quot; nodeid=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre2-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
  &amp;lt;/clusternodes&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each cluster node is given a name which must be it&#039;s hostname or IP address. Additionally a unique node ID needs to be specified. &lt;br /&gt;
The &#039;&#039;fence&#039;&#039; tag assigned to each node specifies a fence device to use to shut down this cluster node. The fence devices are defined elsewhere in &#039;&#039;cluster.conf&#039;&#039; (see below for details).&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
Fencing is essential to keep data on the Lustre file system consistent. Even with Multi-Mount-Protection enabled, fencing can make sure that a node in an unclear state is brought down for more analysis by the administrator.&lt;br /&gt;
&lt;br /&gt;
To configure fencing, first some fence daemon options need to be specified. the &#039;&#039;fence_daemon&#039;&#039; tag is a direct child of the &#039;&#039;cluster&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon clean_start=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Depending on the hardware configuration, these values may differ for different installations. Please see the notes in the cluster_schema_rhel5 document (linked above) for details.&lt;br /&gt;
&lt;br /&gt;
Each Lustre node in a cluster should be equipped with a fencing device. RedHat cluster supports a number of devices. More details on which devices are supported and how to configure them can be found in the cluster schema document.&lt;br /&gt;
For this example IPMI based fencing devices are used.&lt;br /&gt;
The &#039;&#039;fencedevices&#039;&#039; section may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fencedevices&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre1-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.1&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre2-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.2&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/fencedevices&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resource Manager ===&lt;br /&gt;
&lt;br /&gt;
==== Failover Domains ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;failoverdomains&amp;gt;&lt;br /&gt;
     &amp;lt;failoverdomain name=&amp;quot;second_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
      &amp;lt;failoverdomain name=&amp;quot;first_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;         &lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
    &amp;lt;/failoverdomains&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Resources ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;resources&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target1&amp;quot; mountpoint=&amp;quot;/mnt/ost1&amp;quot; device=&amp;quot;/path/to/ost1/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target2&amp;quot; mountpoint=&amp;quot;/mnt/ost2&amp;quot; device=&amp;quot;/path/to/ost2/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target3&amp;quot; mountpoint=&amp;quot;/mnt/ost3&amp;quot; device=&amp;quot;/path/to/ost3/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target4&amp;quot; mountpoint=&amp;quot;/mnt/ost4&amp;quot; device=&amp;quot;/path/to/ost4/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/resources&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Services ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;second_first&amp;quot; name=&amp;quot;lustre_2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;first_first&amp;quot; name=&amp;quot;lustre_1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target4&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
=== cman_tool ===&lt;br /&gt;
&lt;br /&gt;
=== ccs_tool ===&lt;br /&gt;
&lt;br /&gt;
=== clustat ===&lt;br /&gt;
&lt;br /&gt;
=== clusvcadm ===&lt;br /&gt;
&lt;br /&gt;
=== system-config-cluster ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12029</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12029"/>
		<updated>2010-12-13T14:48:58Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Fencing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
Next the nodes which form the cluster need to be specified. Each cluster node need to be specified separately wrapped in an surrounding &#039;&#039;clusternodes&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;clusternodes&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre1&amp;quot; nodeid=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre1-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre2&amp;quot; nodeid=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre2-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
  &amp;lt;/clusternodes&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each cluster node is given a name which must be it&#039;s hostname or IP address. Additionally a unique node ID needs to be specified. &lt;br /&gt;
The &#039;&#039;fence&#039;&#039; tag assigned to each node specifies a fence device to use to shut down this cluster node. The fence devices are defined elsewhere in &#039;&#039;cluster.conf&#039;&#039; (see below for details).&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
Fencing is essential to keep data on the Lustre file system consistent. Even with Multi-Mount-Protection enabled, fencing can make sure that a node in an unclear state is brought down for more analysis by the administrator.&lt;br /&gt;
&lt;br /&gt;
To configure fencing, first some fence daemon options need to be specified. the &#039;&#039;fence_daemon&#039;&#039; tag is a direct child of the &#039;&#039;cluster&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon clean_start=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Depending on the hardware configuration, these values may differ for different installations. Please see the notes in the cluster_schema_rhel5 document (linked above) for details.&lt;br /&gt;
&lt;br /&gt;
Each Lustre node in a cluster should be equipped with a fencing device. RedHat cluster supports a number of devices. More details on which devices are supported and how to configure them can be found in the cluster schema document.&lt;br /&gt;
For this example IPMI based fencing devices are used.&lt;br /&gt;
The &#039;&#039;fencedevices&#039;&#039; section may look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fencedevices&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre1-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.1&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre2-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.2&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/fencedevices&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resource Manager ===&lt;br /&gt;
&lt;br /&gt;
==== Failover Domains ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;failoverdomains&amp;gt;&lt;br /&gt;
     &amp;lt;failoverdomain name=&amp;quot;second_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
      &amp;lt;failoverdomain name=&amp;quot;first_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;         &lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
    &amp;lt;/failoverdomains&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Resources ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;resources&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target1&amp;quot; mountpoint=&amp;quot;/mnt/ost1&amp;quot; device=&amp;quot;/path/to/ost1/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target2&amp;quot; mountpoint=&amp;quot;/mnt/ost2&amp;quot; device=&amp;quot;/path/to/ost2/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target3&amp;quot; mountpoint=&amp;quot;/mnt/ost3&amp;quot; device=&amp;quot;/path/to/ost3/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target4&amp;quot; mountpoint=&amp;quot;/mnt/ost4&amp;quot; device=&amp;quot;/path/to/ost4/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/resources&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Services ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;second_first&amp;quot; name=&amp;quot;lustre_2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;first_first&amp;quot; name=&amp;quot;lustre_1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target4&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
=== cman_tool ===&lt;br /&gt;
&lt;br /&gt;
=== ccs_tool ===&lt;br /&gt;
&lt;br /&gt;
=== clustat ===&lt;br /&gt;
&lt;br /&gt;
=== clusvcadm ===&lt;br /&gt;
&lt;br /&gt;
=== system-config-cluster ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12028</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12028"/>
		<updated>2010-12-13T14:19:44Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Tools to use with RedHat Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
Next the nodes which form the cluster need to be specified. Each cluster node need to be specified separately wrapped in an surrounding &#039;&#039;clusternodes&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;clusternodes&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre1&amp;quot; nodeid=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre1-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre2&amp;quot; nodeid=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre2-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
  &amp;lt;/clusternodes&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each cluster node is given a name which must be it&#039;s hostname or IP address. Additionally a unique node ID needs to be specified. &lt;br /&gt;
The &#039;&#039;fence&#039;&#039; tag assigned to each node specifies a fence device to use to shut down this cluster node. The fence devices are defined elsewhere in &#039;&#039;cluster.conf&#039;&#039; (see below for details).&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fencedevices&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre1-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.1&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre2-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.2&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/fencedevices&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resource Manager ===&lt;br /&gt;
&lt;br /&gt;
==== Failover Domains ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;failoverdomains&amp;gt;&lt;br /&gt;
     &amp;lt;failoverdomain name=&amp;quot;second_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
      &amp;lt;failoverdomain name=&amp;quot;first_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;         &lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
    &amp;lt;/failoverdomains&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Resources ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;resources&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target1&amp;quot; mountpoint=&amp;quot;/mnt/ost1&amp;quot; device=&amp;quot;/path/to/ost1/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target2&amp;quot; mountpoint=&amp;quot;/mnt/ost2&amp;quot; device=&amp;quot;/path/to/ost2/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target3&amp;quot; mountpoint=&amp;quot;/mnt/ost3&amp;quot; device=&amp;quot;/path/to/ost3/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target4&amp;quot; mountpoint=&amp;quot;/mnt/ost4&amp;quot; device=&amp;quot;/path/to/ost4/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/resources&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Services ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;second_first&amp;quot; name=&amp;quot;lustre_2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;first_first&amp;quot; name=&amp;quot;lustre_1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target4&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
=== cman_tool ===&lt;br /&gt;
&lt;br /&gt;
=== ccs_tool ===&lt;br /&gt;
&lt;br /&gt;
=== clustat ===&lt;br /&gt;
&lt;br /&gt;
=== clusvcadm ===&lt;br /&gt;
&lt;br /&gt;
=== system-config-cluster ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12027</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12027"/>
		<updated>2010-12-13T14:17:13Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* system-config-cluster = */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
Next the nodes which form the cluster need to be specified. Each cluster node need to be specified separately wrapped in an surrounding &#039;&#039;clusternodes&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;clusternodes&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre1&amp;quot; nodeid=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre1-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre2&amp;quot; nodeid=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre2-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
  &amp;lt;/clusternodes&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each cluster node is given a name which must be it&#039;s hostname or IP address. Additionally a unique node ID needs to be specified. &lt;br /&gt;
The &#039;&#039;fence&#039;&#039; tag assigned to each node specifies a fence device to use to shut down this cluster node. The fence devices are defined elsewhere in &#039;&#039;cluster.conf&#039;&#039; (see below for details).&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fencedevices&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre1-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.1&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre2-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.2&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/fencedevices&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resource Manager ===&lt;br /&gt;
&lt;br /&gt;
==== Failover Domains ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;failoverdomains&amp;gt;&lt;br /&gt;
     &amp;lt;failoverdomain name=&amp;quot;second_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
      &amp;lt;failoverdomain name=&amp;quot;first_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;         &lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
    &amp;lt;/failoverdomains&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Resources ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;resources&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target1&amp;quot; mountpoint=&amp;quot;/mnt/ost1&amp;quot; device=&amp;quot;/path/to/ost1/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target2&amp;quot; mountpoint=&amp;quot;/mnt/ost2&amp;quot; device=&amp;quot;/path/to/ost2/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target3&amp;quot; mountpoint=&amp;quot;/mnt/ost3&amp;quot; device=&amp;quot;/path/to/ost3/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target4&amp;quot; mountpoint=&amp;quot;/mnt/ost4&amp;quot; device=&amp;quot;/path/to/ost4/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/resources&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Services ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;second_first&amp;quot; name=&amp;quot;lustre_2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;first_first&amp;quot; name=&amp;quot;lustre_1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target4&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
=== cman_tool ===&lt;br /&gt;
&lt;br /&gt;
=== ccs_tool ===&lt;br /&gt;
&lt;br /&gt;
=== system-config-cluster ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12026</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12026"/>
		<updated>2010-12-13T14:16:59Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Tools to use with RedHat Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
Next the nodes which form the cluster need to be specified. Each cluster node need to be specified separately wrapped in an surrounding &#039;&#039;clusternodes&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;clusternodes&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre1&amp;quot; nodeid=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre1-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre2&amp;quot; nodeid=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre2-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
  &amp;lt;/clusternodes&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each cluster node is given a name which must be it&#039;s hostname or IP address. Additionally a unique node ID needs to be specified. &lt;br /&gt;
The &#039;&#039;fence&#039;&#039; tag assigned to each node specifies a fence device to use to shut down this cluster node. The fence devices are defined elsewhere in &#039;&#039;cluster.conf&#039;&#039; (see below for details).&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fencedevices&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre1-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.1&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre2-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.2&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/fencedevices&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resource Manager ===&lt;br /&gt;
&lt;br /&gt;
==== Failover Domains ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;failoverdomains&amp;gt;&lt;br /&gt;
     &amp;lt;failoverdomain name=&amp;quot;second_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
      &amp;lt;failoverdomain name=&amp;quot;first_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;         &lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
    &amp;lt;/failoverdomains&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Resources ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;resources&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target1&amp;quot; mountpoint=&amp;quot;/mnt/ost1&amp;quot; device=&amp;quot;/path/to/ost1/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target2&amp;quot; mountpoint=&amp;quot;/mnt/ost2&amp;quot; device=&amp;quot;/path/to/ost2/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target3&amp;quot; mountpoint=&amp;quot;/mnt/ost3&amp;quot; device=&amp;quot;/path/to/ost3/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target4&amp;quot; mountpoint=&amp;quot;/mnt/ost4&amp;quot; device=&amp;quot;/path/to/ost4/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/resources&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Services ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;second_first&amp;quot; name=&amp;quot;lustre_2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;first_first&amp;quot; name=&amp;quot;lustre_1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target4&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
=== cman_tool ===&lt;br /&gt;
&lt;br /&gt;
=== ccs_tool ===&lt;br /&gt;
&lt;br /&gt;
=== system-config-cluster ====&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12025</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12025"/>
		<updated>2010-12-13T14:05:27Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Resources */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
Next the nodes which form the cluster need to be specified. Each cluster node need to be specified separately wrapped in an surrounding &#039;&#039;clusternodes&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;clusternodes&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre1&amp;quot; nodeid=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre1-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre2&amp;quot; nodeid=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre2-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
  &amp;lt;/clusternodes&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each cluster node is given a name which must be it&#039;s hostname or IP address. Additionally a unique node ID needs to be specified. &lt;br /&gt;
The &#039;&#039;fence&#039;&#039; tag assigned to each node specifies a fence device to use to shut down this cluster node. The fence devices are defined elsewhere in &#039;&#039;cluster.conf&#039;&#039; (see below for details).&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fencedevices&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre1-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.1&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre2-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.2&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/fencedevices&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resource Manager ===&lt;br /&gt;
&lt;br /&gt;
==== Failover Domains ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;failoverdomains&amp;gt;&lt;br /&gt;
     &amp;lt;failoverdomain name=&amp;quot;second_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
      &amp;lt;failoverdomain name=&amp;quot;first_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;         &lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
    &amp;lt;/failoverdomains&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Resources ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;resources&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target1&amp;quot; mountpoint=&amp;quot;/mnt/ost1&amp;quot; device=&amp;quot;/path/to/ost1/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target2&amp;quot; mountpoint=&amp;quot;/mnt/ost2&amp;quot; device=&amp;quot;/path/to/ost2/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target3&amp;quot; mountpoint=&amp;quot;/mnt/ost3&amp;quot; device=&amp;quot;/path/to/ost3/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;target4&amp;quot; mountpoint=&amp;quot;/mnt/ost4&amp;quot; device=&amp;quot;/path/to/ost4/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/resources&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Services ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;second_first&amp;quot; name=&amp;quot;lustre_2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;first_first&amp;quot; name=&amp;quot;lustre_1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target4&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
=== Services ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12024</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12024"/>
		<updated>2010-12-13T14:04:58Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Services */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
Next the nodes which form the cluster need to be specified. Each cluster node need to be specified separately wrapped in an surrounding &#039;&#039;clusternodes&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;clusternodes&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre1&amp;quot; nodeid=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre1-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre2&amp;quot; nodeid=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre2-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
  &amp;lt;/clusternodes&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each cluster node is given a name which must be it&#039;s hostname or IP address. Additionally a unique node ID needs to be specified. &lt;br /&gt;
The &#039;&#039;fence&#039;&#039; tag assigned to each node specifies a fence device to use to shut down this cluster node. The fence devices are defined elsewhere in &#039;&#039;cluster.conf&#039;&#039; (see below for details).&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fencedevices&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre1-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.1&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre2-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.2&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/fencedevices&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resource Manager ===&lt;br /&gt;
&lt;br /&gt;
==== Failover Domains ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;failoverdomains&amp;gt;&lt;br /&gt;
     &amp;lt;failoverdomain name=&amp;quot;second_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
      &amp;lt;failoverdomain name=&amp;quot;first_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;         &lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
    &amp;lt;/failoverdomains&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Resources ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;resources&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;lun1&amp;quot; mountpoint=&amp;quot;/mnt/ost1&amp;quot; device=&amp;quot;/path/to/ost1/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;lun2&amp;quot; mountpoint=&amp;quot;/mnt/ost2&amp;quot; device=&amp;quot;/path/to/ost2/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;lun3&amp;quot; mountpoint=&amp;quot;/mnt/ost3&amp;quot; device=&amp;quot;/path/to/ost3/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;lun4&amp;quot; mountpoint=&amp;quot;/mnt/ost4&amp;quot; device=&amp;quot;/path/to/ost4/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/resources&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Services ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;second_first&amp;quot; name=&amp;quot;lustre_2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target2&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;service autostart=&amp;quot;1&amp;quot; exclusive=&amp;quot;0&amp;quot; recovery=&amp;quot;relocate&amp;quot; domain=&amp;quot;first_first&amp;quot; name=&amp;quot;lustre_1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target3&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs ref=&amp;quot;target4&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/service&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
=== Services ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12023</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12023"/>
		<updated>2010-12-13T14:03:09Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Resources */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
Next the nodes which form the cluster need to be specified. Each cluster node need to be specified separately wrapped in an surrounding &#039;&#039;clusternodes&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;clusternodes&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre1&amp;quot; nodeid=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre1-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre2&amp;quot; nodeid=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre2-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
  &amp;lt;/clusternodes&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each cluster node is given a name which must be it&#039;s hostname or IP address. Additionally a unique node ID needs to be specified. &lt;br /&gt;
The &#039;&#039;fence&#039;&#039; tag assigned to each node specifies a fence device to use to shut down this cluster node. The fence devices are defined elsewhere in &#039;&#039;cluster.conf&#039;&#039; (see below for details).&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fencedevices&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre1-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.1&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre2-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.2&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/fencedevices&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resource Manager ===&lt;br /&gt;
&lt;br /&gt;
==== Failover Domains ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;failoverdomains&amp;gt;&lt;br /&gt;
     &amp;lt;failoverdomain name=&amp;quot;second_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
      &amp;lt;failoverdomain name=&amp;quot;first_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;         &lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
    &amp;lt;/failoverdomains&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Resources ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;resources&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;lun1&amp;quot; mountpoint=&amp;quot;/mnt/ost1&amp;quot; device=&amp;quot;/path/to/ost1/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;lun2&amp;quot; mountpoint=&amp;quot;/mnt/ost2&amp;quot; device=&amp;quot;/path/to/ost2/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;lun3&amp;quot; mountpoint=&amp;quot;/mnt/ost3&amp;quot; device=&amp;quot;/path/to/ost3/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;lustrefs name=&amp;quot;lun4&amp;quot; mountpoint=&amp;quot;/mnt/ost4&amp;quot; device=&amp;quot;/path/to/ost4/device&amp;quot; force_fsck=&amp;quot;0&amp;quot; force_unmount=&amp;quot;0&amp;quot; self_fence=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/resources&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Services ====&lt;br /&gt;
&lt;br /&gt;
== Tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
=== Services ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12022</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12022"/>
		<updated>2010-12-13T13:48:21Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Configure RedHat Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
Next the nodes which form the cluster need to be specified. Each cluster node need to be specified separately wrapped in an surrounding &#039;&#039;clusternodes&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;clusternodes&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre1&amp;quot; nodeid=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre1-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre2&amp;quot; nodeid=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre2-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
  &amp;lt;/clusternodes&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each cluster node is given a name which must be it&#039;s hostname or IP address. Additionally a unique node ID needs to be specified. &lt;br /&gt;
The &#039;&#039;fence&#039;&#039; tag assigned to each node specifies a fence device to use to shut down this cluster node. The fence devices are defined elsewhere in &#039;&#039;cluster.conf&#039;&#039; (see below for details).&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fencedevices&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre1-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.1&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre2-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.2&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/fencedevices&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resource Manager ===&lt;br /&gt;
&lt;br /&gt;
==== Failover Domains ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;failoverdomains&amp;gt;&lt;br /&gt;
     &amp;lt;failoverdomain name=&amp;quot;second_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
      &amp;lt;failoverdomain name=&amp;quot;first_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;         &lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
    &amp;lt;/failoverdomains&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Resources ====&lt;br /&gt;
&lt;br /&gt;
==== Services ====&lt;br /&gt;
&lt;br /&gt;
== Tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
=== Services ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12021</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12021"/>
		<updated>2010-12-13T13:47:05Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Failover Domains */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
Next the nodes which form the cluster need to be specified. Each cluster node need to be specified separately wrapped in an surrounding &#039;&#039;clusternodes&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;clusternodes&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre1&amp;quot; nodeid=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre1-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre2&amp;quot; nodeid=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre2-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
  &amp;lt;/clusternodes&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each cluster node is given a name which must be it&#039;s hostname or IP address. Additionally a unique node ID needs to be specified. &lt;br /&gt;
The &#039;&#039;fence&#039;&#039; tag assigned to each node specifies a fence device to use to shut down this cluster node. The fence devices are defined elsewhere in &#039;&#039;cluster.conf&#039;&#039; (see below for details).&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fencedevices&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre1-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.1&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre2-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.2&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/fencedevices&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Failover Domains ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;failoverdomains&amp;gt;&lt;br /&gt;
     &amp;lt;failoverdomain name=&amp;quot;second_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
      &amp;lt;failoverdomain name=&amp;quot;first_first&amp;quot; ordered=&amp;quot;1&amp;quot; restricted=&amp;quot;1&amp;quot;&amp;gt;         &lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre1&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;failoverdomainnode name=&amp;quot;lustre2&amp;quot; priority=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;/failoverdomain&amp;gt;&lt;br /&gt;
    &amp;lt;/failoverdomains&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resources ===&lt;br /&gt;
&lt;br /&gt;
== Tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
=== Services ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12020</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12020"/>
		<updated>2010-12-13T13:44:05Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Fencing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
Next the nodes which form the cluster need to be specified. Each cluster node need to be specified separately wrapped in an surrounding &#039;&#039;clusternodes&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;clusternodes&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre1&amp;quot; nodeid=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre1-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre2&amp;quot; nodeid=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre2-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
  &amp;lt;/clusternodes&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each cluster node is given a name which must be it&#039;s hostname or IP address. Additionally a unique node ID needs to be specified. &lt;br /&gt;
The &#039;&#039;fence&#039;&#039; tag assigned to each node specifies a fence device to use to shut down this cluster node. The fence devices are defined elsewhere in &#039;&#039;cluster.conf&#039;&#039; (see below for details).&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fencedevices&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre1-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.1&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;fencedevice name=&amp;quot;lustre2-sp&amp;quot; agent=&amp;quot;fence_ipmilan&amp;quot; auth=&amp;quot;password&amp;quot; ipaddr=&amp;quot;10.0.1.2&amp;quot; login=&amp;quot;root&amp;quot; passwd=&amp;quot;supersecretpassword&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/fencedevices&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Failover Domains ===&lt;br /&gt;
&lt;br /&gt;
=== Resources ===&lt;br /&gt;
&lt;br /&gt;
== Tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
=== Services ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12019</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12019"/>
		<updated>2010-12-13T13:08:17Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Nodes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
Next the nodes which form the cluster need to be specified. Each cluster node need to be specified separately wrapped in an surrounding &#039;&#039;clusternodes&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;clusternodes&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre1&amp;quot; nodeid=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre1-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre2&amp;quot; nodeid=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre2-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
  &amp;lt;/clusternodes&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each cluster node is given a name which must be it&#039;s hostname or IP address. Additionally a unique node ID needs to be specified. &lt;br /&gt;
The &#039;&#039;fence&#039;&#039; tag assigned to each node specifies a fence device to use to shut down this cluster node. The fence devices are defined elsewhere in &#039;&#039;cluster.conf&#039;&#039; (see below for details).&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Failover Domains ===&lt;br /&gt;
&lt;br /&gt;
=== Resources ===&lt;br /&gt;
&lt;br /&gt;
== Tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
=== Services ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12018</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12018"/>
		<updated>2010-12-13T12:46:57Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Nodes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
Next the nodes which form the cluster need to be specified. Each cluster node need to be specified separately wrapped in an surrounding &#039;&#039;clusternodes&#039;&#039; tag.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;clusternodes&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre1&amp;quot; nodeid=&amp;quot;1&amp;quot; votes=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre1-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
    &amp;lt;clusternode name=&amp;quot;lustre2&amp;quot; nodeid=&amp;quot;2&amp;quot; votes=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;fence&amp;gt;&lt;br /&gt;
        &amp;lt;method name=&amp;quot;single&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;device lanplus=&amp;quot;1&amp;quot; name=&amp;quot;lustre2-sp&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/method&amp;gt;&lt;br /&gt;
      &amp;lt;/fence&amp;gt;&lt;br /&gt;
    &amp;lt;/clusternode&amp;gt;&lt;br /&gt;
  &amp;lt;/clusternodes&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Failover Domains ===&lt;br /&gt;
&lt;br /&gt;
=== Resources ===&lt;br /&gt;
&lt;br /&gt;
== Tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
=== Services ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12017</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12017"/>
		<updated>2010-12-13T12:28:54Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Configure RedHat Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells cman, that there are only two nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Failover Domains ===&lt;br /&gt;
&lt;br /&gt;
=== Resources ===&lt;br /&gt;
&lt;br /&gt;
== Tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
=== Services ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12016</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12016"/>
		<updated>2010-12-13T12:28:21Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Configure RedHat Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
RedHat cluster is usually used with more than two nodes providing resources. To tell RedHat cluster to work with two nodes the following &#039;&#039;cman&#039;&#039; attributes need to be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tell cman, that there are only two_nodes in a cluster and one vote is enough declare a node failed.&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Failover Domains ===&lt;br /&gt;
&lt;br /&gt;
=== Resources ===&lt;br /&gt;
&lt;br /&gt;
== Tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
=== Services ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12015</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12015"/>
		<updated>2010-12-13T11:59:10Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Configure RedHat Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
The Basic structure of a cluster.conf file may look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example the name of the cluster is set to &#039;&#039;Lustre&#039;&#039; and the version is initialized as &#039;&#039;1&#039;&#039;. If the cluster configuration is updated the config_version attribute must be increased on all nodes in this cluster.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
=== Failover Domains ===&lt;br /&gt;
&lt;br /&gt;
=== Resources ===&lt;br /&gt;
&lt;br /&gt;
== Tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
=== Services ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12014</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12014"/>
		<updated>2010-12-13T11:53:11Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Configure RedHat Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;cluster config_version=&amp;quot;1&amp;quot; name=&amp;quot;Lustre&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/cluster&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;fence_daemon post_fail_delay=&amp;quot;0&amp;quot; post_join_delay=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;cman expected_votes=&amp;quot;1&amp;quot; two_node=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
=== Failover Domains ===&lt;br /&gt;
&lt;br /&gt;
=== Resources ===&lt;br /&gt;
&lt;br /&gt;
== Tools to use with RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
=== Services ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12013</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12013"/>
		<updated>2010-12-13T11:48:58Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Configure RedHat Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
RedHat Cluster uses &#039;&#039;/etc/cluster/cluster.conf&#039;&#039; as central configuration file. This file is in XML format. The complete schema of the XML file can be found at http://sources.redhat.com/cluster/doc/cluster_schema_rhel5.html.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
=== Failover Domains ===&lt;br /&gt;
&lt;br /&gt;
=== Resources ===&lt;br /&gt;
&lt;br /&gt;
=== Services ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12012</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12012"/>
		<updated>2010-12-13T11:29:46Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Preliminary Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
It is assumed that two Lustre server nodes share a number of Lustre targets. Each of the Lustre nodes provide a number of Lustre targets and in case of a failure the not failed node takes over the Lustre targets of the failed nodes and makes them available to the Lustre clients.&lt;br /&gt;
&lt;br /&gt;
Furthermore, to make sure the Lustre targets are mounted only on one of the Lustre server nodes at a time we implement STONITH fencing. This requires a way to make sure the failed node is shut down in case of a failure. In the examples shown in this article it is assumed that the Lustre server nodes are equipped with a service processor allowing to shut down a failed node using IPMI.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
=== Failover Domains ===&lt;br /&gt;
&lt;br /&gt;
=== Resources ===&lt;br /&gt;
&lt;br /&gt;
=== Services ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12011</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12011"/>
		<updated>2010-12-10T15:40:53Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Services = */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
=== Failover Domains ===&lt;br /&gt;
&lt;br /&gt;
=== Resources ===&lt;br /&gt;
&lt;br /&gt;
=== Services ===&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12010</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12010"/>
		<updated>2010-12-10T15:40:37Z</updated>

		<summary type="html">&lt;p&gt;Sven: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
=== Nodes ===&lt;br /&gt;
&lt;br /&gt;
=== Fencing ===&lt;br /&gt;
&lt;br /&gt;
=== Failover Domains ===&lt;br /&gt;
&lt;br /&gt;
=== Resources ===&lt;br /&gt;
&lt;br /&gt;
=== Services ====&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12009</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12009"/>
		<updated>2010-12-10T15:26:09Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Installing the Lustre Resource Skript */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. &lt;br /&gt;
&lt;br /&gt;
Luckily Giacomo Montagner posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All services that the Pacemaker cluster resource manager will manage are called resources. The Pacemaker cluster resource manager uses resource agents to start, stop or monitor resources. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039;&#039;&#039; The simplest way to configure the cluster is by using a crm subshell. All examples will be given in this notation. If you understood the syntax of the cluster configuration, you also can use the GUI or XML notation.&lt;br /&gt;
&lt;br /&gt;
==== Completing a Basic Setup of the Cluster ====&lt;br /&gt;
&lt;br /&gt;
To test that your cluster manager is running and set global options, complete the steps below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Display the cluster status.&#039;&#039;&#039; Enter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # crm_mon -1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output should look similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
============ &lt;br /&gt;
Last updated: Fri Dec 25 17:31:54 2009 &lt;br /&gt;
Stack&amp;amp;#58; openais &lt;br /&gt;
Current DC: node1 - partition with quorum &lt;br /&gt;
Version&amp;amp;#58; 1.0.6-cebe2b6ff49b36b29a3bd7ada1c4701c7470febe &lt;br /&gt;
2 Nodes configured, 2 expected votes &lt;br /&gt;
0 Resources configured. &lt;br /&gt;
============ &lt;br /&gt;
&lt;br /&gt;
Online&amp;amp;#58; [ node1 node2 ] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This output indicates that &#039;&#039;corosync&#039;&#039; started the cluster resource manager and it is ready to manage resources.&lt;br /&gt;
&lt;br /&gt;
Several global options must be set in the cluster. The two described in the next two steps are especially important to consider. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. If your  cluster consists of just two nodes, switch the quorum feature off.&#039;&#039;&#039; On the command line, enter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;amp;#35; crm configure property no-quorum-policy=ignore &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your lustre setup comprises more than two nodes, you can leave the no-quorum option as it is.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. In a Lustre setup, fencing is normally used and is enabled by default. If you have a good reason not to use it, disable it by entering:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;#35; crm configure property stonith-enabled=false&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the global options of the cluster are set up correctly, continue to the following sections to configure resources and constraints.&lt;br /&gt;
&lt;br /&gt;
==== Configuring Resources ====&lt;br /&gt;
&lt;br /&gt;
OSTs are represented as Filesystem resources. A Lustre cluster consists of several Filesystem resources along with constraints that determine on which nodes of the cluster the resources can run.&lt;br /&gt;
&lt;br /&gt;
By default, the start, stop, and monitor operations in a Filesystem resource time out after 20 sec. Since some mounts in Lustre require up to 5 minutes or more, the default timeouts for these operations must be modified. Also, a monitor operation must be added to the resource so that Pacemaker can check if the resource is still alive and react in case of any problems. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Create a definition of the Filesystem resource and save it in a file such as &#039;&#039;MyOST.res&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you have multiple OSTs, you will need to define additional resources.&lt;br /&gt;
&lt;br /&gt;
The example below shows a complete definition of the Filesystem resource. You will need to change the &#039;&#039;device&#039;&#039; and &#039;&#039;directory&#039;&#039; to correspond to your setup.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
primitive resMyOST ocf&amp;amp;#58;heartbeat&amp;amp;#58;Filesystem \ &lt;br /&gt;
	meta target-role=&amp;quot;stopped&amp;quot; \ &lt;br /&gt;
	operations $id=&amp;quot;resMyOST-operations&amp;quot; \ &lt;br /&gt;
	op monitor interval=&amp;quot;120&amp;quot; timeout=&amp;quot;60&amp;quot; \ &lt;br /&gt;
	op start interval=&amp;quot;0&amp;quot; timeout=&amp;quot;300&amp;quot; \ &lt;br /&gt;
	op stop interval=&amp;quot;0&amp;quot; timeout=&amp;quot;300&amp;quot; \ &lt;br /&gt;
	params device=&amp;quot;device&amp;quot; directory=&amp;quot;directory&amp;quot; fstype=&amp;quot;lustre&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, the resource is initially stopped (&#039;&#039;target-role=”stopped”&#039;&#039;) because the constraints specifying where the resource is to be run have not yet been defined. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;start&#039;&#039; and &#039;&#039;stop&#039;&#039; operations have each been set to a timeout of 300 sec. The resource is monitored at intervals of 120 seconds. The parameters &amp;quot;&#039;&#039;device&#039;&#039;&amp;quot;, &amp;quot;&#039;&#039;directory&#039;&#039;&amp;quot; and &amp;quot;lustre&amp;quot; are passed to the &#039;&#039;mount&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Read the definition into your cluster configuration&#039;&#039;&#039; by entering:&lt;br /&gt;
&lt;br /&gt;
 # crm configure &amp;lt; MyOST.res&lt;br /&gt;
&lt;br /&gt;
You can define as many OST resources as you want. &lt;br /&gt;
&lt;br /&gt;
If a server fails or the monitoring of a OST results in the detection of a failure, the cluster first tries to restart the resource on the failed node. If the node fails to restart it, the resource is migrated to another node.&lt;br /&gt;
&lt;br /&gt;
More sophosticated ways of failure management (such as trying to restart a node three times before migrating to another node) are possible using the cluster resource manager. See the Pacemaker documentation for details.&lt;br /&gt;
&lt;br /&gt;
If mounting the file system depends on another resource like the start of a RAID or multipath driver, you can include this resource in the cluster configuration. This resource is then monitored by the cluster, enabling Pacemaker to react to failures.&lt;br /&gt;
&lt;br /&gt;
==== Configuring Constraints ====&lt;br /&gt;
In a simple Lustre cluster setup, constraints are not required. However, in a larger cluster setup, you may want to use constraints to establish relationships between resources. For example, to keep the load distributed equally across nodes in your cluster, you may want to control how many OSTs can run on a particular node.&lt;br /&gt;
&lt;br /&gt;
Constraints on resources are established by Pacemaker through a point system. Resources accumulate or lose points according to the constraints you define. If a resource has negative points with respect to a certain node, it cannot run on that node.&lt;br /&gt;
&lt;br /&gt;
For example, to constrain the co-location of two resources, complete the steps below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Add co-location constraints between resources.&#039;&#039;&#039; Enter commands similar to the following:&lt;br /&gt;
&lt;br /&gt;
 # crm configure colocation colresOST1resOST2 -100: resOST1 resOST2&lt;br /&gt;
&lt;br /&gt;
This constraint assigns -100 points to resOST2 if an attempt is made to run resOST2 on the same node as resOST1. If the resulting total number of points assigned to reOST2 is negative, it will not be able run on that node. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. After defining all necessary constraints, start the resources.&#039;&#039;&#039; Enter:&lt;br /&gt;
&lt;br /&gt;
 # crm resource start resMyOST&lt;br /&gt;
&lt;br /&gt;
Execute this command for each OST (Filesystem resource) in the cluster.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Use care when setting up your point system. You can use the point system if your cluster has at least three nodes or if the resource can acquire points from other constraints. However, in a system with only two nodes and no way to acquire points, the constraint in the example above will result in an inability to migrate a resource from a failed node. &lt;br /&gt;
&lt;br /&gt;
For example, if resOST1 is running on &#039;&#039;node1&#039;&#039; and resOST2 on &#039;&#039;node2&#039;&#039; and &#039;&#039;node2&#039;&#039; fails, an attempt will be made to run resOST2 on &#039;&#039;node1&#039;&#039;. However, the constraint will assign resOST2 -100 points since resOST1 is already running on &#039;&#039;node1&#039;&#039;. Consequently resOST2 will be unable to run on &#039;&#039;node1&#039;&#039; and, since it is a two-node system, no other node is available.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
To find out more about how the cluster resource manager calculates points, see the Pacemaker documentation.&lt;br /&gt;
&lt;br /&gt;
==== Internal Monitoring of the System ====&lt;br /&gt;
&lt;br /&gt;
In addition to monitoring of the resource itself, the nodes of the cluster must also be monitored. An important parameter to monitor is whether the node is connected to the network. Each node pings one or more hosts and counts the answers it receives. The number of responses determines how “good” its connection is to the network.&lt;br /&gt;
&lt;br /&gt;
Pacemaker provides a simple way to configure this task.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Define a ping resource.&#039;&#039;&#039; In the command below, the &#039;&#039;host_list&#039;&#039; contains a list of hosts that the nodes should ping.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# crm configure resPing ocf:pacemaker:pingd \&lt;br /&gt;
  params host_list=“host1 ...“ multiplier=“10“ dampen=”5s“&lt;br /&gt;
# crm configure clone clonePing resPing&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For every accessible host detected, any resource on that node gets 10 points (set by the &#039;&#039;multiplier=&#039;&#039; parameter). The clone configuration makes the ping resource run on every available node.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Set up constraints to run a resource on the node with the best connectivity.&#039;&#039;&#039; The score from the &#039;&#039;ping&#039;&#039; resource can be used in other constraints to allow a resource to run only on those nodes that have a sufficient ping score. For example, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm configure location locMyOST resMyOST rule $id=&amp;quot;locMyOST&amp;quot; pingd: defined pingd&lt;br /&gt;
&lt;br /&gt;
This location constraint adds the &#039;&#039;ping&#039;&#039; score to the total score assigned to a resource for a particular node. The resource will tend to run on the node with the best connectivity.&lt;br /&gt;
&lt;br /&gt;
Other system checks, such as CPU usage or free RAM, are measured by the Sysinfo resource. The capabilities of the Sysinfo resource are somewhat limited, so it will be replaced by the SystemHealth strategy in future releases of Pacemaker. For more information about the SystemHealth feature, see:&lt;br /&gt;
[http://www.clusterlabs.org/wiki/SystemHealth www.clusterlabs.org/wiki/SystemHealth]&lt;br /&gt;
&lt;br /&gt;
==== 	Administering the Cluster ====&lt;br /&gt;
&lt;br /&gt;
Careful system administration is required to support high availability in a cluster. A primary task of an administrator is to check the cluster for errors or failures of any resources. When a failure occurs, the administrator must search for the cause of the problem, solve it and then reset the corresponding failcounter.&lt;br /&gt;
This section describes some basic commands useful to an administrator. For more detailed information, see the Pacemaker documentation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Displaying a Status Overview&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The command &#039;&#039;crm_mon&#039;&#039; displays an overview of the status of the cluster. It functions similarly to the Linux top command by updating the output each time a cluster event occurs. To generate a one-time output, add the &amp;lt;br&amp;gt;&lt;br /&gt;
option &#039;&#039;-1&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
To include a display of all failcounters for all resources on the nodes, add the &#039;&#039;-f&#039;&#039; option to the command. The output of the command crm_mon -1f looks similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
============ &lt;br /&gt;
Last updated: Fri Dec 25 17:31:54 2009 &lt;br /&gt;
Stack: openais &lt;br /&gt;
Current DC: node1 - partition with quorum &lt;br /&gt;
Version: 1.0.6-cebe2b6ff49b36b29a3bd7ada1c4701c7470febe &lt;br /&gt;
2 Nodes configured, 2 expected votes &lt;br /&gt;
2 Resources configured.&lt;br /&gt;
============&lt;br /&gt;
&lt;br /&gt;
Online: [ node1 node2 ]&lt;br /&gt;
&lt;br /&gt;
Clone Set: clonePing&lt;br /&gt;
     Started: [ node1 node2 ]&lt;br /&gt;
resMyOST       (ocf::heartbeat:filesys): Started node1&lt;br /&gt;
&lt;br /&gt;
Migration summary:&lt;br /&gt;
* Node node1:  pingd=20&lt;br /&gt;
   resMyOST: migration-threshold=1000000 fail-count=1&lt;br /&gt;
* Node node2:  pingd=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Switching a Node to Standby&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can switch a node to standby to, for example, perform maintenance on the node. In standby, the node is still a full member of the cluster but cannot run any resources. All resources that were running on that node are forced away. &lt;br /&gt;
&lt;br /&gt;
To switch the node called &#039;&#039;node01&#039;&#039; to standby, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm node standby node01&lt;br /&gt;
&lt;br /&gt;
To switch the node online again enter:&lt;br /&gt;
&lt;br /&gt;
 # crm node online node01&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Migrating a Resource to Another Node&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The cluster resource manager can migrate a resource from one node to another while the resource is running. To migrate a resource away from the node it is running on, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm resource migrate resMyOST&lt;br /&gt;
&lt;br /&gt;
This command adds a location constraint to the configuration that specifies that the resource &#039;&#039;resMyOST&#039;&#039; can no longer run on the original node. &lt;br /&gt;
&lt;br /&gt;
To delete this constraint, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm resource unmigrate resMyOST&lt;br /&gt;
&lt;br /&gt;
A target node can be specified in the migration command as follows:&lt;br /&gt;
&lt;br /&gt;
 # crm configure migrate resMyOST node02&lt;br /&gt;
&lt;br /&gt;
This command causes the resource &#039;&#039;resMyOST&#039;&#039; to move to node &#039;&#039;node02&#039;&#039;, while adding a location constraint to the configuration. To remove the location constraint, enter the &#039;&#039;unmigrate&#039;&#039; command again.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Resetting the failcounter&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If Pacemaker monitors a resource and finds that it isn’t running, by default it restarts the resource on the node. If the resource cannot be restarted on the node, it then migrates the resource to another node. &lt;br /&gt;
&lt;br /&gt;
It is the administrator’s task to find out the cause of the error and to reset the failcounter of the resource. This can be achieved by entering:&lt;br /&gt;
&lt;br /&gt;
 # crm resource failcount &amp;lt;resource&amp;gt; delete &amp;lt;node&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command deletes (resets) the failcounter for the resource on the specified node.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;“Cleaning up” a Resource&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Sometimes it is necessary to “clean up” a resource. Internally, this command removes any information about a resource from the Local Resource Manager on every node and thus forces a complete re-read of the status of that resource. The command syntax is:&lt;br /&gt;
&lt;br /&gt;
 # crm resource cleanup resMyOST&lt;br /&gt;
&lt;br /&gt;
This command removes information about the resource called &#039;&#039;resMyOST&#039;&#039; on all nodes.&lt;br /&gt;
&lt;br /&gt;
== Setting up Fencing ==&lt;br /&gt;
&lt;br /&gt;
Fencing is a technique used to isolate a node from the cluster when it is malfunctioning to prevent data corruption. For example, if a “split-brain” condition occurs in which two nodes can no longer communicate and both attempt to mount the same filesystem resource, data corruption can result. (The Multiple Mount Protection (MMP) mechanism in Lustre is designed to protect a file system from being mounted simultaneously by more than one node.)&lt;br /&gt;
&lt;br /&gt;
Pacemaker uses the STONITH (Shoot The Other Node In The Head) approach to fencing malfunctioning nodes, in which a malfunctioning node is simply switched off. A good discussion about fencing can be found [http://www.clusterlabs.org/doc/crm_fencing.html here]. This article provides information useful for deciding which devices to purchase or how to set up STONITH resources for your cluster and also provides a detailed setup procedure.&lt;br /&gt;
&lt;br /&gt;
A basic setup includes the following steps:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Test your fencing system manually before configuring the corresponding resources in the cluster.&#039;&#039;&#039; Manual testing is done by calling the STONITH command directly from each node. If this works in all tests, it will work in the cluster.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. After configuring of the according resources, check that the system works as expected.&#039;&#039;&#039; To cause an artificial “split-brain” situation, you could use a host-based firewall to prohibit communication from other nodes on the heartbeat interface(s) by entering:&lt;br /&gt;
&lt;br /&gt;
 # iptables -I INPUT -i &amp;lt;heartbeat-IF&amp;gt; -p 5405 -s &amp;lt;other node&amp;gt; -j DROP&lt;br /&gt;
&lt;br /&gt;
When the other nodes are not able to see the node isolated by the firewall, the isolated node should be shut down or rebooted.&lt;br /&gt;
&lt;br /&gt;
== Setting Up Monitoring ==&lt;br /&gt;
&lt;br /&gt;
Any cluster must to be monitored to provide the high availability it was designed for. Consider the following scenario demonstrating the importance of monitoring: &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;A node fails and all resources migrate to its backup node. Since the failover was smooth, nobody notices the problem. After some time, the second node fails and service stops. This is a serious problem since neither of the nodes is now able to provide service. The administrator must recover data from backups and possibly even install it on new hardware. A significant delay may result for users.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Pacemaker offers several options for making information available to a monitoring system. These include:&lt;br /&gt;
*Utilizing the &#039;&#039;crm_mon&#039;&#039; program to send out information about changes in cluster status. &lt;br /&gt;
*Using scripts to check resource failcounters.&lt;br /&gt;
&lt;br /&gt;
These options are described in the following sections.&lt;br /&gt;
&lt;br /&gt;
==== Using &#039;&#039;crm_mon&#039;&#039; to Send Email Messages ====&lt;br /&gt;
In the most simple setup, the &#039;&#039;crm_mon&#039;&#039; program can be used to send out an email each time the status of the cluster changes. This approach requires a fully working mail environment and &#039;&#039;mail&#039;&#039; command. &lt;br /&gt;
&lt;br /&gt;
Before configuring the &#039;&#039;crm_mon&#039;&#039; daemon, check that emails sent from the command line are delivered correctly by entering:&lt;br /&gt;
&lt;br /&gt;
 # crm_mon --daemonize –-mail-to &amp;lt;user@example.com&amp;gt; [--mail-host mail.example.com]&lt;br /&gt;
&lt;br /&gt;
The resource monitor in the cluster can be configured to ensure the mail alerting service resource is running, as shown below: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
primitive resMON ocf&amp;amp;#58;pacemaker&amp;amp;#58;ClusterMon \ &lt;br /&gt;
	operations $id=&amp;quot;resMON-operations&amp;quot; \ &lt;br /&gt;
	op monitor interval=&amp;quot;180&amp;quot; timeout=&amp;quot;20&amp;quot; \ &lt;br /&gt;
	params extra_options=&amp;quot;--mail-to &amp;lt;your@mail.address&amp;gt;&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a node fails, which could prevent the email from being sent, the resource is started on another node and an email about the successful start of the resource is sent out from the new node. The administrator&#039;s task is to search for the cause of the failover.&lt;br /&gt;
&lt;br /&gt;
==== Using &#039;&#039;crm_mon&#039;&#039; to Send SNMP Traps ====&lt;br /&gt;
The &#039;&#039;crm_mon&#039;&#039; daemon can be used to send SNMP traps to a network management server. The configuration from the command line is:&lt;br /&gt;
&lt;br /&gt;
 # crm_mon –-daemonize –-snmp-traps nms.example.com&lt;br /&gt;
&lt;br /&gt;
This daemon can  also be configured as a cluster resource as shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
primitive resMON ocf&amp;amp;#58;pacemaker&amp;amp;#58;ClusterMon \ &lt;br /&gt;
	operations $id=&amp;quot;resMON-operations&amp;quot; \ &lt;br /&gt;
	op monitor interval=&amp;quot;180&amp;quot; timeout=&amp;quot;20&amp;quot; \ &lt;br /&gt;
	params extra_options=&amp;quot;--snmp-trap nms.example.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The MIB of the traps is defined in the &#039;&#039;PCMKR.txt&#039;&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Polling the Failcounters ====&lt;br /&gt;
If all the nodes of a cluster have problems, pushing information about events may be not be sufficient. An alternative is to check the failcounters of all resources periodically from the network management station (NMS). A simple script that checks for the presence of any failcounters in the output of &#039;&#039;crm_mon -1f&#039;&#039; is shown below:&lt;br /&gt;
&lt;br /&gt;
 # crm_mon -1f | grep fail-count&lt;br /&gt;
&lt;br /&gt;
This script can be called by the NMS via SSH, or by the SNMP agent on the nodes by adding the following line to the Net-SNMP configuration in &#039;&#039;snmpd.conf&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 extend failcounter crm_mon -1f | grep -q fail-count&lt;br /&gt;
&lt;br /&gt;
The code returned by the script can be checked by the NMS using:&lt;br /&gt;
&lt;br /&gt;
 snmpget &amp;lt;node&amp;gt; nsExtend.\”failcounter\”&lt;br /&gt;
&lt;br /&gt;
A result of &#039;&#039;0&#039;&#039; indicates a failure.&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12008</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12008"/>
		<updated>2010-12-10T15:25:26Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Installing the Lustre Resource Skript */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (&#039;&#039;/usr/share/cluster&#039;&#039;) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. Luckily Giacomo Montagner&lt;br /&gt;
 posted an resource script on the lustre-discuss mailing list: &lt;br /&gt;
&lt;br /&gt;
http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
&lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All services that the Pacemaker cluster resource manager will manage are called resources. The Pacemaker cluster resource manager uses resource agents to start, stop or monitor resources. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039;&#039;&#039; The simplest way to configure the cluster is by using a crm subshell. All examples will be given in this notation. If you understood the syntax of the cluster configuration, you also can use the GUI or XML notation.&lt;br /&gt;
&lt;br /&gt;
==== Completing a Basic Setup of the Cluster ====&lt;br /&gt;
&lt;br /&gt;
To test that your cluster manager is running and set global options, complete the steps below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Display the cluster status.&#039;&#039;&#039; Enter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # crm_mon -1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output should look similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
============ &lt;br /&gt;
Last updated: Fri Dec 25 17:31:54 2009 &lt;br /&gt;
Stack&amp;amp;#58; openais &lt;br /&gt;
Current DC: node1 - partition with quorum &lt;br /&gt;
Version&amp;amp;#58; 1.0.6-cebe2b6ff49b36b29a3bd7ada1c4701c7470febe &lt;br /&gt;
2 Nodes configured, 2 expected votes &lt;br /&gt;
0 Resources configured. &lt;br /&gt;
============ &lt;br /&gt;
&lt;br /&gt;
Online&amp;amp;#58; [ node1 node2 ] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This output indicates that &#039;&#039;corosync&#039;&#039; started the cluster resource manager and it is ready to manage resources.&lt;br /&gt;
&lt;br /&gt;
Several global options must be set in the cluster. The two described in the next two steps are especially important to consider. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. If your  cluster consists of just two nodes, switch the quorum feature off.&#039;&#039;&#039; On the command line, enter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;amp;#35; crm configure property no-quorum-policy=ignore &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your lustre setup comprises more than two nodes, you can leave the no-quorum option as it is.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. In a Lustre setup, fencing is normally used and is enabled by default. If you have a good reason not to use it, disable it by entering:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;#35; crm configure property stonith-enabled=false&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the global options of the cluster are set up correctly, continue to the following sections to configure resources and constraints.&lt;br /&gt;
&lt;br /&gt;
==== Configuring Resources ====&lt;br /&gt;
&lt;br /&gt;
OSTs are represented as Filesystem resources. A Lustre cluster consists of several Filesystem resources along with constraints that determine on which nodes of the cluster the resources can run.&lt;br /&gt;
&lt;br /&gt;
By default, the start, stop, and monitor operations in a Filesystem resource time out after 20 sec. Since some mounts in Lustre require up to 5 minutes or more, the default timeouts for these operations must be modified. Also, a monitor operation must be added to the resource so that Pacemaker can check if the resource is still alive and react in case of any problems. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Create a definition of the Filesystem resource and save it in a file such as &#039;&#039;MyOST.res&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you have multiple OSTs, you will need to define additional resources.&lt;br /&gt;
&lt;br /&gt;
The example below shows a complete definition of the Filesystem resource. You will need to change the &#039;&#039;device&#039;&#039; and &#039;&#039;directory&#039;&#039; to correspond to your setup.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
primitive resMyOST ocf&amp;amp;#58;heartbeat&amp;amp;#58;Filesystem \ &lt;br /&gt;
	meta target-role=&amp;quot;stopped&amp;quot; \ &lt;br /&gt;
	operations $id=&amp;quot;resMyOST-operations&amp;quot; \ &lt;br /&gt;
	op monitor interval=&amp;quot;120&amp;quot; timeout=&amp;quot;60&amp;quot; \ &lt;br /&gt;
	op start interval=&amp;quot;0&amp;quot; timeout=&amp;quot;300&amp;quot; \ &lt;br /&gt;
	op stop interval=&amp;quot;0&amp;quot; timeout=&amp;quot;300&amp;quot; \ &lt;br /&gt;
	params device=&amp;quot;device&amp;quot; directory=&amp;quot;directory&amp;quot; fstype=&amp;quot;lustre&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, the resource is initially stopped (&#039;&#039;target-role=”stopped”&#039;&#039;) because the constraints specifying where the resource is to be run have not yet been defined. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;start&#039;&#039; and &#039;&#039;stop&#039;&#039; operations have each been set to a timeout of 300 sec. The resource is monitored at intervals of 120 seconds. The parameters &amp;quot;&#039;&#039;device&#039;&#039;&amp;quot;, &amp;quot;&#039;&#039;directory&#039;&#039;&amp;quot; and &amp;quot;lustre&amp;quot; are passed to the &#039;&#039;mount&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Read the definition into your cluster configuration&#039;&#039;&#039; by entering:&lt;br /&gt;
&lt;br /&gt;
 # crm configure &amp;lt; MyOST.res&lt;br /&gt;
&lt;br /&gt;
You can define as many OST resources as you want. &lt;br /&gt;
&lt;br /&gt;
If a server fails or the monitoring of a OST results in the detection of a failure, the cluster first tries to restart the resource on the failed node. If the node fails to restart it, the resource is migrated to another node.&lt;br /&gt;
&lt;br /&gt;
More sophosticated ways of failure management (such as trying to restart a node three times before migrating to another node) are possible using the cluster resource manager. See the Pacemaker documentation for details.&lt;br /&gt;
&lt;br /&gt;
If mounting the file system depends on another resource like the start of a RAID or multipath driver, you can include this resource in the cluster configuration. This resource is then monitored by the cluster, enabling Pacemaker to react to failures.&lt;br /&gt;
&lt;br /&gt;
==== Configuring Constraints ====&lt;br /&gt;
In a simple Lustre cluster setup, constraints are not required. However, in a larger cluster setup, you may want to use constraints to establish relationships between resources. For example, to keep the load distributed equally across nodes in your cluster, you may want to control how many OSTs can run on a particular node.&lt;br /&gt;
&lt;br /&gt;
Constraints on resources are established by Pacemaker through a point system. Resources accumulate or lose points according to the constraints you define. If a resource has negative points with respect to a certain node, it cannot run on that node.&lt;br /&gt;
&lt;br /&gt;
For example, to constrain the co-location of two resources, complete the steps below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Add co-location constraints between resources.&#039;&#039;&#039; Enter commands similar to the following:&lt;br /&gt;
&lt;br /&gt;
 # crm configure colocation colresOST1resOST2 -100: resOST1 resOST2&lt;br /&gt;
&lt;br /&gt;
This constraint assigns -100 points to resOST2 if an attempt is made to run resOST2 on the same node as resOST1. If the resulting total number of points assigned to reOST2 is negative, it will not be able run on that node. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. After defining all necessary constraints, start the resources.&#039;&#039;&#039; Enter:&lt;br /&gt;
&lt;br /&gt;
 # crm resource start resMyOST&lt;br /&gt;
&lt;br /&gt;
Execute this command for each OST (Filesystem resource) in the cluster.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Use care when setting up your point system. You can use the point system if your cluster has at least three nodes or if the resource can acquire points from other constraints. However, in a system with only two nodes and no way to acquire points, the constraint in the example above will result in an inability to migrate a resource from a failed node. &lt;br /&gt;
&lt;br /&gt;
For example, if resOST1 is running on &#039;&#039;node1&#039;&#039; and resOST2 on &#039;&#039;node2&#039;&#039; and &#039;&#039;node2&#039;&#039; fails, an attempt will be made to run resOST2 on &#039;&#039;node1&#039;&#039;. However, the constraint will assign resOST2 -100 points since resOST1 is already running on &#039;&#039;node1&#039;&#039;. Consequently resOST2 will be unable to run on &#039;&#039;node1&#039;&#039; and, since it is a two-node system, no other node is available.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
To find out more about how the cluster resource manager calculates points, see the Pacemaker documentation.&lt;br /&gt;
&lt;br /&gt;
==== Internal Monitoring of the System ====&lt;br /&gt;
&lt;br /&gt;
In addition to monitoring of the resource itself, the nodes of the cluster must also be monitored. An important parameter to monitor is whether the node is connected to the network. Each node pings one or more hosts and counts the answers it receives. The number of responses determines how “good” its connection is to the network.&lt;br /&gt;
&lt;br /&gt;
Pacemaker provides a simple way to configure this task.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Define a ping resource.&#039;&#039;&#039; In the command below, the &#039;&#039;host_list&#039;&#039; contains a list of hosts that the nodes should ping.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# crm configure resPing ocf:pacemaker:pingd \&lt;br /&gt;
  params host_list=“host1 ...“ multiplier=“10“ dampen=”5s“&lt;br /&gt;
# crm configure clone clonePing resPing&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For every accessible host detected, any resource on that node gets 10 points (set by the &#039;&#039;multiplier=&#039;&#039; parameter). The clone configuration makes the ping resource run on every available node.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Set up constraints to run a resource on the node with the best connectivity.&#039;&#039;&#039; The score from the &#039;&#039;ping&#039;&#039; resource can be used in other constraints to allow a resource to run only on those nodes that have a sufficient ping score. For example, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm configure location locMyOST resMyOST rule $id=&amp;quot;locMyOST&amp;quot; pingd: defined pingd&lt;br /&gt;
&lt;br /&gt;
This location constraint adds the &#039;&#039;ping&#039;&#039; score to the total score assigned to a resource for a particular node. The resource will tend to run on the node with the best connectivity.&lt;br /&gt;
&lt;br /&gt;
Other system checks, such as CPU usage or free RAM, are measured by the Sysinfo resource. The capabilities of the Sysinfo resource are somewhat limited, so it will be replaced by the SystemHealth strategy in future releases of Pacemaker. For more information about the SystemHealth feature, see:&lt;br /&gt;
[http://www.clusterlabs.org/wiki/SystemHealth www.clusterlabs.org/wiki/SystemHealth]&lt;br /&gt;
&lt;br /&gt;
==== 	Administering the Cluster ====&lt;br /&gt;
&lt;br /&gt;
Careful system administration is required to support high availability in a cluster. A primary task of an administrator is to check the cluster for errors or failures of any resources. When a failure occurs, the administrator must search for the cause of the problem, solve it and then reset the corresponding failcounter.&lt;br /&gt;
This section describes some basic commands useful to an administrator. For more detailed information, see the Pacemaker documentation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Displaying a Status Overview&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The command &#039;&#039;crm_mon&#039;&#039; displays an overview of the status of the cluster. It functions similarly to the Linux top command by updating the output each time a cluster event occurs. To generate a one-time output, add the &amp;lt;br&amp;gt;&lt;br /&gt;
option &#039;&#039;-1&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
To include a display of all failcounters for all resources on the nodes, add the &#039;&#039;-f&#039;&#039; option to the command. The output of the command crm_mon -1f looks similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
============ &lt;br /&gt;
Last updated: Fri Dec 25 17:31:54 2009 &lt;br /&gt;
Stack: openais &lt;br /&gt;
Current DC: node1 - partition with quorum &lt;br /&gt;
Version: 1.0.6-cebe2b6ff49b36b29a3bd7ada1c4701c7470febe &lt;br /&gt;
2 Nodes configured, 2 expected votes &lt;br /&gt;
2 Resources configured.&lt;br /&gt;
============&lt;br /&gt;
&lt;br /&gt;
Online: [ node1 node2 ]&lt;br /&gt;
&lt;br /&gt;
Clone Set: clonePing&lt;br /&gt;
     Started: [ node1 node2 ]&lt;br /&gt;
resMyOST       (ocf::heartbeat:filesys): Started node1&lt;br /&gt;
&lt;br /&gt;
Migration summary:&lt;br /&gt;
* Node node1:  pingd=20&lt;br /&gt;
   resMyOST: migration-threshold=1000000 fail-count=1&lt;br /&gt;
* Node node2:  pingd=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Switching a Node to Standby&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can switch a node to standby to, for example, perform maintenance on the node. In standby, the node is still a full member of the cluster but cannot run any resources. All resources that were running on that node are forced away. &lt;br /&gt;
&lt;br /&gt;
To switch the node called &#039;&#039;node01&#039;&#039; to standby, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm node standby node01&lt;br /&gt;
&lt;br /&gt;
To switch the node online again enter:&lt;br /&gt;
&lt;br /&gt;
 # crm node online node01&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Migrating a Resource to Another Node&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The cluster resource manager can migrate a resource from one node to another while the resource is running. To migrate a resource away from the node it is running on, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm resource migrate resMyOST&lt;br /&gt;
&lt;br /&gt;
This command adds a location constraint to the configuration that specifies that the resource &#039;&#039;resMyOST&#039;&#039; can no longer run on the original node. &lt;br /&gt;
&lt;br /&gt;
To delete this constraint, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm resource unmigrate resMyOST&lt;br /&gt;
&lt;br /&gt;
A target node can be specified in the migration command as follows:&lt;br /&gt;
&lt;br /&gt;
 # crm configure migrate resMyOST node02&lt;br /&gt;
&lt;br /&gt;
This command causes the resource &#039;&#039;resMyOST&#039;&#039; to move to node &#039;&#039;node02&#039;&#039;, while adding a location constraint to the configuration. To remove the location constraint, enter the &#039;&#039;unmigrate&#039;&#039; command again.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Resetting the failcounter&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If Pacemaker monitors a resource and finds that it isn’t running, by default it restarts the resource on the node. If the resource cannot be restarted on the node, it then migrates the resource to another node. &lt;br /&gt;
&lt;br /&gt;
It is the administrator’s task to find out the cause of the error and to reset the failcounter of the resource. This can be achieved by entering:&lt;br /&gt;
&lt;br /&gt;
 # crm resource failcount &amp;lt;resource&amp;gt; delete &amp;lt;node&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command deletes (resets) the failcounter for the resource on the specified node.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;“Cleaning up” a Resource&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Sometimes it is necessary to “clean up” a resource. Internally, this command removes any information about a resource from the Local Resource Manager on every node and thus forces a complete re-read of the status of that resource. The command syntax is:&lt;br /&gt;
&lt;br /&gt;
 # crm resource cleanup resMyOST&lt;br /&gt;
&lt;br /&gt;
This command removes information about the resource called &#039;&#039;resMyOST&#039;&#039; on all nodes.&lt;br /&gt;
&lt;br /&gt;
== Setting up Fencing ==&lt;br /&gt;
&lt;br /&gt;
Fencing is a technique used to isolate a node from the cluster when it is malfunctioning to prevent data corruption. For example, if a “split-brain” condition occurs in which two nodes can no longer communicate and both attempt to mount the same filesystem resource, data corruption can result. (The Multiple Mount Protection (MMP) mechanism in Lustre is designed to protect a file system from being mounted simultaneously by more than one node.)&lt;br /&gt;
&lt;br /&gt;
Pacemaker uses the STONITH (Shoot The Other Node In The Head) approach to fencing malfunctioning nodes, in which a malfunctioning node is simply switched off. A good discussion about fencing can be found [http://www.clusterlabs.org/doc/crm_fencing.html here]. This article provides information useful for deciding which devices to purchase or how to set up STONITH resources for your cluster and also provides a detailed setup procedure.&lt;br /&gt;
&lt;br /&gt;
A basic setup includes the following steps:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Test your fencing system manually before configuring the corresponding resources in the cluster.&#039;&#039;&#039; Manual testing is done by calling the STONITH command directly from each node. If this works in all tests, it will work in the cluster.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. After configuring of the according resources, check that the system works as expected.&#039;&#039;&#039; To cause an artificial “split-brain” situation, you could use a host-based firewall to prohibit communication from other nodes on the heartbeat interface(s) by entering:&lt;br /&gt;
&lt;br /&gt;
 # iptables -I INPUT -i &amp;lt;heartbeat-IF&amp;gt; -p 5405 -s &amp;lt;other node&amp;gt; -j DROP&lt;br /&gt;
&lt;br /&gt;
When the other nodes are not able to see the node isolated by the firewall, the isolated node should be shut down or rebooted.&lt;br /&gt;
&lt;br /&gt;
== Setting Up Monitoring ==&lt;br /&gt;
&lt;br /&gt;
Any cluster must to be monitored to provide the high availability it was designed for. Consider the following scenario demonstrating the importance of monitoring: &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;A node fails and all resources migrate to its backup node. Since the failover was smooth, nobody notices the problem. After some time, the second node fails and service stops. This is a serious problem since neither of the nodes is now able to provide service. The administrator must recover data from backups and possibly even install it on new hardware. A significant delay may result for users.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Pacemaker offers several options for making information available to a monitoring system. These include:&lt;br /&gt;
*Utilizing the &#039;&#039;crm_mon&#039;&#039; program to send out information about changes in cluster status. &lt;br /&gt;
*Using scripts to check resource failcounters.&lt;br /&gt;
&lt;br /&gt;
These options are described in the following sections.&lt;br /&gt;
&lt;br /&gt;
==== Using &#039;&#039;crm_mon&#039;&#039; to Send Email Messages ====&lt;br /&gt;
In the most simple setup, the &#039;&#039;crm_mon&#039;&#039; program can be used to send out an email each time the status of the cluster changes. This approach requires a fully working mail environment and &#039;&#039;mail&#039;&#039; command. &lt;br /&gt;
&lt;br /&gt;
Before configuring the &#039;&#039;crm_mon&#039;&#039; daemon, check that emails sent from the command line are delivered correctly by entering:&lt;br /&gt;
&lt;br /&gt;
 # crm_mon --daemonize –-mail-to &amp;lt;user@example.com&amp;gt; [--mail-host mail.example.com]&lt;br /&gt;
&lt;br /&gt;
The resource monitor in the cluster can be configured to ensure the mail alerting service resource is running, as shown below: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
primitive resMON ocf&amp;amp;#58;pacemaker&amp;amp;#58;ClusterMon \ &lt;br /&gt;
	operations $id=&amp;quot;resMON-operations&amp;quot; \ &lt;br /&gt;
	op monitor interval=&amp;quot;180&amp;quot; timeout=&amp;quot;20&amp;quot; \ &lt;br /&gt;
	params extra_options=&amp;quot;--mail-to &amp;lt;your@mail.address&amp;gt;&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a node fails, which could prevent the email from being sent, the resource is started on another node and an email about the successful start of the resource is sent out from the new node. The administrator&#039;s task is to search for the cause of the failover.&lt;br /&gt;
&lt;br /&gt;
==== Using &#039;&#039;crm_mon&#039;&#039; to Send SNMP Traps ====&lt;br /&gt;
The &#039;&#039;crm_mon&#039;&#039; daemon can be used to send SNMP traps to a network management server. The configuration from the command line is:&lt;br /&gt;
&lt;br /&gt;
 # crm_mon –-daemonize –-snmp-traps nms.example.com&lt;br /&gt;
&lt;br /&gt;
This daemon can  also be configured as a cluster resource as shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
primitive resMON ocf&amp;amp;#58;pacemaker&amp;amp;#58;ClusterMon \ &lt;br /&gt;
	operations $id=&amp;quot;resMON-operations&amp;quot; \ &lt;br /&gt;
	op monitor interval=&amp;quot;180&amp;quot; timeout=&amp;quot;20&amp;quot; \ &lt;br /&gt;
	params extra_options=&amp;quot;--snmp-trap nms.example.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The MIB of the traps is defined in the &#039;&#039;PCMKR.txt&#039;&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Polling the Failcounters ====&lt;br /&gt;
If all the nodes of a cluster have problems, pushing information about events may be not be sufficient. An alternative is to check the failcounters of all resources periodically from the network management station (NMS). A simple script that checks for the presence of any failcounters in the output of &#039;&#039;crm_mon -1f&#039;&#039; is shown below:&lt;br /&gt;
&lt;br /&gt;
 # crm_mon -1f | grep fail-count&lt;br /&gt;
&lt;br /&gt;
This script can be called by the NMS via SSH, or by the SNMP agent on the nodes by adding the following line to the Net-SNMP configuration in &#039;&#039;snmpd.conf&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 extend failcounter crm_mon -1f | grep -q fail-count&lt;br /&gt;
&lt;br /&gt;
The code returned by the script can be checked by the NMS using:&lt;br /&gt;
&lt;br /&gt;
 snmpget &amp;lt;node&amp;gt; nsExtend.\”failcounter\”&lt;br /&gt;
&lt;br /&gt;
A result of &#039;&#039;0&#039;&#039; indicates a failure.&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12007</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12007"/>
		<updated>2010-12-10T15:24:47Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Installing the Lustre Resource Skript */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (/usr/share/cluster) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included. Luckily Giacomo Montagner&lt;br /&gt;
 posted an resource script on the lustre-discuss mailing list: http://lists.lustre.org/pipermail/lustre-discuss/attachments/20090623/7799de37/attachment-0001.bin &lt;br /&gt;
After downloading this file it needs to be copied to /usr/share/cluster/lustrefs.sh.&lt;br /&gt;
Make sure the script is executable.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All services that the Pacemaker cluster resource manager will manage are called resources. The Pacemaker cluster resource manager uses resource agents to start, stop or monitor resources. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039;&#039;&#039; The simplest way to configure the cluster is by using a crm subshell. All examples will be given in this notation. If you understood the syntax of the cluster configuration, you also can use the GUI or XML notation.&lt;br /&gt;
&lt;br /&gt;
==== Completing a Basic Setup of the Cluster ====&lt;br /&gt;
&lt;br /&gt;
To test that your cluster manager is running and set global options, complete the steps below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Display the cluster status.&#039;&#039;&#039; Enter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # crm_mon -1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output should look similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
============ &lt;br /&gt;
Last updated: Fri Dec 25 17:31:54 2009 &lt;br /&gt;
Stack&amp;amp;#58; openais &lt;br /&gt;
Current DC: node1 - partition with quorum &lt;br /&gt;
Version&amp;amp;#58; 1.0.6-cebe2b6ff49b36b29a3bd7ada1c4701c7470febe &lt;br /&gt;
2 Nodes configured, 2 expected votes &lt;br /&gt;
0 Resources configured. &lt;br /&gt;
============ &lt;br /&gt;
&lt;br /&gt;
Online&amp;amp;#58; [ node1 node2 ] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This output indicates that &#039;&#039;corosync&#039;&#039; started the cluster resource manager and it is ready to manage resources.&lt;br /&gt;
&lt;br /&gt;
Several global options must be set in the cluster. The two described in the next two steps are especially important to consider. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. If your  cluster consists of just two nodes, switch the quorum feature off.&#039;&#039;&#039; On the command line, enter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;amp;#35; crm configure property no-quorum-policy=ignore &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your lustre setup comprises more than two nodes, you can leave the no-quorum option as it is.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. In a Lustre setup, fencing is normally used and is enabled by default. If you have a good reason not to use it, disable it by entering:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;#35; crm configure property stonith-enabled=false&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the global options of the cluster are set up correctly, continue to the following sections to configure resources and constraints.&lt;br /&gt;
&lt;br /&gt;
==== Configuring Resources ====&lt;br /&gt;
&lt;br /&gt;
OSTs are represented as Filesystem resources. A Lustre cluster consists of several Filesystem resources along with constraints that determine on which nodes of the cluster the resources can run.&lt;br /&gt;
&lt;br /&gt;
By default, the start, stop, and monitor operations in a Filesystem resource time out after 20 sec. Since some mounts in Lustre require up to 5 minutes or more, the default timeouts for these operations must be modified. Also, a monitor operation must be added to the resource so that Pacemaker can check if the resource is still alive and react in case of any problems. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Create a definition of the Filesystem resource and save it in a file such as &#039;&#039;MyOST.res&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you have multiple OSTs, you will need to define additional resources.&lt;br /&gt;
&lt;br /&gt;
The example below shows a complete definition of the Filesystem resource. You will need to change the &#039;&#039;device&#039;&#039; and &#039;&#039;directory&#039;&#039; to correspond to your setup.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
primitive resMyOST ocf&amp;amp;#58;heartbeat&amp;amp;#58;Filesystem \ &lt;br /&gt;
	meta target-role=&amp;quot;stopped&amp;quot; \ &lt;br /&gt;
	operations $id=&amp;quot;resMyOST-operations&amp;quot; \ &lt;br /&gt;
	op monitor interval=&amp;quot;120&amp;quot; timeout=&amp;quot;60&amp;quot; \ &lt;br /&gt;
	op start interval=&amp;quot;0&amp;quot; timeout=&amp;quot;300&amp;quot; \ &lt;br /&gt;
	op stop interval=&amp;quot;0&amp;quot; timeout=&amp;quot;300&amp;quot; \ &lt;br /&gt;
	params device=&amp;quot;device&amp;quot; directory=&amp;quot;directory&amp;quot; fstype=&amp;quot;lustre&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, the resource is initially stopped (&#039;&#039;target-role=”stopped”&#039;&#039;) because the constraints specifying where the resource is to be run have not yet been defined. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;start&#039;&#039; and &#039;&#039;stop&#039;&#039; operations have each been set to a timeout of 300 sec. The resource is monitored at intervals of 120 seconds. The parameters &amp;quot;&#039;&#039;device&#039;&#039;&amp;quot;, &amp;quot;&#039;&#039;directory&#039;&#039;&amp;quot; and &amp;quot;lustre&amp;quot; are passed to the &#039;&#039;mount&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Read the definition into your cluster configuration&#039;&#039;&#039; by entering:&lt;br /&gt;
&lt;br /&gt;
 # crm configure &amp;lt; MyOST.res&lt;br /&gt;
&lt;br /&gt;
You can define as many OST resources as you want. &lt;br /&gt;
&lt;br /&gt;
If a server fails or the monitoring of a OST results in the detection of a failure, the cluster first tries to restart the resource on the failed node. If the node fails to restart it, the resource is migrated to another node.&lt;br /&gt;
&lt;br /&gt;
More sophosticated ways of failure management (such as trying to restart a node three times before migrating to another node) are possible using the cluster resource manager. See the Pacemaker documentation for details.&lt;br /&gt;
&lt;br /&gt;
If mounting the file system depends on another resource like the start of a RAID or multipath driver, you can include this resource in the cluster configuration. This resource is then monitored by the cluster, enabling Pacemaker to react to failures.&lt;br /&gt;
&lt;br /&gt;
==== Configuring Constraints ====&lt;br /&gt;
In a simple Lustre cluster setup, constraints are not required. However, in a larger cluster setup, you may want to use constraints to establish relationships between resources. For example, to keep the load distributed equally across nodes in your cluster, you may want to control how many OSTs can run on a particular node.&lt;br /&gt;
&lt;br /&gt;
Constraints on resources are established by Pacemaker through a point system. Resources accumulate or lose points according to the constraints you define. If a resource has negative points with respect to a certain node, it cannot run on that node.&lt;br /&gt;
&lt;br /&gt;
For example, to constrain the co-location of two resources, complete the steps below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Add co-location constraints between resources.&#039;&#039;&#039; Enter commands similar to the following:&lt;br /&gt;
&lt;br /&gt;
 # crm configure colocation colresOST1resOST2 -100: resOST1 resOST2&lt;br /&gt;
&lt;br /&gt;
This constraint assigns -100 points to resOST2 if an attempt is made to run resOST2 on the same node as resOST1. If the resulting total number of points assigned to reOST2 is negative, it will not be able run on that node. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. After defining all necessary constraints, start the resources.&#039;&#039;&#039; Enter:&lt;br /&gt;
&lt;br /&gt;
 # crm resource start resMyOST&lt;br /&gt;
&lt;br /&gt;
Execute this command for each OST (Filesystem resource) in the cluster.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Use care when setting up your point system. You can use the point system if your cluster has at least three nodes or if the resource can acquire points from other constraints. However, in a system with only two nodes and no way to acquire points, the constraint in the example above will result in an inability to migrate a resource from a failed node. &lt;br /&gt;
&lt;br /&gt;
For example, if resOST1 is running on &#039;&#039;node1&#039;&#039; and resOST2 on &#039;&#039;node2&#039;&#039; and &#039;&#039;node2&#039;&#039; fails, an attempt will be made to run resOST2 on &#039;&#039;node1&#039;&#039;. However, the constraint will assign resOST2 -100 points since resOST1 is already running on &#039;&#039;node1&#039;&#039;. Consequently resOST2 will be unable to run on &#039;&#039;node1&#039;&#039; and, since it is a two-node system, no other node is available.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
To find out more about how the cluster resource manager calculates points, see the Pacemaker documentation.&lt;br /&gt;
&lt;br /&gt;
==== Internal Monitoring of the System ====&lt;br /&gt;
&lt;br /&gt;
In addition to monitoring of the resource itself, the nodes of the cluster must also be monitored. An important parameter to monitor is whether the node is connected to the network. Each node pings one or more hosts and counts the answers it receives. The number of responses determines how “good” its connection is to the network.&lt;br /&gt;
&lt;br /&gt;
Pacemaker provides a simple way to configure this task.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Define a ping resource.&#039;&#039;&#039; In the command below, the &#039;&#039;host_list&#039;&#039; contains a list of hosts that the nodes should ping.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# crm configure resPing ocf:pacemaker:pingd \&lt;br /&gt;
  params host_list=“host1 ...“ multiplier=“10“ dampen=”5s“&lt;br /&gt;
# crm configure clone clonePing resPing&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For every accessible host detected, any resource on that node gets 10 points (set by the &#039;&#039;multiplier=&#039;&#039; parameter). The clone configuration makes the ping resource run on every available node.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Set up constraints to run a resource on the node with the best connectivity.&#039;&#039;&#039; The score from the &#039;&#039;ping&#039;&#039; resource can be used in other constraints to allow a resource to run only on those nodes that have a sufficient ping score. For example, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm configure location locMyOST resMyOST rule $id=&amp;quot;locMyOST&amp;quot; pingd: defined pingd&lt;br /&gt;
&lt;br /&gt;
This location constraint adds the &#039;&#039;ping&#039;&#039; score to the total score assigned to a resource for a particular node. The resource will tend to run on the node with the best connectivity.&lt;br /&gt;
&lt;br /&gt;
Other system checks, such as CPU usage or free RAM, are measured by the Sysinfo resource. The capabilities of the Sysinfo resource are somewhat limited, so it will be replaced by the SystemHealth strategy in future releases of Pacemaker. For more information about the SystemHealth feature, see:&lt;br /&gt;
[http://www.clusterlabs.org/wiki/SystemHealth www.clusterlabs.org/wiki/SystemHealth]&lt;br /&gt;
&lt;br /&gt;
==== 	Administering the Cluster ====&lt;br /&gt;
&lt;br /&gt;
Careful system administration is required to support high availability in a cluster. A primary task of an administrator is to check the cluster for errors or failures of any resources. When a failure occurs, the administrator must search for the cause of the problem, solve it and then reset the corresponding failcounter.&lt;br /&gt;
This section describes some basic commands useful to an administrator. For more detailed information, see the Pacemaker documentation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Displaying a Status Overview&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The command &#039;&#039;crm_mon&#039;&#039; displays an overview of the status of the cluster. It functions similarly to the Linux top command by updating the output each time a cluster event occurs. To generate a one-time output, add the &amp;lt;br&amp;gt;&lt;br /&gt;
option &#039;&#039;-1&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
To include a display of all failcounters for all resources on the nodes, add the &#039;&#039;-f&#039;&#039; option to the command. The output of the command crm_mon -1f looks similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
============ &lt;br /&gt;
Last updated: Fri Dec 25 17:31:54 2009 &lt;br /&gt;
Stack: openais &lt;br /&gt;
Current DC: node1 - partition with quorum &lt;br /&gt;
Version: 1.0.6-cebe2b6ff49b36b29a3bd7ada1c4701c7470febe &lt;br /&gt;
2 Nodes configured, 2 expected votes &lt;br /&gt;
2 Resources configured.&lt;br /&gt;
============&lt;br /&gt;
&lt;br /&gt;
Online: [ node1 node2 ]&lt;br /&gt;
&lt;br /&gt;
Clone Set: clonePing&lt;br /&gt;
     Started: [ node1 node2 ]&lt;br /&gt;
resMyOST       (ocf::heartbeat:filesys): Started node1&lt;br /&gt;
&lt;br /&gt;
Migration summary:&lt;br /&gt;
* Node node1:  pingd=20&lt;br /&gt;
   resMyOST: migration-threshold=1000000 fail-count=1&lt;br /&gt;
* Node node2:  pingd=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Switching a Node to Standby&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can switch a node to standby to, for example, perform maintenance on the node. In standby, the node is still a full member of the cluster but cannot run any resources. All resources that were running on that node are forced away. &lt;br /&gt;
&lt;br /&gt;
To switch the node called &#039;&#039;node01&#039;&#039; to standby, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm node standby node01&lt;br /&gt;
&lt;br /&gt;
To switch the node online again enter:&lt;br /&gt;
&lt;br /&gt;
 # crm node online node01&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Migrating a Resource to Another Node&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The cluster resource manager can migrate a resource from one node to another while the resource is running. To migrate a resource away from the node it is running on, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm resource migrate resMyOST&lt;br /&gt;
&lt;br /&gt;
This command adds a location constraint to the configuration that specifies that the resource &#039;&#039;resMyOST&#039;&#039; can no longer run on the original node. &lt;br /&gt;
&lt;br /&gt;
To delete this constraint, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm resource unmigrate resMyOST&lt;br /&gt;
&lt;br /&gt;
A target node can be specified in the migration command as follows:&lt;br /&gt;
&lt;br /&gt;
 # crm configure migrate resMyOST node02&lt;br /&gt;
&lt;br /&gt;
This command causes the resource &#039;&#039;resMyOST&#039;&#039; to move to node &#039;&#039;node02&#039;&#039;, while adding a location constraint to the configuration. To remove the location constraint, enter the &#039;&#039;unmigrate&#039;&#039; command again.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Resetting the failcounter&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If Pacemaker monitors a resource and finds that it isn’t running, by default it restarts the resource on the node. If the resource cannot be restarted on the node, it then migrates the resource to another node. &lt;br /&gt;
&lt;br /&gt;
It is the administrator’s task to find out the cause of the error and to reset the failcounter of the resource. This can be achieved by entering:&lt;br /&gt;
&lt;br /&gt;
 # crm resource failcount &amp;lt;resource&amp;gt; delete &amp;lt;node&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command deletes (resets) the failcounter for the resource on the specified node.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;“Cleaning up” a Resource&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Sometimes it is necessary to “clean up” a resource. Internally, this command removes any information about a resource from the Local Resource Manager on every node and thus forces a complete re-read of the status of that resource. The command syntax is:&lt;br /&gt;
&lt;br /&gt;
 # crm resource cleanup resMyOST&lt;br /&gt;
&lt;br /&gt;
This command removes information about the resource called &#039;&#039;resMyOST&#039;&#039; on all nodes.&lt;br /&gt;
&lt;br /&gt;
== Setting up Fencing ==&lt;br /&gt;
&lt;br /&gt;
Fencing is a technique used to isolate a node from the cluster when it is malfunctioning to prevent data corruption. For example, if a “split-brain” condition occurs in which two nodes can no longer communicate and both attempt to mount the same filesystem resource, data corruption can result. (The Multiple Mount Protection (MMP) mechanism in Lustre is designed to protect a file system from being mounted simultaneously by more than one node.)&lt;br /&gt;
&lt;br /&gt;
Pacemaker uses the STONITH (Shoot The Other Node In The Head) approach to fencing malfunctioning nodes, in which a malfunctioning node is simply switched off. A good discussion about fencing can be found [http://www.clusterlabs.org/doc/crm_fencing.html here]. This article provides information useful for deciding which devices to purchase or how to set up STONITH resources for your cluster and also provides a detailed setup procedure.&lt;br /&gt;
&lt;br /&gt;
A basic setup includes the following steps:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Test your fencing system manually before configuring the corresponding resources in the cluster.&#039;&#039;&#039; Manual testing is done by calling the STONITH command directly from each node. If this works in all tests, it will work in the cluster.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. After configuring of the according resources, check that the system works as expected.&#039;&#039;&#039; To cause an artificial “split-brain” situation, you could use a host-based firewall to prohibit communication from other nodes on the heartbeat interface(s) by entering:&lt;br /&gt;
&lt;br /&gt;
 # iptables -I INPUT -i &amp;lt;heartbeat-IF&amp;gt; -p 5405 -s &amp;lt;other node&amp;gt; -j DROP&lt;br /&gt;
&lt;br /&gt;
When the other nodes are not able to see the node isolated by the firewall, the isolated node should be shut down or rebooted.&lt;br /&gt;
&lt;br /&gt;
== Setting Up Monitoring ==&lt;br /&gt;
&lt;br /&gt;
Any cluster must to be monitored to provide the high availability it was designed for. Consider the following scenario demonstrating the importance of monitoring: &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;A node fails and all resources migrate to its backup node. Since the failover was smooth, nobody notices the problem. After some time, the second node fails and service stops. This is a serious problem since neither of the nodes is now able to provide service. The administrator must recover data from backups and possibly even install it on new hardware. A significant delay may result for users.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Pacemaker offers several options for making information available to a monitoring system. These include:&lt;br /&gt;
*Utilizing the &#039;&#039;crm_mon&#039;&#039; program to send out information about changes in cluster status. &lt;br /&gt;
*Using scripts to check resource failcounters.&lt;br /&gt;
&lt;br /&gt;
These options are described in the following sections.&lt;br /&gt;
&lt;br /&gt;
==== Using &#039;&#039;crm_mon&#039;&#039; to Send Email Messages ====&lt;br /&gt;
In the most simple setup, the &#039;&#039;crm_mon&#039;&#039; program can be used to send out an email each time the status of the cluster changes. This approach requires a fully working mail environment and &#039;&#039;mail&#039;&#039; command. &lt;br /&gt;
&lt;br /&gt;
Before configuring the &#039;&#039;crm_mon&#039;&#039; daemon, check that emails sent from the command line are delivered correctly by entering:&lt;br /&gt;
&lt;br /&gt;
 # crm_mon --daemonize –-mail-to &amp;lt;user@example.com&amp;gt; [--mail-host mail.example.com]&lt;br /&gt;
&lt;br /&gt;
The resource monitor in the cluster can be configured to ensure the mail alerting service resource is running, as shown below: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
primitive resMON ocf&amp;amp;#58;pacemaker&amp;amp;#58;ClusterMon \ &lt;br /&gt;
	operations $id=&amp;quot;resMON-operations&amp;quot; \ &lt;br /&gt;
	op monitor interval=&amp;quot;180&amp;quot; timeout=&amp;quot;20&amp;quot; \ &lt;br /&gt;
	params extra_options=&amp;quot;--mail-to &amp;lt;your@mail.address&amp;gt;&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a node fails, which could prevent the email from being sent, the resource is started on another node and an email about the successful start of the resource is sent out from the new node. The administrator&#039;s task is to search for the cause of the failover.&lt;br /&gt;
&lt;br /&gt;
==== Using &#039;&#039;crm_mon&#039;&#039; to Send SNMP Traps ====&lt;br /&gt;
The &#039;&#039;crm_mon&#039;&#039; daemon can be used to send SNMP traps to a network management server. The configuration from the command line is:&lt;br /&gt;
&lt;br /&gt;
 # crm_mon –-daemonize –-snmp-traps nms.example.com&lt;br /&gt;
&lt;br /&gt;
This daemon can  also be configured as a cluster resource as shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
primitive resMON ocf&amp;amp;#58;pacemaker&amp;amp;#58;ClusterMon \ &lt;br /&gt;
	operations $id=&amp;quot;resMON-operations&amp;quot; \ &lt;br /&gt;
	op monitor interval=&amp;quot;180&amp;quot; timeout=&amp;quot;20&amp;quot; \ &lt;br /&gt;
	params extra_options=&amp;quot;--snmp-trap nms.example.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The MIB of the traps is defined in the &#039;&#039;PCMKR.txt&#039;&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Polling the Failcounters ====&lt;br /&gt;
If all the nodes of a cluster have problems, pushing information about events may be not be sufficient. An alternative is to check the failcounters of all resources periodically from the network management station (NMS). A simple script that checks for the presence of any failcounters in the output of &#039;&#039;crm_mon -1f&#039;&#039; is shown below:&lt;br /&gt;
&lt;br /&gt;
 # crm_mon -1f | grep fail-count&lt;br /&gt;
&lt;br /&gt;
This script can be called by the NMS via SSH, or by the SNMP agent on the nodes by adding the following line to the Net-SNMP configuration in &#039;&#039;snmpd.conf&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 extend failcounter crm_mon -1f | grep -q fail-count&lt;br /&gt;
&lt;br /&gt;
The code returned by the script can be checked by the NMS using:&lt;br /&gt;
&lt;br /&gt;
 snmpget &amp;lt;node&amp;gt; nsExtend.\”failcounter\”&lt;br /&gt;
&lt;br /&gt;
A result of &#039;&#039;0&#039;&#039; indicates a failure.&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12006</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12006"/>
		<updated>2010-12-10T15:06:00Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Installing the Lustre Resource Skript */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;rgmanager&#039;&#039; package includes a number of resource scripts (/usr/share/cluster) which are used to integrate resources like network interfaces or file systems with &#039;&#039;rgmanager&#039;&#039;. Unfortunately, there is no resource script for Lustre included.&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All services that the Pacemaker cluster resource manager will manage are called resources. The Pacemaker cluster resource manager uses resource agents to start, stop or monitor resources. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039;&#039;&#039; The simplest way to configure the cluster is by using a crm subshell. All examples will be given in this notation. If you understood the syntax of the cluster configuration, you also can use the GUI or XML notation.&lt;br /&gt;
&lt;br /&gt;
==== Completing a Basic Setup of the Cluster ====&lt;br /&gt;
&lt;br /&gt;
To test that your cluster manager is running and set global options, complete the steps below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Display the cluster status.&#039;&#039;&#039; Enter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # crm_mon -1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output should look similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
============ &lt;br /&gt;
Last updated: Fri Dec 25 17:31:54 2009 &lt;br /&gt;
Stack&amp;amp;#58; openais &lt;br /&gt;
Current DC: node1 - partition with quorum &lt;br /&gt;
Version&amp;amp;#58; 1.0.6-cebe2b6ff49b36b29a3bd7ada1c4701c7470febe &lt;br /&gt;
2 Nodes configured, 2 expected votes &lt;br /&gt;
0 Resources configured. &lt;br /&gt;
============ &lt;br /&gt;
&lt;br /&gt;
Online&amp;amp;#58; [ node1 node2 ] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This output indicates that &#039;&#039;corosync&#039;&#039; started the cluster resource manager and it is ready to manage resources.&lt;br /&gt;
&lt;br /&gt;
Several global options must be set in the cluster. The two described in the next two steps are especially important to consider. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. If your  cluster consists of just two nodes, switch the quorum feature off.&#039;&#039;&#039; On the command line, enter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;amp;#35; crm configure property no-quorum-policy=ignore &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your lustre setup comprises more than two nodes, you can leave the no-quorum option as it is.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. In a Lustre setup, fencing is normally used and is enabled by default. If you have a good reason not to use it, disable it by entering:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;#35; crm configure property stonith-enabled=false&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the global options of the cluster are set up correctly, continue to the following sections to configure resources and constraints.&lt;br /&gt;
&lt;br /&gt;
==== Configuring Resources ====&lt;br /&gt;
&lt;br /&gt;
OSTs are represented as Filesystem resources. A Lustre cluster consists of several Filesystem resources along with constraints that determine on which nodes of the cluster the resources can run.&lt;br /&gt;
&lt;br /&gt;
By default, the start, stop, and monitor operations in a Filesystem resource time out after 20 sec. Since some mounts in Lustre require up to 5 minutes or more, the default timeouts for these operations must be modified. Also, a monitor operation must be added to the resource so that Pacemaker can check if the resource is still alive and react in case of any problems. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Create a definition of the Filesystem resource and save it in a file such as &#039;&#039;MyOST.res&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you have multiple OSTs, you will need to define additional resources.&lt;br /&gt;
&lt;br /&gt;
The example below shows a complete definition of the Filesystem resource. You will need to change the &#039;&#039;device&#039;&#039; and &#039;&#039;directory&#039;&#039; to correspond to your setup.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
primitive resMyOST ocf&amp;amp;#58;heartbeat&amp;amp;#58;Filesystem \ &lt;br /&gt;
	meta target-role=&amp;quot;stopped&amp;quot; \ &lt;br /&gt;
	operations $id=&amp;quot;resMyOST-operations&amp;quot; \ &lt;br /&gt;
	op monitor interval=&amp;quot;120&amp;quot; timeout=&amp;quot;60&amp;quot; \ &lt;br /&gt;
	op start interval=&amp;quot;0&amp;quot; timeout=&amp;quot;300&amp;quot; \ &lt;br /&gt;
	op stop interval=&amp;quot;0&amp;quot; timeout=&amp;quot;300&amp;quot; \ &lt;br /&gt;
	params device=&amp;quot;device&amp;quot; directory=&amp;quot;directory&amp;quot; fstype=&amp;quot;lustre&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, the resource is initially stopped (&#039;&#039;target-role=”stopped”&#039;&#039;) because the constraints specifying where the resource is to be run have not yet been defined. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;start&#039;&#039; and &#039;&#039;stop&#039;&#039; operations have each been set to a timeout of 300 sec. The resource is monitored at intervals of 120 seconds. The parameters &amp;quot;&#039;&#039;device&#039;&#039;&amp;quot;, &amp;quot;&#039;&#039;directory&#039;&#039;&amp;quot; and &amp;quot;lustre&amp;quot; are passed to the &#039;&#039;mount&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Read the definition into your cluster configuration&#039;&#039;&#039; by entering:&lt;br /&gt;
&lt;br /&gt;
 # crm configure &amp;lt; MyOST.res&lt;br /&gt;
&lt;br /&gt;
You can define as many OST resources as you want. &lt;br /&gt;
&lt;br /&gt;
If a server fails or the monitoring of a OST results in the detection of a failure, the cluster first tries to restart the resource on the failed node. If the node fails to restart it, the resource is migrated to another node.&lt;br /&gt;
&lt;br /&gt;
More sophosticated ways of failure management (such as trying to restart a node three times before migrating to another node) are possible using the cluster resource manager. See the Pacemaker documentation for details.&lt;br /&gt;
&lt;br /&gt;
If mounting the file system depends on another resource like the start of a RAID or multipath driver, you can include this resource in the cluster configuration. This resource is then monitored by the cluster, enabling Pacemaker to react to failures.&lt;br /&gt;
&lt;br /&gt;
==== Configuring Constraints ====&lt;br /&gt;
In a simple Lustre cluster setup, constraints are not required. However, in a larger cluster setup, you may want to use constraints to establish relationships between resources. For example, to keep the load distributed equally across nodes in your cluster, you may want to control how many OSTs can run on a particular node.&lt;br /&gt;
&lt;br /&gt;
Constraints on resources are established by Pacemaker through a point system. Resources accumulate or lose points according to the constraints you define. If a resource has negative points with respect to a certain node, it cannot run on that node.&lt;br /&gt;
&lt;br /&gt;
For example, to constrain the co-location of two resources, complete the steps below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Add co-location constraints between resources.&#039;&#039;&#039; Enter commands similar to the following:&lt;br /&gt;
&lt;br /&gt;
 # crm configure colocation colresOST1resOST2 -100: resOST1 resOST2&lt;br /&gt;
&lt;br /&gt;
This constraint assigns -100 points to resOST2 if an attempt is made to run resOST2 on the same node as resOST1. If the resulting total number of points assigned to reOST2 is negative, it will not be able run on that node. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. After defining all necessary constraints, start the resources.&#039;&#039;&#039; Enter:&lt;br /&gt;
&lt;br /&gt;
 # crm resource start resMyOST&lt;br /&gt;
&lt;br /&gt;
Execute this command for each OST (Filesystem resource) in the cluster.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Use care when setting up your point system. You can use the point system if your cluster has at least three nodes or if the resource can acquire points from other constraints. However, in a system with only two nodes and no way to acquire points, the constraint in the example above will result in an inability to migrate a resource from a failed node. &lt;br /&gt;
&lt;br /&gt;
For example, if resOST1 is running on &#039;&#039;node1&#039;&#039; and resOST2 on &#039;&#039;node2&#039;&#039; and &#039;&#039;node2&#039;&#039; fails, an attempt will be made to run resOST2 on &#039;&#039;node1&#039;&#039;. However, the constraint will assign resOST2 -100 points since resOST1 is already running on &#039;&#039;node1&#039;&#039;. Consequently resOST2 will be unable to run on &#039;&#039;node1&#039;&#039; and, since it is a two-node system, no other node is available.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
To find out more about how the cluster resource manager calculates points, see the Pacemaker documentation.&lt;br /&gt;
&lt;br /&gt;
==== Internal Monitoring of the System ====&lt;br /&gt;
&lt;br /&gt;
In addition to monitoring of the resource itself, the nodes of the cluster must also be monitored. An important parameter to monitor is whether the node is connected to the network. Each node pings one or more hosts and counts the answers it receives. The number of responses determines how “good” its connection is to the network.&lt;br /&gt;
&lt;br /&gt;
Pacemaker provides a simple way to configure this task.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Define a ping resource.&#039;&#039;&#039; In the command below, the &#039;&#039;host_list&#039;&#039; contains a list of hosts that the nodes should ping.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# crm configure resPing ocf:pacemaker:pingd \&lt;br /&gt;
  params host_list=“host1 ...“ multiplier=“10“ dampen=”5s“&lt;br /&gt;
# crm configure clone clonePing resPing&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For every accessible host detected, any resource on that node gets 10 points (set by the &#039;&#039;multiplier=&#039;&#039; parameter). The clone configuration makes the ping resource run on every available node.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Set up constraints to run a resource on the node with the best connectivity.&#039;&#039;&#039; The score from the &#039;&#039;ping&#039;&#039; resource can be used in other constraints to allow a resource to run only on those nodes that have a sufficient ping score. For example, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm configure location locMyOST resMyOST rule $id=&amp;quot;locMyOST&amp;quot; pingd: defined pingd&lt;br /&gt;
&lt;br /&gt;
This location constraint adds the &#039;&#039;ping&#039;&#039; score to the total score assigned to a resource for a particular node. The resource will tend to run on the node with the best connectivity.&lt;br /&gt;
&lt;br /&gt;
Other system checks, such as CPU usage or free RAM, are measured by the Sysinfo resource. The capabilities of the Sysinfo resource are somewhat limited, so it will be replaced by the SystemHealth strategy in future releases of Pacemaker. For more information about the SystemHealth feature, see:&lt;br /&gt;
[http://www.clusterlabs.org/wiki/SystemHealth www.clusterlabs.org/wiki/SystemHealth]&lt;br /&gt;
&lt;br /&gt;
==== 	Administering the Cluster ====&lt;br /&gt;
&lt;br /&gt;
Careful system administration is required to support high availability in a cluster. A primary task of an administrator is to check the cluster for errors or failures of any resources. When a failure occurs, the administrator must search for the cause of the problem, solve it and then reset the corresponding failcounter.&lt;br /&gt;
This section describes some basic commands useful to an administrator. For more detailed information, see the Pacemaker documentation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Displaying a Status Overview&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The command &#039;&#039;crm_mon&#039;&#039; displays an overview of the status of the cluster. It functions similarly to the Linux top command by updating the output each time a cluster event occurs. To generate a one-time output, add the &amp;lt;br&amp;gt;&lt;br /&gt;
option &#039;&#039;-1&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
To include a display of all failcounters for all resources on the nodes, add the &#039;&#039;-f&#039;&#039; option to the command. The output of the command crm_mon -1f looks similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
============ &lt;br /&gt;
Last updated: Fri Dec 25 17:31:54 2009 &lt;br /&gt;
Stack: openais &lt;br /&gt;
Current DC: node1 - partition with quorum &lt;br /&gt;
Version: 1.0.6-cebe2b6ff49b36b29a3bd7ada1c4701c7470febe &lt;br /&gt;
2 Nodes configured, 2 expected votes &lt;br /&gt;
2 Resources configured.&lt;br /&gt;
============&lt;br /&gt;
&lt;br /&gt;
Online: [ node1 node2 ]&lt;br /&gt;
&lt;br /&gt;
Clone Set: clonePing&lt;br /&gt;
     Started: [ node1 node2 ]&lt;br /&gt;
resMyOST       (ocf::heartbeat:filesys): Started node1&lt;br /&gt;
&lt;br /&gt;
Migration summary:&lt;br /&gt;
* Node node1:  pingd=20&lt;br /&gt;
   resMyOST: migration-threshold=1000000 fail-count=1&lt;br /&gt;
* Node node2:  pingd=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Switching a Node to Standby&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can switch a node to standby to, for example, perform maintenance on the node. In standby, the node is still a full member of the cluster but cannot run any resources. All resources that were running on that node are forced away. &lt;br /&gt;
&lt;br /&gt;
To switch the node called &#039;&#039;node01&#039;&#039; to standby, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm node standby node01&lt;br /&gt;
&lt;br /&gt;
To switch the node online again enter:&lt;br /&gt;
&lt;br /&gt;
 # crm node online node01&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Migrating a Resource to Another Node&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The cluster resource manager can migrate a resource from one node to another while the resource is running. To migrate a resource away from the node it is running on, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm resource migrate resMyOST&lt;br /&gt;
&lt;br /&gt;
This command adds a location constraint to the configuration that specifies that the resource &#039;&#039;resMyOST&#039;&#039; can no longer run on the original node. &lt;br /&gt;
&lt;br /&gt;
To delete this constraint, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm resource unmigrate resMyOST&lt;br /&gt;
&lt;br /&gt;
A target node can be specified in the migration command as follows:&lt;br /&gt;
&lt;br /&gt;
 # crm configure migrate resMyOST node02&lt;br /&gt;
&lt;br /&gt;
This command causes the resource &#039;&#039;resMyOST&#039;&#039; to move to node &#039;&#039;node02&#039;&#039;, while adding a location constraint to the configuration. To remove the location constraint, enter the &#039;&#039;unmigrate&#039;&#039; command again.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Resetting the failcounter&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If Pacemaker monitors a resource and finds that it isn’t running, by default it restarts the resource on the node. If the resource cannot be restarted on the node, it then migrates the resource to another node. &lt;br /&gt;
&lt;br /&gt;
It is the administrator’s task to find out the cause of the error and to reset the failcounter of the resource. This can be achieved by entering:&lt;br /&gt;
&lt;br /&gt;
 # crm resource failcount &amp;lt;resource&amp;gt; delete &amp;lt;node&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command deletes (resets) the failcounter for the resource on the specified node.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;“Cleaning up” a Resource&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Sometimes it is necessary to “clean up” a resource. Internally, this command removes any information about a resource from the Local Resource Manager on every node and thus forces a complete re-read of the status of that resource. The command syntax is:&lt;br /&gt;
&lt;br /&gt;
 # crm resource cleanup resMyOST&lt;br /&gt;
&lt;br /&gt;
This command removes information about the resource called &#039;&#039;resMyOST&#039;&#039; on all nodes.&lt;br /&gt;
&lt;br /&gt;
== Setting up Fencing ==&lt;br /&gt;
&lt;br /&gt;
Fencing is a technique used to isolate a node from the cluster when it is malfunctioning to prevent data corruption. For example, if a “split-brain” condition occurs in which two nodes can no longer communicate and both attempt to mount the same filesystem resource, data corruption can result. (The Multiple Mount Protection (MMP) mechanism in Lustre is designed to protect a file system from being mounted simultaneously by more than one node.)&lt;br /&gt;
&lt;br /&gt;
Pacemaker uses the STONITH (Shoot The Other Node In The Head) approach to fencing malfunctioning nodes, in which a malfunctioning node is simply switched off. A good discussion about fencing can be found [http://www.clusterlabs.org/doc/crm_fencing.html here]. This article provides information useful for deciding which devices to purchase or how to set up STONITH resources for your cluster and also provides a detailed setup procedure.&lt;br /&gt;
&lt;br /&gt;
A basic setup includes the following steps:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Test your fencing system manually before configuring the corresponding resources in the cluster.&#039;&#039;&#039; Manual testing is done by calling the STONITH command directly from each node. If this works in all tests, it will work in the cluster.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. After configuring of the according resources, check that the system works as expected.&#039;&#039;&#039; To cause an artificial “split-brain” situation, you could use a host-based firewall to prohibit communication from other nodes on the heartbeat interface(s) by entering:&lt;br /&gt;
&lt;br /&gt;
 # iptables -I INPUT -i &amp;lt;heartbeat-IF&amp;gt; -p 5405 -s &amp;lt;other node&amp;gt; -j DROP&lt;br /&gt;
&lt;br /&gt;
When the other nodes are not able to see the node isolated by the firewall, the isolated node should be shut down or rebooted.&lt;br /&gt;
&lt;br /&gt;
== Setting Up Monitoring ==&lt;br /&gt;
&lt;br /&gt;
Any cluster must to be monitored to provide the high availability it was designed for. Consider the following scenario demonstrating the importance of monitoring: &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;A node fails and all resources migrate to its backup node. Since the failover was smooth, nobody notices the problem. After some time, the second node fails and service stops. This is a serious problem since neither of the nodes is now able to provide service. The administrator must recover data from backups and possibly even install it on new hardware. A significant delay may result for users.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Pacemaker offers several options for making information available to a monitoring system. These include:&lt;br /&gt;
*Utilizing the &#039;&#039;crm_mon&#039;&#039; program to send out information about changes in cluster status. &lt;br /&gt;
*Using scripts to check resource failcounters.&lt;br /&gt;
&lt;br /&gt;
These options are described in the following sections.&lt;br /&gt;
&lt;br /&gt;
==== Using &#039;&#039;crm_mon&#039;&#039; to Send Email Messages ====&lt;br /&gt;
In the most simple setup, the &#039;&#039;crm_mon&#039;&#039; program can be used to send out an email each time the status of the cluster changes. This approach requires a fully working mail environment and &#039;&#039;mail&#039;&#039; command. &lt;br /&gt;
&lt;br /&gt;
Before configuring the &#039;&#039;crm_mon&#039;&#039; daemon, check that emails sent from the command line are delivered correctly by entering:&lt;br /&gt;
&lt;br /&gt;
 # crm_mon --daemonize –-mail-to &amp;lt;user@example.com&amp;gt; [--mail-host mail.example.com]&lt;br /&gt;
&lt;br /&gt;
The resource monitor in the cluster can be configured to ensure the mail alerting service resource is running, as shown below: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
primitive resMON ocf&amp;amp;#58;pacemaker&amp;amp;#58;ClusterMon \ &lt;br /&gt;
	operations $id=&amp;quot;resMON-operations&amp;quot; \ &lt;br /&gt;
	op monitor interval=&amp;quot;180&amp;quot; timeout=&amp;quot;20&amp;quot; \ &lt;br /&gt;
	params extra_options=&amp;quot;--mail-to &amp;lt;your@mail.address&amp;gt;&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a node fails, which could prevent the email from being sent, the resource is started on another node and an email about the successful start of the resource is sent out from the new node. The administrator&#039;s task is to search for the cause of the failover.&lt;br /&gt;
&lt;br /&gt;
==== Using &#039;&#039;crm_mon&#039;&#039; to Send SNMP Traps ====&lt;br /&gt;
The &#039;&#039;crm_mon&#039;&#039; daemon can be used to send SNMP traps to a network management server. The configuration from the command line is:&lt;br /&gt;
&lt;br /&gt;
 # crm_mon –-daemonize –-snmp-traps nms.example.com&lt;br /&gt;
&lt;br /&gt;
This daemon can  also be configured as a cluster resource as shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
primitive resMON ocf&amp;amp;#58;pacemaker&amp;amp;#58;ClusterMon \ &lt;br /&gt;
	operations $id=&amp;quot;resMON-operations&amp;quot; \ &lt;br /&gt;
	op monitor interval=&amp;quot;180&amp;quot; timeout=&amp;quot;20&amp;quot; \ &lt;br /&gt;
	params extra_options=&amp;quot;--snmp-trap nms.example.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The MIB of the traps is defined in the &#039;&#039;PCMKR.txt&#039;&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Polling the Failcounters ====&lt;br /&gt;
If all the nodes of a cluster have problems, pushing information about events may be not be sufficient. An alternative is to check the failcounters of all resources periodically from the network management station (NMS). A simple script that checks for the presence of any failcounters in the output of &#039;&#039;crm_mon -1f&#039;&#039; is shown below:&lt;br /&gt;
&lt;br /&gt;
 # crm_mon -1f | grep fail-count&lt;br /&gt;
&lt;br /&gt;
This script can be called by the NMS via SSH, or by the SNMP agent on the nodes by adding the following line to the Net-SNMP configuration in &#039;&#039;snmpd.conf&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 extend failcounter crm_mon -1f | grep -q fail-count&lt;br /&gt;
&lt;br /&gt;
The code returned by the script can be checked by the NMS using:&lt;br /&gt;
&lt;br /&gt;
 snmpget &amp;lt;node&amp;gt; nsExtend.\”failcounter\”&lt;br /&gt;
&lt;br /&gt;
A result of &#039;&#039;0&#039;&#039; indicates a failure.&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12005</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12005"/>
		<updated>2010-12-10T15:00:04Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Installing RedHat Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory and may need to be added to the yum configuration manually. With yum configured correctly RedHat Cluster can be installed using:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install cman rgmanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All services that the Pacemaker cluster resource manager will manage are called resources. The Pacemaker cluster resource manager uses resource agents to start, stop or monitor resources. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039;&#039;&#039; The simplest way to configure the cluster is by using a crm subshell. All examples will be given in this notation. If you understood the syntax of the cluster configuration, you also can use the GUI or XML notation.&lt;br /&gt;
&lt;br /&gt;
==== Completing a Basic Setup of the Cluster ====&lt;br /&gt;
&lt;br /&gt;
To test that your cluster manager is running and set global options, complete the steps below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Display the cluster status.&#039;&#039;&#039; Enter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # crm_mon -1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output should look similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
============ &lt;br /&gt;
Last updated: Fri Dec 25 17:31:54 2009 &lt;br /&gt;
Stack&amp;amp;#58; openais &lt;br /&gt;
Current DC: node1 - partition with quorum &lt;br /&gt;
Version&amp;amp;#58; 1.0.6-cebe2b6ff49b36b29a3bd7ada1c4701c7470febe &lt;br /&gt;
2 Nodes configured, 2 expected votes &lt;br /&gt;
0 Resources configured. &lt;br /&gt;
============ &lt;br /&gt;
&lt;br /&gt;
Online&amp;amp;#58; [ node1 node2 ] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This output indicates that &#039;&#039;corosync&#039;&#039; started the cluster resource manager and it is ready to manage resources.&lt;br /&gt;
&lt;br /&gt;
Several global options must be set in the cluster. The two described in the next two steps are especially important to consider. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. If your  cluster consists of just two nodes, switch the quorum feature off.&#039;&#039;&#039; On the command line, enter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;amp;#35; crm configure property no-quorum-policy=ignore &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your lustre setup comprises more than two nodes, you can leave the no-quorum option as it is.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. In a Lustre setup, fencing is normally used and is enabled by default. If you have a good reason not to use it, disable it by entering:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;#35; crm configure property stonith-enabled=false&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the global options of the cluster are set up correctly, continue to the following sections to configure resources and constraints.&lt;br /&gt;
&lt;br /&gt;
==== Configuring Resources ====&lt;br /&gt;
&lt;br /&gt;
OSTs are represented as Filesystem resources. A Lustre cluster consists of several Filesystem resources along with constraints that determine on which nodes of the cluster the resources can run.&lt;br /&gt;
&lt;br /&gt;
By default, the start, stop, and monitor operations in a Filesystem resource time out after 20 sec. Since some mounts in Lustre require up to 5 minutes or more, the default timeouts for these operations must be modified. Also, a monitor operation must be added to the resource so that Pacemaker can check if the resource is still alive and react in case of any problems. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Create a definition of the Filesystem resource and save it in a file such as &#039;&#039;MyOST.res&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you have multiple OSTs, you will need to define additional resources.&lt;br /&gt;
&lt;br /&gt;
The example below shows a complete definition of the Filesystem resource. You will need to change the &#039;&#039;device&#039;&#039; and &#039;&#039;directory&#039;&#039; to correspond to your setup.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
primitive resMyOST ocf&amp;amp;#58;heartbeat&amp;amp;#58;Filesystem \ &lt;br /&gt;
	meta target-role=&amp;quot;stopped&amp;quot; \ &lt;br /&gt;
	operations $id=&amp;quot;resMyOST-operations&amp;quot; \ &lt;br /&gt;
	op monitor interval=&amp;quot;120&amp;quot; timeout=&amp;quot;60&amp;quot; \ &lt;br /&gt;
	op start interval=&amp;quot;0&amp;quot; timeout=&amp;quot;300&amp;quot; \ &lt;br /&gt;
	op stop interval=&amp;quot;0&amp;quot; timeout=&amp;quot;300&amp;quot; \ &lt;br /&gt;
	params device=&amp;quot;device&amp;quot; directory=&amp;quot;directory&amp;quot; fstype=&amp;quot;lustre&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, the resource is initially stopped (&#039;&#039;target-role=”stopped”&#039;&#039;) because the constraints specifying where the resource is to be run have not yet been defined. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;start&#039;&#039; and &#039;&#039;stop&#039;&#039; operations have each been set to a timeout of 300 sec. The resource is monitored at intervals of 120 seconds. The parameters &amp;quot;&#039;&#039;device&#039;&#039;&amp;quot;, &amp;quot;&#039;&#039;directory&#039;&#039;&amp;quot; and &amp;quot;lustre&amp;quot; are passed to the &#039;&#039;mount&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Read the definition into your cluster configuration&#039;&#039;&#039; by entering:&lt;br /&gt;
&lt;br /&gt;
 # crm configure &amp;lt; MyOST.res&lt;br /&gt;
&lt;br /&gt;
You can define as many OST resources as you want. &lt;br /&gt;
&lt;br /&gt;
If a server fails or the monitoring of a OST results in the detection of a failure, the cluster first tries to restart the resource on the failed node. If the node fails to restart it, the resource is migrated to another node.&lt;br /&gt;
&lt;br /&gt;
More sophosticated ways of failure management (such as trying to restart a node three times before migrating to another node) are possible using the cluster resource manager. See the Pacemaker documentation for details.&lt;br /&gt;
&lt;br /&gt;
If mounting the file system depends on another resource like the start of a RAID or multipath driver, you can include this resource in the cluster configuration. This resource is then monitored by the cluster, enabling Pacemaker to react to failures.&lt;br /&gt;
&lt;br /&gt;
==== Configuring Constraints ====&lt;br /&gt;
In a simple Lustre cluster setup, constraints are not required. However, in a larger cluster setup, you may want to use constraints to establish relationships between resources. For example, to keep the load distributed equally across nodes in your cluster, you may want to control how many OSTs can run on a particular node.&lt;br /&gt;
&lt;br /&gt;
Constraints on resources are established by Pacemaker through a point system. Resources accumulate or lose points according to the constraints you define. If a resource has negative points with respect to a certain node, it cannot run on that node.&lt;br /&gt;
&lt;br /&gt;
For example, to constrain the co-location of two resources, complete the steps below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Add co-location constraints between resources.&#039;&#039;&#039; Enter commands similar to the following:&lt;br /&gt;
&lt;br /&gt;
 # crm configure colocation colresOST1resOST2 -100: resOST1 resOST2&lt;br /&gt;
&lt;br /&gt;
This constraint assigns -100 points to resOST2 if an attempt is made to run resOST2 on the same node as resOST1. If the resulting total number of points assigned to reOST2 is negative, it will not be able run on that node. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. After defining all necessary constraints, start the resources.&#039;&#039;&#039; Enter:&lt;br /&gt;
&lt;br /&gt;
 # crm resource start resMyOST&lt;br /&gt;
&lt;br /&gt;
Execute this command for each OST (Filesystem resource) in the cluster.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Use care when setting up your point system. You can use the point system if your cluster has at least three nodes or if the resource can acquire points from other constraints. However, in a system with only two nodes and no way to acquire points, the constraint in the example above will result in an inability to migrate a resource from a failed node. &lt;br /&gt;
&lt;br /&gt;
For example, if resOST1 is running on &#039;&#039;node1&#039;&#039; and resOST2 on &#039;&#039;node2&#039;&#039; and &#039;&#039;node2&#039;&#039; fails, an attempt will be made to run resOST2 on &#039;&#039;node1&#039;&#039;. However, the constraint will assign resOST2 -100 points since resOST1 is already running on &#039;&#039;node1&#039;&#039;. Consequently resOST2 will be unable to run on &#039;&#039;node1&#039;&#039; and, since it is a two-node system, no other node is available.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
To find out more about how the cluster resource manager calculates points, see the Pacemaker documentation.&lt;br /&gt;
&lt;br /&gt;
==== Internal Monitoring of the System ====&lt;br /&gt;
&lt;br /&gt;
In addition to monitoring of the resource itself, the nodes of the cluster must also be monitored. An important parameter to monitor is whether the node is connected to the network. Each node pings one or more hosts and counts the answers it receives. The number of responses determines how “good” its connection is to the network.&lt;br /&gt;
&lt;br /&gt;
Pacemaker provides a simple way to configure this task.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Define a ping resource.&#039;&#039;&#039; In the command below, the &#039;&#039;host_list&#039;&#039; contains a list of hosts that the nodes should ping.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# crm configure resPing ocf:pacemaker:pingd \&lt;br /&gt;
  params host_list=“host1 ...“ multiplier=“10“ dampen=”5s“&lt;br /&gt;
# crm configure clone clonePing resPing&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For every accessible host detected, any resource on that node gets 10 points (set by the &#039;&#039;multiplier=&#039;&#039; parameter). The clone configuration makes the ping resource run on every available node.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Set up constraints to run a resource on the node with the best connectivity.&#039;&#039;&#039; The score from the &#039;&#039;ping&#039;&#039; resource can be used in other constraints to allow a resource to run only on those nodes that have a sufficient ping score. For example, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm configure location locMyOST resMyOST rule $id=&amp;quot;locMyOST&amp;quot; pingd: defined pingd&lt;br /&gt;
&lt;br /&gt;
This location constraint adds the &#039;&#039;ping&#039;&#039; score to the total score assigned to a resource for a particular node. The resource will tend to run on the node with the best connectivity.&lt;br /&gt;
&lt;br /&gt;
Other system checks, such as CPU usage or free RAM, are measured by the Sysinfo resource. The capabilities of the Sysinfo resource are somewhat limited, so it will be replaced by the SystemHealth strategy in future releases of Pacemaker. For more information about the SystemHealth feature, see:&lt;br /&gt;
[http://www.clusterlabs.org/wiki/SystemHealth www.clusterlabs.org/wiki/SystemHealth]&lt;br /&gt;
&lt;br /&gt;
==== 	Administering the Cluster ====&lt;br /&gt;
&lt;br /&gt;
Careful system administration is required to support high availability in a cluster. A primary task of an administrator is to check the cluster for errors or failures of any resources. When a failure occurs, the administrator must search for the cause of the problem, solve it and then reset the corresponding failcounter.&lt;br /&gt;
This section describes some basic commands useful to an administrator. For more detailed information, see the Pacemaker documentation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Displaying a Status Overview&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The command &#039;&#039;crm_mon&#039;&#039; displays an overview of the status of the cluster. It functions similarly to the Linux top command by updating the output each time a cluster event occurs. To generate a one-time output, add the &amp;lt;br&amp;gt;&lt;br /&gt;
option &#039;&#039;-1&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
To include a display of all failcounters for all resources on the nodes, add the &#039;&#039;-f&#039;&#039; option to the command. The output of the command crm_mon -1f looks similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
============ &lt;br /&gt;
Last updated: Fri Dec 25 17:31:54 2009 &lt;br /&gt;
Stack: openais &lt;br /&gt;
Current DC: node1 - partition with quorum &lt;br /&gt;
Version: 1.0.6-cebe2b6ff49b36b29a3bd7ada1c4701c7470febe &lt;br /&gt;
2 Nodes configured, 2 expected votes &lt;br /&gt;
2 Resources configured.&lt;br /&gt;
============&lt;br /&gt;
&lt;br /&gt;
Online: [ node1 node2 ]&lt;br /&gt;
&lt;br /&gt;
Clone Set: clonePing&lt;br /&gt;
     Started: [ node1 node2 ]&lt;br /&gt;
resMyOST       (ocf::heartbeat:filesys): Started node1&lt;br /&gt;
&lt;br /&gt;
Migration summary:&lt;br /&gt;
* Node node1:  pingd=20&lt;br /&gt;
   resMyOST: migration-threshold=1000000 fail-count=1&lt;br /&gt;
* Node node2:  pingd=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Switching a Node to Standby&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can switch a node to standby to, for example, perform maintenance on the node. In standby, the node is still a full member of the cluster but cannot run any resources. All resources that were running on that node are forced away. &lt;br /&gt;
&lt;br /&gt;
To switch the node called &#039;&#039;node01&#039;&#039; to standby, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm node standby node01&lt;br /&gt;
&lt;br /&gt;
To switch the node online again enter:&lt;br /&gt;
&lt;br /&gt;
 # crm node online node01&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Migrating a Resource to Another Node&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The cluster resource manager can migrate a resource from one node to another while the resource is running. To migrate a resource away from the node it is running on, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm resource migrate resMyOST&lt;br /&gt;
&lt;br /&gt;
This command adds a location constraint to the configuration that specifies that the resource &#039;&#039;resMyOST&#039;&#039; can no longer run on the original node. &lt;br /&gt;
&lt;br /&gt;
To delete this constraint, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm resource unmigrate resMyOST&lt;br /&gt;
&lt;br /&gt;
A target node can be specified in the migration command as follows:&lt;br /&gt;
&lt;br /&gt;
 # crm configure migrate resMyOST node02&lt;br /&gt;
&lt;br /&gt;
This command causes the resource &#039;&#039;resMyOST&#039;&#039; to move to node &#039;&#039;node02&#039;&#039;, while adding a location constraint to the configuration. To remove the location constraint, enter the &#039;&#039;unmigrate&#039;&#039; command again.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Resetting the failcounter&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If Pacemaker monitors a resource and finds that it isn’t running, by default it restarts the resource on the node. If the resource cannot be restarted on the node, it then migrates the resource to another node. &lt;br /&gt;
&lt;br /&gt;
It is the administrator’s task to find out the cause of the error and to reset the failcounter of the resource. This can be achieved by entering:&lt;br /&gt;
&lt;br /&gt;
 # crm resource failcount &amp;lt;resource&amp;gt; delete &amp;lt;node&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command deletes (resets) the failcounter for the resource on the specified node.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;“Cleaning up” a Resource&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Sometimes it is necessary to “clean up” a resource. Internally, this command removes any information about a resource from the Local Resource Manager on every node and thus forces a complete re-read of the status of that resource. The command syntax is:&lt;br /&gt;
&lt;br /&gt;
 # crm resource cleanup resMyOST&lt;br /&gt;
&lt;br /&gt;
This command removes information about the resource called &#039;&#039;resMyOST&#039;&#039; on all nodes.&lt;br /&gt;
&lt;br /&gt;
== Setting up Fencing ==&lt;br /&gt;
&lt;br /&gt;
Fencing is a technique used to isolate a node from the cluster when it is malfunctioning to prevent data corruption. For example, if a “split-brain” condition occurs in which two nodes can no longer communicate and both attempt to mount the same filesystem resource, data corruption can result. (The Multiple Mount Protection (MMP) mechanism in Lustre is designed to protect a file system from being mounted simultaneously by more than one node.)&lt;br /&gt;
&lt;br /&gt;
Pacemaker uses the STONITH (Shoot The Other Node In The Head) approach to fencing malfunctioning nodes, in which a malfunctioning node is simply switched off. A good discussion about fencing can be found [http://www.clusterlabs.org/doc/crm_fencing.html here]. This article provides information useful for deciding which devices to purchase or how to set up STONITH resources for your cluster and also provides a detailed setup procedure.&lt;br /&gt;
&lt;br /&gt;
A basic setup includes the following steps:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Test your fencing system manually before configuring the corresponding resources in the cluster.&#039;&#039;&#039; Manual testing is done by calling the STONITH command directly from each node. If this works in all tests, it will work in the cluster.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. After configuring of the according resources, check that the system works as expected.&#039;&#039;&#039; To cause an artificial “split-brain” situation, you could use a host-based firewall to prohibit communication from other nodes on the heartbeat interface(s) by entering:&lt;br /&gt;
&lt;br /&gt;
 # iptables -I INPUT -i &amp;lt;heartbeat-IF&amp;gt; -p 5405 -s &amp;lt;other node&amp;gt; -j DROP&lt;br /&gt;
&lt;br /&gt;
When the other nodes are not able to see the node isolated by the firewall, the isolated node should be shut down or rebooted.&lt;br /&gt;
&lt;br /&gt;
== Setting Up Monitoring ==&lt;br /&gt;
&lt;br /&gt;
Any cluster must to be monitored to provide the high availability it was designed for. Consider the following scenario demonstrating the importance of monitoring: &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;A node fails and all resources migrate to its backup node. Since the failover was smooth, nobody notices the problem. After some time, the second node fails and service stops. This is a serious problem since neither of the nodes is now able to provide service. The administrator must recover data from backups and possibly even install it on new hardware. A significant delay may result for users.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Pacemaker offers several options for making information available to a monitoring system. These include:&lt;br /&gt;
*Utilizing the &#039;&#039;crm_mon&#039;&#039; program to send out information about changes in cluster status. &lt;br /&gt;
*Using scripts to check resource failcounters.&lt;br /&gt;
&lt;br /&gt;
These options are described in the following sections.&lt;br /&gt;
&lt;br /&gt;
==== Using &#039;&#039;crm_mon&#039;&#039; to Send Email Messages ====&lt;br /&gt;
In the most simple setup, the &#039;&#039;crm_mon&#039;&#039; program can be used to send out an email each time the status of the cluster changes. This approach requires a fully working mail environment and &#039;&#039;mail&#039;&#039; command. &lt;br /&gt;
&lt;br /&gt;
Before configuring the &#039;&#039;crm_mon&#039;&#039; daemon, check that emails sent from the command line are delivered correctly by entering:&lt;br /&gt;
&lt;br /&gt;
 # crm_mon --daemonize –-mail-to &amp;lt;user@example.com&amp;gt; [--mail-host mail.example.com]&lt;br /&gt;
&lt;br /&gt;
The resource monitor in the cluster can be configured to ensure the mail alerting service resource is running, as shown below: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
primitive resMON ocf&amp;amp;#58;pacemaker&amp;amp;#58;ClusterMon \ &lt;br /&gt;
	operations $id=&amp;quot;resMON-operations&amp;quot; \ &lt;br /&gt;
	op monitor interval=&amp;quot;180&amp;quot; timeout=&amp;quot;20&amp;quot; \ &lt;br /&gt;
	params extra_options=&amp;quot;--mail-to &amp;lt;your@mail.address&amp;gt;&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a node fails, which could prevent the email from being sent, the resource is started on another node and an email about the successful start of the resource is sent out from the new node. The administrator&#039;s task is to search for the cause of the failover.&lt;br /&gt;
&lt;br /&gt;
==== Using &#039;&#039;crm_mon&#039;&#039; to Send SNMP Traps ====&lt;br /&gt;
The &#039;&#039;crm_mon&#039;&#039; daemon can be used to send SNMP traps to a network management server. The configuration from the command line is:&lt;br /&gt;
&lt;br /&gt;
 # crm_mon –-daemonize –-snmp-traps nms.example.com&lt;br /&gt;
&lt;br /&gt;
This daemon can  also be configured as a cluster resource as shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
primitive resMON ocf&amp;amp;#58;pacemaker&amp;amp;#58;ClusterMon \ &lt;br /&gt;
	operations $id=&amp;quot;resMON-operations&amp;quot; \ &lt;br /&gt;
	op monitor interval=&amp;quot;180&amp;quot; timeout=&amp;quot;20&amp;quot; \ &lt;br /&gt;
	params extra_options=&amp;quot;--snmp-trap nms.example.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The MIB of the traps is defined in the &#039;&#039;PCMKR.txt&#039;&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Polling the Failcounters ====&lt;br /&gt;
If all the nodes of a cluster have problems, pushing information about events may be not be sufficient. An alternative is to check the failcounters of all resources periodically from the network management station (NMS). A simple script that checks for the presence of any failcounters in the output of &#039;&#039;crm_mon -1f&#039;&#039; is shown below:&lt;br /&gt;
&lt;br /&gt;
 # crm_mon -1f | grep fail-count&lt;br /&gt;
&lt;br /&gt;
This script can be called by the NMS via SSH, or by the SNMP agent on the nodes by adding the following line to the Net-SNMP configuration in &#039;&#039;snmpd.conf&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 extend failcounter crm_mon -1f | grep -q fail-count&lt;br /&gt;
&lt;br /&gt;
The code returned by the script can be checked by the NMS using:&lt;br /&gt;
&lt;br /&gt;
 snmpget &amp;lt;node&amp;gt; nsExtend.\”failcounter\”&lt;br /&gt;
&lt;br /&gt;
A result of &#039;&#039;0&#039;&#039; indicates a failure.&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12004</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12004"/>
		<updated>2010-12-10T14:55:58Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Setting Up the openais Communication Stack */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt; or &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum install openais&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory.&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All services that the Pacemaker cluster resource manager will manage are called resources. The Pacemaker cluster resource manager uses resource agents to start, stop or monitor resources. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039;&#039;&#039; The simplest way to configure the cluster is by using a crm subshell. All examples will be given in this notation. If you understood the syntax of the cluster configuration, you also can use the GUI or XML notation.&lt;br /&gt;
&lt;br /&gt;
==== Completing a Basic Setup of the Cluster ====&lt;br /&gt;
&lt;br /&gt;
To test that your cluster manager is running and set global options, complete the steps below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Display the cluster status.&#039;&#039;&#039; Enter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # crm_mon -1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output should look similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
============ &lt;br /&gt;
Last updated: Fri Dec 25 17:31:54 2009 &lt;br /&gt;
Stack&amp;amp;#58; openais &lt;br /&gt;
Current DC: node1 - partition with quorum &lt;br /&gt;
Version&amp;amp;#58; 1.0.6-cebe2b6ff49b36b29a3bd7ada1c4701c7470febe &lt;br /&gt;
2 Nodes configured, 2 expected votes &lt;br /&gt;
0 Resources configured. &lt;br /&gt;
============ &lt;br /&gt;
&lt;br /&gt;
Online&amp;amp;#58; [ node1 node2 ] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This output indicates that &#039;&#039;corosync&#039;&#039; started the cluster resource manager and it is ready to manage resources.&lt;br /&gt;
&lt;br /&gt;
Several global options must be set in the cluster. The two described in the next two steps are especially important to consider. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. If your  cluster consists of just two nodes, switch the quorum feature off.&#039;&#039;&#039; On the command line, enter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;amp;#35; crm configure property no-quorum-policy=ignore &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your lustre setup comprises more than two nodes, you can leave the no-quorum option as it is.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. In a Lustre setup, fencing is normally used and is enabled by default. If you have a good reason not to use it, disable it by entering:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;#35; crm configure property stonith-enabled=false&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the global options of the cluster are set up correctly, continue to the following sections to configure resources and constraints.&lt;br /&gt;
&lt;br /&gt;
==== Configuring Resources ====&lt;br /&gt;
&lt;br /&gt;
OSTs are represented as Filesystem resources. A Lustre cluster consists of several Filesystem resources along with constraints that determine on which nodes of the cluster the resources can run.&lt;br /&gt;
&lt;br /&gt;
By default, the start, stop, and monitor operations in a Filesystem resource time out after 20 sec. Since some mounts in Lustre require up to 5 minutes or more, the default timeouts for these operations must be modified. Also, a monitor operation must be added to the resource so that Pacemaker can check if the resource is still alive and react in case of any problems. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Create a definition of the Filesystem resource and save it in a file such as &#039;&#039;MyOST.res&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you have multiple OSTs, you will need to define additional resources.&lt;br /&gt;
&lt;br /&gt;
The example below shows a complete definition of the Filesystem resource. You will need to change the &#039;&#039;device&#039;&#039; and &#039;&#039;directory&#039;&#039; to correspond to your setup.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
primitive resMyOST ocf&amp;amp;#58;heartbeat&amp;amp;#58;Filesystem \ &lt;br /&gt;
	meta target-role=&amp;quot;stopped&amp;quot; \ &lt;br /&gt;
	operations $id=&amp;quot;resMyOST-operations&amp;quot; \ &lt;br /&gt;
	op monitor interval=&amp;quot;120&amp;quot; timeout=&amp;quot;60&amp;quot; \ &lt;br /&gt;
	op start interval=&amp;quot;0&amp;quot; timeout=&amp;quot;300&amp;quot; \ &lt;br /&gt;
	op stop interval=&amp;quot;0&amp;quot; timeout=&amp;quot;300&amp;quot; \ &lt;br /&gt;
	params device=&amp;quot;device&amp;quot; directory=&amp;quot;directory&amp;quot; fstype=&amp;quot;lustre&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, the resource is initially stopped (&#039;&#039;target-role=”stopped”&#039;&#039;) because the constraints specifying where the resource is to be run have not yet been defined. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;start&#039;&#039; and &#039;&#039;stop&#039;&#039; operations have each been set to a timeout of 300 sec. The resource is monitored at intervals of 120 seconds. The parameters &amp;quot;&#039;&#039;device&#039;&#039;&amp;quot;, &amp;quot;&#039;&#039;directory&#039;&#039;&amp;quot; and &amp;quot;lustre&amp;quot; are passed to the &#039;&#039;mount&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Read the definition into your cluster configuration&#039;&#039;&#039; by entering:&lt;br /&gt;
&lt;br /&gt;
 # crm configure &amp;lt; MyOST.res&lt;br /&gt;
&lt;br /&gt;
You can define as many OST resources as you want. &lt;br /&gt;
&lt;br /&gt;
If a server fails or the monitoring of a OST results in the detection of a failure, the cluster first tries to restart the resource on the failed node. If the node fails to restart it, the resource is migrated to another node.&lt;br /&gt;
&lt;br /&gt;
More sophosticated ways of failure management (such as trying to restart a node three times before migrating to another node) are possible using the cluster resource manager. See the Pacemaker documentation for details.&lt;br /&gt;
&lt;br /&gt;
If mounting the file system depends on another resource like the start of a RAID or multipath driver, you can include this resource in the cluster configuration. This resource is then monitored by the cluster, enabling Pacemaker to react to failures.&lt;br /&gt;
&lt;br /&gt;
==== Configuring Constraints ====&lt;br /&gt;
In a simple Lustre cluster setup, constraints are not required. However, in a larger cluster setup, you may want to use constraints to establish relationships between resources. For example, to keep the load distributed equally across nodes in your cluster, you may want to control how many OSTs can run on a particular node.&lt;br /&gt;
&lt;br /&gt;
Constraints on resources are established by Pacemaker through a point system. Resources accumulate or lose points according to the constraints you define. If a resource has negative points with respect to a certain node, it cannot run on that node.&lt;br /&gt;
&lt;br /&gt;
For example, to constrain the co-location of two resources, complete the steps below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Add co-location constraints between resources.&#039;&#039;&#039; Enter commands similar to the following:&lt;br /&gt;
&lt;br /&gt;
 # crm configure colocation colresOST1resOST2 -100: resOST1 resOST2&lt;br /&gt;
&lt;br /&gt;
This constraint assigns -100 points to resOST2 if an attempt is made to run resOST2 on the same node as resOST1. If the resulting total number of points assigned to reOST2 is negative, it will not be able run on that node. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. After defining all necessary constraints, start the resources.&#039;&#039;&#039; Enter:&lt;br /&gt;
&lt;br /&gt;
 # crm resource start resMyOST&lt;br /&gt;
&lt;br /&gt;
Execute this command for each OST (Filesystem resource) in the cluster.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Use care when setting up your point system. You can use the point system if your cluster has at least three nodes or if the resource can acquire points from other constraints. However, in a system with only two nodes and no way to acquire points, the constraint in the example above will result in an inability to migrate a resource from a failed node. &lt;br /&gt;
&lt;br /&gt;
For example, if resOST1 is running on &#039;&#039;node1&#039;&#039; and resOST2 on &#039;&#039;node2&#039;&#039; and &#039;&#039;node2&#039;&#039; fails, an attempt will be made to run resOST2 on &#039;&#039;node1&#039;&#039;. However, the constraint will assign resOST2 -100 points since resOST1 is already running on &#039;&#039;node1&#039;&#039;. Consequently resOST2 will be unable to run on &#039;&#039;node1&#039;&#039; and, since it is a two-node system, no other node is available.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
To find out more about how the cluster resource manager calculates points, see the Pacemaker documentation.&lt;br /&gt;
&lt;br /&gt;
==== Internal Monitoring of the System ====&lt;br /&gt;
&lt;br /&gt;
In addition to monitoring of the resource itself, the nodes of the cluster must also be monitored. An important parameter to monitor is whether the node is connected to the network. Each node pings one or more hosts and counts the answers it receives. The number of responses determines how “good” its connection is to the network.&lt;br /&gt;
&lt;br /&gt;
Pacemaker provides a simple way to configure this task.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Define a ping resource.&#039;&#039;&#039; In the command below, the &#039;&#039;host_list&#039;&#039; contains a list of hosts that the nodes should ping.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# crm configure resPing ocf:pacemaker:pingd \&lt;br /&gt;
  params host_list=“host1 ...“ multiplier=“10“ dampen=”5s“&lt;br /&gt;
# crm configure clone clonePing resPing&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For every accessible host detected, any resource on that node gets 10 points (set by the &#039;&#039;multiplier=&#039;&#039; parameter). The clone configuration makes the ping resource run on every available node.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Set up constraints to run a resource on the node with the best connectivity.&#039;&#039;&#039; The score from the &#039;&#039;ping&#039;&#039; resource can be used in other constraints to allow a resource to run only on those nodes that have a sufficient ping score. For example, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm configure location locMyOST resMyOST rule $id=&amp;quot;locMyOST&amp;quot; pingd: defined pingd&lt;br /&gt;
&lt;br /&gt;
This location constraint adds the &#039;&#039;ping&#039;&#039; score to the total score assigned to a resource for a particular node. The resource will tend to run on the node with the best connectivity.&lt;br /&gt;
&lt;br /&gt;
Other system checks, such as CPU usage or free RAM, are measured by the Sysinfo resource. The capabilities of the Sysinfo resource are somewhat limited, so it will be replaced by the SystemHealth strategy in future releases of Pacemaker. For more information about the SystemHealth feature, see:&lt;br /&gt;
[http://www.clusterlabs.org/wiki/SystemHealth www.clusterlabs.org/wiki/SystemHealth]&lt;br /&gt;
&lt;br /&gt;
==== 	Administering the Cluster ====&lt;br /&gt;
&lt;br /&gt;
Careful system administration is required to support high availability in a cluster. A primary task of an administrator is to check the cluster for errors or failures of any resources. When a failure occurs, the administrator must search for the cause of the problem, solve it and then reset the corresponding failcounter.&lt;br /&gt;
This section describes some basic commands useful to an administrator. For more detailed information, see the Pacemaker documentation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Displaying a Status Overview&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The command &#039;&#039;crm_mon&#039;&#039; displays an overview of the status of the cluster. It functions similarly to the Linux top command by updating the output each time a cluster event occurs. To generate a one-time output, add the &amp;lt;br&amp;gt;&lt;br /&gt;
option &#039;&#039;-1&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
To include a display of all failcounters for all resources on the nodes, add the &#039;&#039;-f&#039;&#039; option to the command. The output of the command crm_mon -1f looks similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
============ &lt;br /&gt;
Last updated: Fri Dec 25 17:31:54 2009 &lt;br /&gt;
Stack: openais &lt;br /&gt;
Current DC: node1 - partition with quorum &lt;br /&gt;
Version: 1.0.6-cebe2b6ff49b36b29a3bd7ada1c4701c7470febe &lt;br /&gt;
2 Nodes configured, 2 expected votes &lt;br /&gt;
2 Resources configured.&lt;br /&gt;
============&lt;br /&gt;
&lt;br /&gt;
Online: [ node1 node2 ]&lt;br /&gt;
&lt;br /&gt;
Clone Set: clonePing&lt;br /&gt;
     Started: [ node1 node2 ]&lt;br /&gt;
resMyOST       (ocf::heartbeat:filesys): Started node1&lt;br /&gt;
&lt;br /&gt;
Migration summary:&lt;br /&gt;
* Node node1:  pingd=20&lt;br /&gt;
   resMyOST: migration-threshold=1000000 fail-count=1&lt;br /&gt;
* Node node2:  pingd=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Switching a Node to Standby&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can switch a node to standby to, for example, perform maintenance on the node. In standby, the node is still a full member of the cluster but cannot run any resources. All resources that were running on that node are forced away. &lt;br /&gt;
&lt;br /&gt;
To switch the node called &#039;&#039;node01&#039;&#039; to standby, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm node standby node01&lt;br /&gt;
&lt;br /&gt;
To switch the node online again enter:&lt;br /&gt;
&lt;br /&gt;
 # crm node online node01&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Migrating a Resource to Another Node&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The cluster resource manager can migrate a resource from one node to another while the resource is running. To migrate a resource away from the node it is running on, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm resource migrate resMyOST&lt;br /&gt;
&lt;br /&gt;
This command adds a location constraint to the configuration that specifies that the resource &#039;&#039;resMyOST&#039;&#039; can no longer run on the original node. &lt;br /&gt;
&lt;br /&gt;
To delete this constraint, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm resource unmigrate resMyOST&lt;br /&gt;
&lt;br /&gt;
A target node can be specified in the migration command as follows:&lt;br /&gt;
&lt;br /&gt;
 # crm configure migrate resMyOST node02&lt;br /&gt;
&lt;br /&gt;
This command causes the resource &#039;&#039;resMyOST&#039;&#039; to move to node &#039;&#039;node02&#039;&#039;, while adding a location constraint to the configuration. To remove the location constraint, enter the &#039;&#039;unmigrate&#039;&#039; command again.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Resetting the failcounter&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If Pacemaker monitors a resource and finds that it isn’t running, by default it restarts the resource on the node. If the resource cannot be restarted on the node, it then migrates the resource to another node. &lt;br /&gt;
&lt;br /&gt;
It is the administrator’s task to find out the cause of the error and to reset the failcounter of the resource. This can be achieved by entering:&lt;br /&gt;
&lt;br /&gt;
 # crm resource failcount &amp;lt;resource&amp;gt; delete &amp;lt;node&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command deletes (resets) the failcounter for the resource on the specified node.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;“Cleaning up” a Resource&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Sometimes it is necessary to “clean up” a resource. Internally, this command removes any information about a resource from the Local Resource Manager on every node and thus forces a complete re-read of the status of that resource. The command syntax is:&lt;br /&gt;
&lt;br /&gt;
 # crm resource cleanup resMyOST&lt;br /&gt;
&lt;br /&gt;
This command removes information about the resource called &#039;&#039;resMyOST&#039;&#039; on all nodes.&lt;br /&gt;
&lt;br /&gt;
== Setting up Fencing ==&lt;br /&gt;
&lt;br /&gt;
Fencing is a technique used to isolate a node from the cluster when it is malfunctioning to prevent data corruption. For example, if a “split-brain” condition occurs in which two nodes can no longer communicate and both attempt to mount the same filesystem resource, data corruption can result. (The Multiple Mount Protection (MMP) mechanism in Lustre is designed to protect a file system from being mounted simultaneously by more than one node.)&lt;br /&gt;
&lt;br /&gt;
Pacemaker uses the STONITH (Shoot The Other Node In The Head) approach to fencing malfunctioning nodes, in which a malfunctioning node is simply switched off. A good discussion about fencing can be found [http://www.clusterlabs.org/doc/crm_fencing.html here]. This article provides information useful for deciding which devices to purchase or how to set up STONITH resources for your cluster and also provides a detailed setup procedure.&lt;br /&gt;
&lt;br /&gt;
A basic setup includes the following steps:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Test your fencing system manually before configuring the corresponding resources in the cluster.&#039;&#039;&#039; Manual testing is done by calling the STONITH command directly from each node. If this works in all tests, it will work in the cluster.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. After configuring of the according resources, check that the system works as expected.&#039;&#039;&#039; To cause an artificial “split-brain” situation, you could use a host-based firewall to prohibit communication from other nodes on the heartbeat interface(s) by entering:&lt;br /&gt;
&lt;br /&gt;
 # iptables -I INPUT -i &amp;lt;heartbeat-IF&amp;gt; -p 5405 -s &amp;lt;other node&amp;gt; -j DROP&lt;br /&gt;
&lt;br /&gt;
When the other nodes are not able to see the node isolated by the firewall, the isolated node should be shut down or rebooted.&lt;br /&gt;
&lt;br /&gt;
== Setting Up Monitoring ==&lt;br /&gt;
&lt;br /&gt;
Any cluster must to be monitored to provide the high availability it was designed for. Consider the following scenario demonstrating the importance of monitoring: &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;A node fails and all resources migrate to its backup node. Since the failover was smooth, nobody notices the problem. After some time, the second node fails and service stops. This is a serious problem since neither of the nodes is now able to provide service. The administrator must recover data from backups and possibly even install it on new hardware. A significant delay may result for users.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Pacemaker offers several options for making information available to a monitoring system. These include:&lt;br /&gt;
*Utilizing the &#039;&#039;crm_mon&#039;&#039; program to send out information about changes in cluster status. &lt;br /&gt;
*Using scripts to check resource failcounters.&lt;br /&gt;
&lt;br /&gt;
These options are described in the following sections.&lt;br /&gt;
&lt;br /&gt;
==== Using &#039;&#039;crm_mon&#039;&#039; to Send Email Messages ====&lt;br /&gt;
In the most simple setup, the &#039;&#039;crm_mon&#039;&#039; program can be used to send out an email each time the status of the cluster changes. This approach requires a fully working mail environment and &#039;&#039;mail&#039;&#039; command. &lt;br /&gt;
&lt;br /&gt;
Before configuring the &#039;&#039;crm_mon&#039;&#039; daemon, check that emails sent from the command line are delivered correctly by entering:&lt;br /&gt;
&lt;br /&gt;
 # crm_mon --daemonize –-mail-to &amp;lt;user@example.com&amp;gt; [--mail-host mail.example.com]&lt;br /&gt;
&lt;br /&gt;
The resource monitor in the cluster can be configured to ensure the mail alerting service resource is running, as shown below: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
primitive resMON ocf&amp;amp;#58;pacemaker&amp;amp;#58;ClusterMon \ &lt;br /&gt;
	operations $id=&amp;quot;resMON-operations&amp;quot; \ &lt;br /&gt;
	op monitor interval=&amp;quot;180&amp;quot; timeout=&amp;quot;20&amp;quot; \ &lt;br /&gt;
	params extra_options=&amp;quot;--mail-to &amp;lt;your@mail.address&amp;gt;&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a node fails, which could prevent the email from being sent, the resource is started on another node and an email about the successful start of the resource is sent out from the new node. The administrator&#039;s task is to search for the cause of the failover.&lt;br /&gt;
&lt;br /&gt;
==== Using &#039;&#039;crm_mon&#039;&#039; to Send SNMP Traps ====&lt;br /&gt;
The &#039;&#039;crm_mon&#039;&#039; daemon can be used to send SNMP traps to a network management server. The configuration from the command line is:&lt;br /&gt;
&lt;br /&gt;
 # crm_mon –-daemonize –-snmp-traps nms.example.com&lt;br /&gt;
&lt;br /&gt;
This daemon can  also be configured as a cluster resource as shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
primitive resMON ocf&amp;amp;#58;pacemaker&amp;amp;#58;ClusterMon \ &lt;br /&gt;
	operations $id=&amp;quot;resMON-operations&amp;quot; \ &lt;br /&gt;
	op monitor interval=&amp;quot;180&amp;quot; timeout=&amp;quot;20&amp;quot; \ &lt;br /&gt;
	params extra_options=&amp;quot;--snmp-trap nms.example.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The MIB of the traps is defined in the &#039;&#039;PCMKR.txt&#039;&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Polling the Failcounters ====&lt;br /&gt;
If all the nodes of a cluster have problems, pushing information about events may be not be sufficient. An alternative is to check the failcounters of all resources periodically from the network management station (NMS). A simple script that checks for the presence of any failcounters in the output of &#039;&#039;crm_mon -1f&#039;&#039; is shown below:&lt;br /&gt;
&lt;br /&gt;
 # crm_mon -1f | grep fail-count&lt;br /&gt;
&lt;br /&gt;
This script can be called by the NMS via SSH, or by the SNMP agent on the nodes by adding the following line to the Net-SNMP configuration in &#039;&#039;snmpd.conf&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 extend failcounter crm_mon -1f | grep -q fail-count&lt;br /&gt;
&lt;br /&gt;
The code returned by the script can be checked by the NMS using:&lt;br /&gt;
&lt;br /&gt;
 snmpget &amp;lt;node&amp;gt; nsExtend.\”failcounter\”&lt;br /&gt;
&lt;br /&gt;
A result of &#039;&#039;0&#039;&#039; indicates a failure.&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12003</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12003"/>
		<updated>2010-12-10T14:51:33Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Installing RedHat Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &#039;&#039;rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&#039;&#039; or &#039;&#039;yum install openais&#039;&#039; if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
The minimum installation of RedHat Cluster consists of the Cluster Manager package &#039;&#039;cman&#039;&#039; and the Resource Group Manager package &#039;&#039;rgmanager&#039;&#039;. The &#039;&#039;cman&#039;&#039; package can be found in the RHEL repository. The &#039;&#039;rgmanager&#039;&#039; package is part of the Cluster repository. It can be found on the RHEL DVD in the Cluster sub-directory.&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All services that the Pacemaker cluster resource manager will manage are called resources. The Pacemaker cluster resource manager uses resource agents to start, stop or monitor resources. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039;&#039;&#039; The simplest way to configure the cluster is by using a crm subshell. All examples will be given in this notation. If you understood the syntax of the cluster configuration, you also can use the GUI or XML notation.&lt;br /&gt;
&lt;br /&gt;
==== Completing a Basic Setup of the Cluster ====&lt;br /&gt;
&lt;br /&gt;
To test that your cluster manager is running and set global options, complete the steps below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Display the cluster status.&#039;&#039;&#039; Enter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # crm_mon -1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output should look similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
============ &lt;br /&gt;
Last updated: Fri Dec 25 17:31:54 2009 &lt;br /&gt;
Stack&amp;amp;#58; openais &lt;br /&gt;
Current DC: node1 - partition with quorum &lt;br /&gt;
Version&amp;amp;#58; 1.0.6-cebe2b6ff49b36b29a3bd7ada1c4701c7470febe &lt;br /&gt;
2 Nodes configured, 2 expected votes &lt;br /&gt;
0 Resources configured. &lt;br /&gt;
============ &lt;br /&gt;
&lt;br /&gt;
Online&amp;amp;#58; [ node1 node2 ] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This output indicates that &#039;&#039;corosync&#039;&#039; started the cluster resource manager and it is ready to manage resources.&lt;br /&gt;
&lt;br /&gt;
Several global options must be set in the cluster. The two described in the next two steps are especially important to consider. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. If your  cluster consists of just two nodes, switch the quorum feature off.&#039;&#039;&#039; On the command line, enter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;amp;#35; crm configure property no-quorum-policy=ignore &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your lustre setup comprises more than two nodes, you can leave the no-quorum option as it is.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. In a Lustre setup, fencing is normally used and is enabled by default. If you have a good reason not to use it, disable it by entering:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;#35; crm configure property stonith-enabled=false&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the global options of the cluster are set up correctly, continue to the following sections to configure resources and constraints.&lt;br /&gt;
&lt;br /&gt;
==== Configuring Resources ====&lt;br /&gt;
&lt;br /&gt;
OSTs are represented as Filesystem resources. A Lustre cluster consists of several Filesystem resources along with constraints that determine on which nodes of the cluster the resources can run.&lt;br /&gt;
&lt;br /&gt;
By default, the start, stop, and monitor operations in a Filesystem resource time out after 20 sec. Since some mounts in Lustre require up to 5 minutes or more, the default timeouts for these operations must be modified. Also, a monitor operation must be added to the resource so that Pacemaker can check if the resource is still alive and react in case of any problems. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Create a definition of the Filesystem resource and save it in a file such as &#039;&#039;MyOST.res&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you have multiple OSTs, you will need to define additional resources.&lt;br /&gt;
&lt;br /&gt;
The example below shows a complete definition of the Filesystem resource. You will need to change the &#039;&#039;device&#039;&#039; and &#039;&#039;directory&#039;&#039; to correspond to your setup.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
primitive resMyOST ocf&amp;amp;#58;heartbeat&amp;amp;#58;Filesystem \ &lt;br /&gt;
	meta target-role=&amp;quot;stopped&amp;quot; \ &lt;br /&gt;
	operations $id=&amp;quot;resMyOST-operations&amp;quot; \ &lt;br /&gt;
	op monitor interval=&amp;quot;120&amp;quot; timeout=&amp;quot;60&amp;quot; \ &lt;br /&gt;
	op start interval=&amp;quot;0&amp;quot; timeout=&amp;quot;300&amp;quot; \ &lt;br /&gt;
	op stop interval=&amp;quot;0&amp;quot; timeout=&amp;quot;300&amp;quot; \ &lt;br /&gt;
	params device=&amp;quot;device&amp;quot; directory=&amp;quot;directory&amp;quot; fstype=&amp;quot;lustre&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, the resource is initially stopped (&#039;&#039;target-role=”stopped”&#039;&#039;) because the constraints specifying where the resource is to be run have not yet been defined. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;start&#039;&#039; and &#039;&#039;stop&#039;&#039; operations have each been set to a timeout of 300 sec. The resource is monitored at intervals of 120 seconds. The parameters &amp;quot;&#039;&#039;device&#039;&#039;&amp;quot;, &amp;quot;&#039;&#039;directory&#039;&#039;&amp;quot; and &amp;quot;lustre&amp;quot; are passed to the &#039;&#039;mount&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Read the definition into your cluster configuration&#039;&#039;&#039; by entering:&lt;br /&gt;
&lt;br /&gt;
 # crm configure &amp;lt; MyOST.res&lt;br /&gt;
&lt;br /&gt;
You can define as many OST resources as you want. &lt;br /&gt;
&lt;br /&gt;
If a server fails or the monitoring of a OST results in the detection of a failure, the cluster first tries to restart the resource on the failed node. If the node fails to restart it, the resource is migrated to another node.&lt;br /&gt;
&lt;br /&gt;
More sophosticated ways of failure management (such as trying to restart a node three times before migrating to another node) are possible using the cluster resource manager. See the Pacemaker documentation for details.&lt;br /&gt;
&lt;br /&gt;
If mounting the file system depends on another resource like the start of a RAID or multipath driver, you can include this resource in the cluster configuration. This resource is then monitored by the cluster, enabling Pacemaker to react to failures.&lt;br /&gt;
&lt;br /&gt;
==== Configuring Constraints ====&lt;br /&gt;
In a simple Lustre cluster setup, constraints are not required. However, in a larger cluster setup, you may want to use constraints to establish relationships between resources. For example, to keep the load distributed equally across nodes in your cluster, you may want to control how many OSTs can run on a particular node.&lt;br /&gt;
&lt;br /&gt;
Constraints on resources are established by Pacemaker through a point system. Resources accumulate or lose points according to the constraints you define. If a resource has negative points with respect to a certain node, it cannot run on that node.&lt;br /&gt;
&lt;br /&gt;
For example, to constrain the co-location of two resources, complete the steps below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Add co-location constraints between resources.&#039;&#039;&#039; Enter commands similar to the following:&lt;br /&gt;
&lt;br /&gt;
 # crm configure colocation colresOST1resOST2 -100: resOST1 resOST2&lt;br /&gt;
&lt;br /&gt;
This constraint assigns -100 points to resOST2 if an attempt is made to run resOST2 on the same node as resOST1. If the resulting total number of points assigned to reOST2 is negative, it will not be able run on that node. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. After defining all necessary constraints, start the resources.&#039;&#039;&#039; Enter:&lt;br /&gt;
&lt;br /&gt;
 # crm resource start resMyOST&lt;br /&gt;
&lt;br /&gt;
Execute this command for each OST (Filesystem resource) in the cluster.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Use care when setting up your point system. You can use the point system if your cluster has at least three nodes or if the resource can acquire points from other constraints. However, in a system with only two nodes and no way to acquire points, the constraint in the example above will result in an inability to migrate a resource from a failed node. &lt;br /&gt;
&lt;br /&gt;
For example, if resOST1 is running on &#039;&#039;node1&#039;&#039; and resOST2 on &#039;&#039;node2&#039;&#039; and &#039;&#039;node2&#039;&#039; fails, an attempt will be made to run resOST2 on &#039;&#039;node1&#039;&#039;. However, the constraint will assign resOST2 -100 points since resOST1 is already running on &#039;&#039;node1&#039;&#039;. Consequently resOST2 will be unable to run on &#039;&#039;node1&#039;&#039; and, since it is a two-node system, no other node is available.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
To find out more about how the cluster resource manager calculates points, see the Pacemaker documentation.&lt;br /&gt;
&lt;br /&gt;
==== Internal Monitoring of the System ====&lt;br /&gt;
&lt;br /&gt;
In addition to monitoring of the resource itself, the nodes of the cluster must also be monitored. An important parameter to monitor is whether the node is connected to the network. Each node pings one or more hosts and counts the answers it receives. The number of responses determines how “good” its connection is to the network.&lt;br /&gt;
&lt;br /&gt;
Pacemaker provides a simple way to configure this task.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Define a ping resource.&#039;&#039;&#039; In the command below, the &#039;&#039;host_list&#039;&#039; contains a list of hosts that the nodes should ping.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# crm configure resPing ocf:pacemaker:pingd \&lt;br /&gt;
  params host_list=“host1 ...“ multiplier=“10“ dampen=”5s“&lt;br /&gt;
# crm configure clone clonePing resPing&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For every accessible host detected, any resource on that node gets 10 points (set by the &#039;&#039;multiplier=&#039;&#039; parameter). The clone configuration makes the ping resource run on every available node.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Set up constraints to run a resource on the node with the best connectivity.&#039;&#039;&#039; The score from the &#039;&#039;ping&#039;&#039; resource can be used in other constraints to allow a resource to run only on those nodes that have a sufficient ping score. For example, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm configure location locMyOST resMyOST rule $id=&amp;quot;locMyOST&amp;quot; pingd: defined pingd&lt;br /&gt;
&lt;br /&gt;
This location constraint adds the &#039;&#039;ping&#039;&#039; score to the total score assigned to a resource for a particular node. The resource will tend to run on the node with the best connectivity.&lt;br /&gt;
&lt;br /&gt;
Other system checks, such as CPU usage or free RAM, are measured by the Sysinfo resource. The capabilities of the Sysinfo resource are somewhat limited, so it will be replaced by the SystemHealth strategy in future releases of Pacemaker. For more information about the SystemHealth feature, see:&lt;br /&gt;
[http://www.clusterlabs.org/wiki/SystemHealth www.clusterlabs.org/wiki/SystemHealth]&lt;br /&gt;
&lt;br /&gt;
==== 	Administering the Cluster ====&lt;br /&gt;
&lt;br /&gt;
Careful system administration is required to support high availability in a cluster. A primary task of an administrator is to check the cluster for errors or failures of any resources. When a failure occurs, the administrator must search for the cause of the problem, solve it and then reset the corresponding failcounter.&lt;br /&gt;
This section describes some basic commands useful to an administrator. For more detailed information, see the Pacemaker documentation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Displaying a Status Overview&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The command &#039;&#039;crm_mon&#039;&#039; displays an overview of the status of the cluster. It functions similarly to the Linux top command by updating the output each time a cluster event occurs. To generate a one-time output, add the &amp;lt;br&amp;gt;&lt;br /&gt;
option &#039;&#039;-1&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
To include a display of all failcounters for all resources on the nodes, add the &#039;&#039;-f&#039;&#039; option to the command. The output of the command crm_mon -1f looks similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
============ &lt;br /&gt;
Last updated: Fri Dec 25 17:31:54 2009 &lt;br /&gt;
Stack: openais &lt;br /&gt;
Current DC: node1 - partition with quorum &lt;br /&gt;
Version: 1.0.6-cebe2b6ff49b36b29a3bd7ada1c4701c7470febe &lt;br /&gt;
2 Nodes configured, 2 expected votes &lt;br /&gt;
2 Resources configured.&lt;br /&gt;
============&lt;br /&gt;
&lt;br /&gt;
Online: [ node1 node2 ]&lt;br /&gt;
&lt;br /&gt;
Clone Set: clonePing&lt;br /&gt;
     Started: [ node1 node2 ]&lt;br /&gt;
resMyOST       (ocf::heartbeat:filesys): Started node1&lt;br /&gt;
&lt;br /&gt;
Migration summary:&lt;br /&gt;
* Node node1:  pingd=20&lt;br /&gt;
   resMyOST: migration-threshold=1000000 fail-count=1&lt;br /&gt;
* Node node2:  pingd=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Switching a Node to Standby&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can switch a node to standby to, for example, perform maintenance on the node. In standby, the node is still a full member of the cluster but cannot run any resources. All resources that were running on that node are forced away. &lt;br /&gt;
&lt;br /&gt;
To switch the node called &#039;&#039;node01&#039;&#039; to standby, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm node standby node01&lt;br /&gt;
&lt;br /&gt;
To switch the node online again enter:&lt;br /&gt;
&lt;br /&gt;
 # crm node online node01&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Migrating a Resource to Another Node&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The cluster resource manager can migrate a resource from one node to another while the resource is running. To migrate a resource away from the node it is running on, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm resource migrate resMyOST&lt;br /&gt;
&lt;br /&gt;
This command adds a location constraint to the configuration that specifies that the resource &#039;&#039;resMyOST&#039;&#039; can no longer run on the original node. &lt;br /&gt;
&lt;br /&gt;
To delete this constraint, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm resource unmigrate resMyOST&lt;br /&gt;
&lt;br /&gt;
A target node can be specified in the migration command as follows:&lt;br /&gt;
&lt;br /&gt;
 # crm configure migrate resMyOST node02&lt;br /&gt;
&lt;br /&gt;
This command causes the resource &#039;&#039;resMyOST&#039;&#039; to move to node &#039;&#039;node02&#039;&#039;, while adding a location constraint to the configuration. To remove the location constraint, enter the &#039;&#039;unmigrate&#039;&#039; command again.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Resetting the failcounter&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If Pacemaker monitors a resource and finds that it isn’t running, by default it restarts the resource on the node. If the resource cannot be restarted on the node, it then migrates the resource to another node. &lt;br /&gt;
&lt;br /&gt;
It is the administrator’s task to find out the cause of the error and to reset the failcounter of the resource. This can be achieved by entering:&lt;br /&gt;
&lt;br /&gt;
 # crm resource failcount &amp;lt;resource&amp;gt; delete &amp;lt;node&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command deletes (resets) the failcounter for the resource on the specified node.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;“Cleaning up” a Resource&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Sometimes it is necessary to “clean up” a resource. Internally, this command removes any information about a resource from the Local Resource Manager on every node and thus forces a complete re-read of the status of that resource. The command syntax is:&lt;br /&gt;
&lt;br /&gt;
 # crm resource cleanup resMyOST&lt;br /&gt;
&lt;br /&gt;
This command removes information about the resource called &#039;&#039;resMyOST&#039;&#039; on all nodes.&lt;br /&gt;
&lt;br /&gt;
== Setting up Fencing ==&lt;br /&gt;
&lt;br /&gt;
Fencing is a technique used to isolate a node from the cluster when it is malfunctioning to prevent data corruption. For example, if a “split-brain” condition occurs in which two nodes can no longer communicate and both attempt to mount the same filesystem resource, data corruption can result. (The Multiple Mount Protection (MMP) mechanism in Lustre is designed to protect a file system from being mounted simultaneously by more than one node.)&lt;br /&gt;
&lt;br /&gt;
Pacemaker uses the STONITH (Shoot The Other Node In The Head) approach to fencing malfunctioning nodes, in which a malfunctioning node is simply switched off. A good discussion about fencing can be found [http://www.clusterlabs.org/doc/crm_fencing.html here]. This article provides information useful for deciding which devices to purchase or how to set up STONITH resources for your cluster and also provides a detailed setup procedure.&lt;br /&gt;
&lt;br /&gt;
A basic setup includes the following steps:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Test your fencing system manually before configuring the corresponding resources in the cluster.&#039;&#039;&#039; Manual testing is done by calling the STONITH command directly from each node. If this works in all tests, it will work in the cluster.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. After configuring of the according resources, check that the system works as expected.&#039;&#039;&#039; To cause an artificial “split-brain” situation, you could use a host-based firewall to prohibit communication from other nodes on the heartbeat interface(s) by entering:&lt;br /&gt;
&lt;br /&gt;
 # iptables -I INPUT -i &amp;lt;heartbeat-IF&amp;gt; -p 5405 -s &amp;lt;other node&amp;gt; -j DROP&lt;br /&gt;
&lt;br /&gt;
When the other nodes are not able to see the node isolated by the firewall, the isolated node should be shut down or rebooted.&lt;br /&gt;
&lt;br /&gt;
== Setting Up Monitoring ==&lt;br /&gt;
&lt;br /&gt;
Any cluster must to be monitored to provide the high availability it was designed for. Consider the following scenario demonstrating the importance of monitoring: &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;A node fails and all resources migrate to its backup node. Since the failover was smooth, nobody notices the problem. After some time, the second node fails and service stops. This is a serious problem since neither of the nodes is now able to provide service. The administrator must recover data from backups and possibly even install it on new hardware. A significant delay may result for users.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Pacemaker offers several options for making information available to a monitoring system. These include:&lt;br /&gt;
*Utilizing the &#039;&#039;crm_mon&#039;&#039; program to send out information about changes in cluster status. &lt;br /&gt;
*Using scripts to check resource failcounters.&lt;br /&gt;
&lt;br /&gt;
These options are described in the following sections.&lt;br /&gt;
&lt;br /&gt;
==== Using &#039;&#039;crm_mon&#039;&#039; to Send Email Messages ====&lt;br /&gt;
In the most simple setup, the &#039;&#039;crm_mon&#039;&#039; program can be used to send out an email each time the status of the cluster changes. This approach requires a fully working mail environment and &#039;&#039;mail&#039;&#039; command. &lt;br /&gt;
&lt;br /&gt;
Before configuring the &#039;&#039;crm_mon&#039;&#039; daemon, check that emails sent from the command line are delivered correctly by entering:&lt;br /&gt;
&lt;br /&gt;
 # crm_mon --daemonize –-mail-to &amp;lt;user@example.com&amp;gt; [--mail-host mail.example.com]&lt;br /&gt;
&lt;br /&gt;
The resource monitor in the cluster can be configured to ensure the mail alerting service resource is running, as shown below: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
primitive resMON ocf&amp;amp;#58;pacemaker&amp;amp;#58;ClusterMon \ &lt;br /&gt;
	operations $id=&amp;quot;resMON-operations&amp;quot; \ &lt;br /&gt;
	op monitor interval=&amp;quot;180&amp;quot; timeout=&amp;quot;20&amp;quot; \ &lt;br /&gt;
	params extra_options=&amp;quot;--mail-to &amp;lt;your@mail.address&amp;gt;&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a node fails, which could prevent the email from being sent, the resource is started on another node and an email about the successful start of the resource is sent out from the new node. The administrator&#039;s task is to search for the cause of the failover.&lt;br /&gt;
&lt;br /&gt;
==== Using &#039;&#039;crm_mon&#039;&#039; to Send SNMP Traps ====&lt;br /&gt;
The &#039;&#039;crm_mon&#039;&#039; daemon can be used to send SNMP traps to a network management server. The configuration from the command line is:&lt;br /&gt;
&lt;br /&gt;
 # crm_mon –-daemonize –-snmp-traps nms.example.com&lt;br /&gt;
&lt;br /&gt;
This daemon can  also be configured as a cluster resource as shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
primitive resMON ocf&amp;amp;#58;pacemaker&amp;amp;#58;ClusterMon \ &lt;br /&gt;
	operations $id=&amp;quot;resMON-operations&amp;quot; \ &lt;br /&gt;
	op monitor interval=&amp;quot;180&amp;quot; timeout=&amp;quot;20&amp;quot; \ &lt;br /&gt;
	params extra_options=&amp;quot;--snmp-trap nms.example.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The MIB of the traps is defined in the &#039;&#039;PCMKR.txt&#039;&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Polling the Failcounters ====&lt;br /&gt;
If all the nodes of a cluster have problems, pushing information about events may be not be sufficient. An alternative is to check the failcounters of all resources periodically from the network management station (NMS). A simple script that checks for the presence of any failcounters in the output of &#039;&#039;crm_mon -1f&#039;&#039; is shown below:&lt;br /&gt;
&lt;br /&gt;
 # crm_mon -1f | grep fail-count&lt;br /&gt;
&lt;br /&gt;
This script can be called by the NMS via SSH, or by the SNMP agent on the nodes by adding the following line to the Net-SNMP configuration in &#039;&#039;snmpd.conf&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 extend failcounter crm_mon -1f | grep -q fail-count&lt;br /&gt;
&lt;br /&gt;
The code returned by the script can be checked by the NMS using:&lt;br /&gt;
&lt;br /&gt;
 snmpget &amp;lt;node&amp;gt; nsExtend.\”failcounter\”&lt;br /&gt;
&lt;br /&gt;
A result of &#039;&#039;0&#039;&#039; indicates a failure.&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12002</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12002"/>
		<updated>2010-12-10T13:56:55Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Setting Up Resource Management */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &#039;&#039;rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&#039;&#039; or &#039;&#039;yum install openais&#039;&#039; if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installing the Lustre Resource Skript ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configure RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All services that the Pacemaker cluster resource manager will manage are called resources. The Pacemaker cluster resource manager uses resource agents to start, stop or monitor resources. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039;&#039;&#039; The simplest way to configure the cluster is by using a crm subshell. All examples will be given in this notation. If you understood the syntax of the cluster configuration, you also can use the GUI or XML notation.&lt;br /&gt;
&lt;br /&gt;
==== Completing a Basic Setup of the Cluster ====&lt;br /&gt;
&lt;br /&gt;
To test that your cluster manager is running and set global options, complete the steps below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Display the cluster status.&#039;&#039;&#039; Enter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # crm_mon -1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output should look similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
============ &lt;br /&gt;
Last updated: Fri Dec 25 17:31:54 2009 &lt;br /&gt;
Stack&amp;amp;#58; openais &lt;br /&gt;
Current DC: node1 - partition with quorum &lt;br /&gt;
Version&amp;amp;#58; 1.0.6-cebe2b6ff49b36b29a3bd7ada1c4701c7470febe &lt;br /&gt;
2 Nodes configured, 2 expected votes &lt;br /&gt;
0 Resources configured. &lt;br /&gt;
============ &lt;br /&gt;
&lt;br /&gt;
Online&amp;amp;#58; [ node1 node2 ] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This output indicates that &#039;&#039;corosync&#039;&#039; started the cluster resource manager and it is ready to manage resources.&lt;br /&gt;
&lt;br /&gt;
Several global options must be set in the cluster. The two described in the next two steps are especially important to consider. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. If your  cluster consists of just two nodes, switch the quorum feature off.&#039;&#039;&#039; On the command line, enter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;amp;#35; crm configure property no-quorum-policy=ignore &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your lustre setup comprises more than two nodes, you can leave the no-quorum option as it is.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. In a Lustre setup, fencing is normally used and is enabled by default. If you have a good reason not to use it, disable it by entering:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;#35; crm configure property stonith-enabled=false&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the global options of the cluster are set up correctly, continue to the following sections to configure resources and constraints.&lt;br /&gt;
&lt;br /&gt;
==== Configuring Resources ====&lt;br /&gt;
&lt;br /&gt;
OSTs are represented as Filesystem resources. A Lustre cluster consists of several Filesystem resources along with constraints that determine on which nodes of the cluster the resources can run.&lt;br /&gt;
&lt;br /&gt;
By default, the start, stop, and monitor operations in a Filesystem resource time out after 20 sec. Since some mounts in Lustre require up to 5 minutes or more, the default timeouts for these operations must be modified. Also, a monitor operation must be added to the resource so that Pacemaker can check if the resource is still alive and react in case of any problems. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Create a definition of the Filesystem resource and save it in a file such as &#039;&#039;MyOST.res&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you have multiple OSTs, you will need to define additional resources.&lt;br /&gt;
&lt;br /&gt;
The example below shows a complete definition of the Filesystem resource. You will need to change the &#039;&#039;device&#039;&#039; and &#039;&#039;directory&#039;&#039; to correspond to your setup.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
primitive resMyOST ocf&amp;amp;#58;heartbeat&amp;amp;#58;Filesystem \ &lt;br /&gt;
	meta target-role=&amp;quot;stopped&amp;quot; \ &lt;br /&gt;
	operations $id=&amp;quot;resMyOST-operations&amp;quot; \ &lt;br /&gt;
	op monitor interval=&amp;quot;120&amp;quot; timeout=&amp;quot;60&amp;quot; \ &lt;br /&gt;
	op start interval=&amp;quot;0&amp;quot; timeout=&amp;quot;300&amp;quot; \ &lt;br /&gt;
	op stop interval=&amp;quot;0&amp;quot; timeout=&amp;quot;300&amp;quot; \ &lt;br /&gt;
	params device=&amp;quot;device&amp;quot; directory=&amp;quot;directory&amp;quot; fstype=&amp;quot;lustre&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, the resource is initially stopped (&#039;&#039;target-role=”stopped”&#039;&#039;) because the constraints specifying where the resource is to be run have not yet been defined. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;start&#039;&#039; and &#039;&#039;stop&#039;&#039; operations have each been set to a timeout of 300 sec. The resource is monitored at intervals of 120 seconds. The parameters &amp;quot;&#039;&#039;device&#039;&#039;&amp;quot;, &amp;quot;&#039;&#039;directory&#039;&#039;&amp;quot; and &amp;quot;lustre&amp;quot; are passed to the &#039;&#039;mount&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Read the definition into your cluster configuration&#039;&#039;&#039; by entering:&lt;br /&gt;
&lt;br /&gt;
 # crm configure &amp;lt; MyOST.res&lt;br /&gt;
&lt;br /&gt;
You can define as many OST resources as you want. &lt;br /&gt;
&lt;br /&gt;
If a server fails or the monitoring of a OST results in the detection of a failure, the cluster first tries to restart the resource on the failed node. If the node fails to restart it, the resource is migrated to another node.&lt;br /&gt;
&lt;br /&gt;
More sophosticated ways of failure management (such as trying to restart a node three times before migrating to another node) are possible using the cluster resource manager. See the Pacemaker documentation for details.&lt;br /&gt;
&lt;br /&gt;
If mounting the file system depends on another resource like the start of a RAID or multipath driver, you can include this resource in the cluster configuration. This resource is then monitored by the cluster, enabling Pacemaker to react to failures.&lt;br /&gt;
&lt;br /&gt;
==== Configuring Constraints ====&lt;br /&gt;
In a simple Lustre cluster setup, constraints are not required. However, in a larger cluster setup, you may want to use constraints to establish relationships between resources. For example, to keep the load distributed equally across nodes in your cluster, you may want to control how many OSTs can run on a particular node.&lt;br /&gt;
&lt;br /&gt;
Constraints on resources are established by Pacemaker through a point system. Resources accumulate or lose points according to the constraints you define. If a resource has negative points with respect to a certain node, it cannot run on that node.&lt;br /&gt;
&lt;br /&gt;
For example, to constrain the co-location of two resources, complete the steps below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Add co-location constraints between resources.&#039;&#039;&#039; Enter commands similar to the following:&lt;br /&gt;
&lt;br /&gt;
 # crm configure colocation colresOST1resOST2 -100: resOST1 resOST2&lt;br /&gt;
&lt;br /&gt;
This constraint assigns -100 points to resOST2 if an attempt is made to run resOST2 on the same node as resOST1. If the resulting total number of points assigned to reOST2 is negative, it will not be able run on that node. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. After defining all necessary constraints, start the resources.&#039;&#039;&#039; Enter:&lt;br /&gt;
&lt;br /&gt;
 # crm resource start resMyOST&lt;br /&gt;
&lt;br /&gt;
Execute this command for each OST (Filesystem resource) in the cluster.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Use care when setting up your point system. You can use the point system if your cluster has at least three nodes or if the resource can acquire points from other constraints. However, in a system with only two nodes and no way to acquire points, the constraint in the example above will result in an inability to migrate a resource from a failed node. &lt;br /&gt;
&lt;br /&gt;
For example, if resOST1 is running on &#039;&#039;node1&#039;&#039; and resOST2 on &#039;&#039;node2&#039;&#039; and &#039;&#039;node2&#039;&#039; fails, an attempt will be made to run resOST2 on &#039;&#039;node1&#039;&#039;. However, the constraint will assign resOST2 -100 points since resOST1 is already running on &#039;&#039;node1&#039;&#039;. Consequently resOST2 will be unable to run on &#039;&#039;node1&#039;&#039; and, since it is a two-node system, no other node is available.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
To find out more about how the cluster resource manager calculates points, see the Pacemaker documentation.&lt;br /&gt;
&lt;br /&gt;
==== Internal Monitoring of the System ====&lt;br /&gt;
&lt;br /&gt;
In addition to monitoring of the resource itself, the nodes of the cluster must also be monitored. An important parameter to monitor is whether the node is connected to the network. Each node pings one or more hosts and counts the answers it receives. The number of responses determines how “good” its connection is to the network.&lt;br /&gt;
&lt;br /&gt;
Pacemaker provides a simple way to configure this task.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Define a ping resource.&#039;&#039;&#039; In the command below, the &#039;&#039;host_list&#039;&#039; contains a list of hosts that the nodes should ping.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# crm configure resPing ocf:pacemaker:pingd \&lt;br /&gt;
  params host_list=“host1 ...“ multiplier=“10“ dampen=”5s“&lt;br /&gt;
# crm configure clone clonePing resPing&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For every accessible host detected, any resource on that node gets 10 points (set by the &#039;&#039;multiplier=&#039;&#039; parameter). The clone configuration makes the ping resource run on every available node.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Set up constraints to run a resource on the node with the best connectivity.&#039;&#039;&#039; The score from the &#039;&#039;ping&#039;&#039; resource can be used in other constraints to allow a resource to run only on those nodes that have a sufficient ping score. For example, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm configure location locMyOST resMyOST rule $id=&amp;quot;locMyOST&amp;quot; pingd: defined pingd&lt;br /&gt;
&lt;br /&gt;
This location constraint adds the &#039;&#039;ping&#039;&#039; score to the total score assigned to a resource for a particular node. The resource will tend to run on the node with the best connectivity.&lt;br /&gt;
&lt;br /&gt;
Other system checks, such as CPU usage or free RAM, are measured by the Sysinfo resource. The capabilities of the Sysinfo resource are somewhat limited, so it will be replaced by the SystemHealth strategy in future releases of Pacemaker. For more information about the SystemHealth feature, see:&lt;br /&gt;
[http://www.clusterlabs.org/wiki/SystemHealth www.clusterlabs.org/wiki/SystemHealth]&lt;br /&gt;
&lt;br /&gt;
==== 	Administering the Cluster ====&lt;br /&gt;
&lt;br /&gt;
Careful system administration is required to support high availability in a cluster. A primary task of an administrator is to check the cluster for errors or failures of any resources. When a failure occurs, the administrator must search for the cause of the problem, solve it and then reset the corresponding failcounter.&lt;br /&gt;
This section describes some basic commands useful to an administrator. For more detailed information, see the Pacemaker documentation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Displaying a Status Overview&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The command &#039;&#039;crm_mon&#039;&#039; displays an overview of the status of the cluster. It functions similarly to the Linux top command by updating the output each time a cluster event occurs. To generate a one-time output, add the &amp;lt;br&amp;gt;&lt;br /&gt;
option &#039;&#039;-1&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
To include a display of all failcounters for all resources on the nodes, add the &#039;&#039;-f&#039;&#039; option to the command. The output of the command crm_mon -1f looks similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
============ &lt;br /&gt;
Last updated: Fri Dec 25 17:31:54 2009 &lt;br /&gt;
Stack: openais &lt;br /&gt;
Current DC: node1 - partition with quorum &lt;br /&gt;
Version: 1.0.6-cebe2b6ff49b36b29a3bd7ada1c4701c7470febe &lt;br /&gt;
2 Nodes configured, 2 expected votes &lt;br /&gt;
2 Resources configured.&lt;br /&gt;
============&lt;br /&gt;
&lt;br /&gt;
Online: [ node1 node2 ]&lt;br /&gt;
&lt;br /&gt;
Clone Set: clonePing&lt;br /&gt;
     Started: [ node1 node2 ]&lt;br /&gt;
resMyOST       (ocf::heartbeat:filesys): Started node1&lt;br /&gt;
&lt;br /&gt;
Migration summary:&lt;br /&gt;
* Node node1:  pingd=20&lt;br /&gt;
   resMyOST: migration-threshold=1000000 fail-count=1&lt;br /&gt;
* Node node2:  pingd=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Switching a Node to Standby&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can switch a node to standby to, for example, perform maintenance on the node. In standby, the node is still a full member of the cluster but cannot run any resources. All resources that were running on that node are forced away. &lt;br /&gt;
&lt;br /&gt;
To switch the node called &#039;&#039;node01&#039;&#039; to standby, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm node standby node01&lt;br /&gt;
&lt;br /&gt;
To switch the node online again enter:&lt;br /&gt;
&lt;br /&gt;
 # crm node online node01&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Migrating a Resource to Another Node&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The cluster resource manager can migrate a resource from one node to another while the resource is running. To migrate a resource away from the node it is running on, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm resource migrate resMyOST&lt;br /&gt;
&lt;br /&gt;
This command adds a location constraint to the configuration that specifies that the resource &#039;&#039;resMyOST&#039;&#039; can no longer run on the original node. &lt;br /&gt;
&lt;br /&gt;
To delete this constraint, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm resource unmigrate resMyOST&lt;br /&gt;
&lt;br /&gt;
A target node can be specified in the migration command as follows:&lt;br /&gt;
&lt;br /&gt;
 # crm configure migrate resMyOST node02&lt;br /&gt;
&lt;br /&gt;
This command causes the resource &#039;&#039;resMyOST&#039;&#039; to move to node &#039;&#039;node02&#039;&#039;, while adding a location constraint to the configuration. To remove the location constraint, enter the &#039;&#039;unmigrate&#039;&#039; command again.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Resetting the failcounter&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If Pacemaker monitors a resource and finds that it isn’t running, by default it restarts the resource on the node. If the resource cannot be restarted on the node, it then migrates the resource to another node. &lt;br /&gt;
&lt;br /&gt;
It is the administrator’s task to find out the cause of the error and to reset the failcounter of the resource. This can be achieved by entering:&lt;br /&gt;
&lt;br /&gt;
 # crm resource failcount &amp;lt;resource&amp;gt; delete &amp;lt;node&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command deletes (resets) the failcounter for the resource on the specified node.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;“Cleaning up” a Resource&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Sometimes it is necessary to “clean up” a resource. Internally, this command removes any information about a resource from the Local Resource Manager on every node and thus forces a complete re-read of the status of that resource. The command syntax is:&lt;br /&gt;
&lt;br /&gt;
 # crm resource cleanup resMyOST&lt;br /&gt;
&lt;br /&gt;
This command removes information about the resource called &#039;&#039;resMyOST&#039;&#039; on all nodes.&lt;br /&gt;
&lt;br /&gt;
== Setting up Fencing ==&lt;br /&gt;
&lt;br /&gt;
Fencing is a technique used to isolate a node from the cluster when it is malfunctioning to prevent data corruption. For example, if a “split-brain” condition occurs in which two nodes can no longer communicate and both attempt to mount the same filesystem resource, data corruption can result. (The Multiple Mount Protection (MMP) mechanism in Lustre is designed to protect a file system from being mounted simultaneously by more than one node.)&lt;br /&gt;
&lt;br /&gt;
Pacemaker uses the STONITH (Shoot The Other Node In The Head) approach to fencing malfunctioning nodes, in which a malfunctioning node is simply switched off. A good discussion about fencing can be found [http://www.clusterlabs.org/doc/crm_fencing.html here]. This article provides information useful for deciding which devices to purchase or how to set up STONITH resources for your cluster and also provides a detailed setup procedure.&lt;br /&gt;
&lt;br /&gt;
A basic setup includes the following steps:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Test your fencing system manually before configuring the corresponding resources in the cluster.&#039;&#039;&#039; Manual testing is done by calling the STONITH command directly from each node. If this works in all tests, it will work in the cluster.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. After configuring of the according resources, check that the system works as expected.&#039;&#039;&#039; To cause an artificial “split-brain” situation, you could use a host-based firewall to prohibit communication from other nodes on the heartbeat interface(s) by entering:&lt;br /&gt;
&lt;br /&gt;
 # iptables -I INPUT -i &amp;lt;heartbeat-IF&amp;gt; -p 5405 -s &amp;lt;other node&amp;gt; -j DROP&lt;br /&gt;
&lt;br /&gt;
When the other nodes are not able to see the node isolated by the firewall, the isolated node should be shut down or rebooted.&lt;br /&gt;
&lt;br /&gt;
== Setting Up Monitoring ==&lt;br /&gt;
&lt;br /&gt;
Any cluster must to be monitored to provide the high availability it was designed for. Consider the following scenario demonstrating the importance of monitoring: &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;A node fails and all resources migrate to its backup node. Since the failover was smooth, nobody notices the problem. After some time, the second node fails and service stops. This is a serious problem since neither of the nodes is now able to provide service. The administrator must recover data from backups and possibly even install it on new hardware. A significant delay may result for users.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Pacemaker offers several options for making information available to a monitoring system. These include:&lt;br /&gt;
*Utilizing the &#039;&#039;crm_mon&#039;&#039; program to send out information about changes in cluster status. &lt;br /&gt;
*Using scripts to check resource failcounters.&lt;br /&gt;
&lt;br /&gt;
These options are described in the following sections.&lt;br /&gt;
&lt;br /&gt;
==== Using &#039;&#039;crm_mon&#039;&#039; to Send Email Messages ====&lt;br /&gt;
In the most simple setup, the &#039;&#039;crm_mon&#039;&#039; program can be used to send out an email each time the status of the cluster changes. This approach requires a fully working mail environment and &#039;&#039;mail&#039;&#039; command. &lt;br /&gt;
&lt;br /&gt;
Before configuring the &#039;&#039;crm_mon&#039;&#039; daemon, check that emails sent from the command line are delivered correctly by entering:&lt;br /&gt;
&lt;br /&gt;
 # crm_mon --daemonize –-mail-to &amp;lt;user@example.com&amp;gt; [--mail-host mail.example.com]&lt;br /&gt;
&lt;br /&gt;
The resource monitor in the cluster can be configured to ensure the mail alerting service resource is running, as shown below: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
primitive resMON ocf&amp;amp;#58;pacemaker&amp;amp;#58;ClusterMon \ &lt;br /&gt;
	operations $id=&amp;quot;resMON-operations&amp;quot; \ &lt;br /&gt;
	op monitor interval=&amp;quot;180&amp;quot; timeout=&amp;quot;20&amp;quot; \ &lt;br /&gt;
	params extra_options=&amp;quot;--mail-to &amp;lt;your@mail.address&amp;gt;&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a node fails, which could prevent the email from being sent, the resource is started on another node and an email about the successful start of the resource is sent out from the new node. The administrator&#039;s task is to search for the cause of the failover.&lt;br /&gt;
&lt;br /&gt;
==== Using &#039;&#039;crm_mon&#039;&#039; to Send SNMP Traps ====&lt;br /&gt;
The &#039;&#039;crm_mon&#039;&#039; daemon can be used to send SNMP traps to a network management server. The configuration from the command line is:&lt;br /&gt;
&lt;br /&gt;
 # crm_mon –-daemonize –-snmp-traps nms.example.com&lt;br /&gt;
&lt;br /&gt;
This daemon can  also be configured as a cluster resource as shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
primitive resMON ocf&amp;amp;#58;pacemaker&amp;amp;#58;ClusterMon \ &lt;br /&gt;
	operations $id=&amp;quot;resMON-operations&amp;quot; \ &lt;br /&gt;
	op monitor interval=&amp;quot;180&amp;quot; timeout=&amp;quot;20&amp;quot; \ &lt;br /&gt;
	params extra_options=&amp;quot;--snmp-trap nms.example.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The MIB of the traps is defined in the &#039;&#039;PCMKR.txt&#039;&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Polling the Failcounters ====&lt;br /&gt;
If all the nodes of a cluster have problems, pushing information about events may be not be sufficient. An alternative is to check the failcounters of all resources periodically from the network management station (NMS). A simple script that checks for the presence of any failcounters in the output of &#039;&#039;crm_mon -1f&#039;&#039; is shown below:&lt;br /&gt;
&lt;br /&gt;
 # crm_mon -1f | grep fail-count&lt;br /&gt;
&lt;br /&gt;
This script can be called by the NMS via SSH, or by the SNMP agent on the nodes by adding the following line to the Net-SNMP configuration in &#039;&#039;snmpd.conf&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 extend failcounter crm_mon -1f | grep -q fail-count&lt;br /&gt;
&lt;br /&gt;
The code returned by the script can be checked by the NMS using:&lt;br /&gt;
&lt;br /&gt;
 snmpget &amp;lt;node&amp;gt; nsExtend.\”failcounter\”&lt;br /&gt;
&lt;br /&gt;
A result of &#039;&#039;0&#039;&#039; indicates a failure.&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
	<entry>
		<id>http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12001</id>
		<title>Using Red Hat Cluster Manager with Lustre</title>
		<link rel="alternate" type="text/html" href="http://wiki.old.lustre.org/index.php?title=Using_Red_Hat_Cluster_Manager_with_Lustre&amp;diff=12001"/>
		<updated>2010-12-10T13:48:06Z</updated>

		<summary type="html">&lt;p&gt;Sven: /* Setting Up RedHat Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;small&amp;gt;&#039;&#039;(Updated: Dec 2010)&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
__TOC__&lt;br /&gt;
This page describes how to configure and use Red Hat Cluster Manager with Lustre failover. Sven Trautmann has contributed this content. &lt;br /&gt;
&lt;br /&gt;
For more about Lustre failover, see [[Configuring Lustre for Failover]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preliminary Notes ==&lt;br /&gt;
&lt;br /&gt;
This document is based on the RedHat Cluster version 2.0, which is part of RedHat Enterprise Linux version 5.5. For other Versions or RHEL-based distributions the syntax or methods to setup and run RedHat Cluster may differ.&lt;br /&gt;
&lt;br /&gt;
In comparison with other HA solutions RedHat Cluster as in RHEL 5.5 is a pretty old HA solution. It is recommended to use other HA solutions like pacemaker, if possible.&lt;br /&gt;
&lt;br /&gt;
== Setting Up RedHat Cluster ==&lt;br /&gt;
&lt;br /&gt;
==== Setting Up the &#039;&#039;openais&#039;&#039; Communication Stack ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;openais&#039;&#039; package is distributed with RHEL and can be installed using &#039;&#039;rpm -i /path/to/RHEL-DVD/Server/openais0.80.6-16.el5.x86_64.rpm&#039;&#039; or &#039;&#039;yum install openais&#039;&#039; if yum is configured to access the RHEL repository.&lt;br /&gt;
&lt;br /&gt;
Once installed, the software looks for a configuration in the file &#039;&#039;/etc/ais/openais.conf&lt;br /&gt;
&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Complete the following steps to set up the &#039;&#039;openais&#039;&#039; communication stack:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Edit the totem section of the &#039;&#039;openais.conf&#039;&#039; configuration file to designate the IP address and netmask of the interface(s) to be used.&#039;&#039;&#039; The totem section of the configuration file describes the way &#039;&#039;openais&#039;&#039; communicates between nodes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
totem {&lt;br /&gt;
	version&amp;amp;#58; 2&lt;br /&gt;
	secauth&amp;amp;#58; off&lt;br /&gt;
	threads&amp;amp;#58; 0&lt;br /&gt;
	interface {&lt;br /&gt;
		ringnumber&amp;amp;#58; 0&lt;br /&gt;
		bindnetaddr&amp;amp;#58; 10.0.0.0&lt;br /&gt;
		mcastaddr&amp;amp;#58;		226.94.1.1&lt;br /&gt;
		mcastport&amp;amp;#58;		5405&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Openais&#039;&#039; uses the option &#039;&#039;bindnetaddr&#039;&#039; to determine which interface is to be used for cluster communication. The example above assumes one of the node’s interfaces is configured on the network 10.0.0.0. The value of the option is calculated from the IP address AND the network mask for the interface (IP &amp;amp; MASK) so the final bits of the address are cleared. Thus the configuration file is independent of any node and can be copied to all nodes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create an AIS key&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /usr/sbin/ais-keygen&lt;br /&gt;
OpenAIS Authentication key generator.&lt;br /&gt;
Gathering 1024 bits for key from /dev/random.&lt;br /&gt;
Writing openais key to /etc/ais/authkey.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setting Up Resource Management ==&lt;br /&gt;
&lt;br /&gt;
All services that the Pacemaker cluster resource manager will manage are called resources. The Pacemaker cluster resource manager uses resource agents to start, stop or monitor resources. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039;&#039;&#039; The simplest way to configure the cluster is by using a crm subshell. All examples will be given in this notation. If you understood the syntax of the cluster configuration, you also can use the GUI or XML notation.&lt;br /&gt;
&lt;br /&gt;
==== Completing a Basic Setup of the Cluster ====&lt;br /&gt;
&lt;br /&gt;
To test that your cluster manager is running and set global options, complete the steps below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Display the cluster status.&#039;&#039;&#039; Enter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # crm_mon -1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output should look similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
============ &lt;br /&gt;
Last updated: Fri Dec 25 17:31:54 2009 &lt;br /&gt;
Stack&amp;amp;#58; openais &lt;br /&gt;
Current DC: node1 - partition with quorum &lt;br /&gt;
Version&amp;amp;#58; 1.0.6-cebe2b6ff49b36b29a3bd7ada1c4701c7470febe &lt;br /&gt;
2 Nodes configured, 2 expected votes &lt;br /&gt;
0 Resources configured. &lt;br /&gt;
============ &lt;br /&gt;
&lt;br /&gt;
Online&amp;amp;#58; [ node1 node2 ] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This output indicates that &#039;&#039;corosync&#039;&#039; started the cluster resource manager and it is ready to manage resources.&lt;br /&gt;
&lt;br /&gt;
Several global options must be set in the cluster. The two described in the next two steps are especially important to consider. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. If your  cluster consists of just two nodes, switch the quorum feature off.&#039;&#039;&#039; On the command line, enter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;amp;#35; crm configure property no-quorum-policy=ignore &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your lustre setup comprises more than two nodes, you can leave the no-quorum option as it is.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. In a Lustre setup, fencing is normally used and is enabled by default. If you have a good reason not to use it, disable it by entering:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;#35; crm configure property stonith-enabled=false&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the global options of the cluster are set up correctly, continue to the following sections to configure resources and constraints.&lt;br /&gt;
&lt;br /&gt;
==== Configuring Resources ====&lt;br /&gt;
&lt;br /&gt;
OSTs are represented as Filesystem resources. A Lustre cluster consists of several Filesystem resources along with constraints that determine on which nodes of the cluster the resources can run.&lt;br /&gt;
&lt;br /&gt;
By default, the start, stop, and monitor operations in a Filesystem resource time out after 20 sec. Since some mounts in Lustre require up to 5 minutes or more, the default timeouts for these operations must be modified. Also, a monitor operation must be added to the resource so that Pacemaker can check if the resource is still alive and react in case of any problems. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Create a definition of the Filesystem resource and save it in a file such as &#039;&#039;MyOST.res&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you have multiple OSTs, you will need to define additional resources.&lt;br /&gt;
&lt;br /&gt;
The example below shows a complete definition of the Filesystem resource. You will need to change the &#039;&#039;device&#039;&#039; and &#039;&#039;directory&#039;&#039; to correspond to your setup.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
primitive resMyOST ocf&amp;amp;#58;heartbeat&amp;amp;#58;Filesystem \ &lt;br /&gt;
	meta target-role=&amp;quot;stopped&amp;quot; \ &lt;br /&gt;
	operations $id=&amp;quot;resMyOST-operations&amp;quot; \ &lt;br /&gt;
	op monitor interval=&amp;quot;120&amp;quot; timeout=&amp;quot;60&amp;quot; \ &lt;br /&gt;
	op start interval=&amp;quot;0&amp;quot; timeout=&amp;quot;300&amp;quot; \ &lt;br /&gt;
	op stop interval=&amp;quot;0&amp;quot; timeout=&amp;quot;300&amp;quot; \ &lt;br /&gt;
	params device=&amp;quot;device&amp;quot; directory=&amp;quot;directory&amp;quot; fstype=&amp;quot;lustre&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, the resource is initially stopped (&#039;&#039;target-role=”stopped”&#039;&#039;) because the constraints specifying where the resource is to be run have not yet been defined. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;start&#039;&#039; and &#039;&#039;stop&#039;&#039; operations have each been set to a timeout of 300 sec. The resource is monitored at intervals of 120 seconds. The parameters &amp;quot;&#039;&#039;device&#039;&#039;&amp;quot;, &amp;quot;&#039;&#039;directory&#039;&#039;&amp;quot; and &amp;quot;lustre&amp;quot; are passed to the &#039;&#039;mount&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Read the definition into your cluster configuration&#039;&#039;&#039; by entering:&lt;br /&gt;
&lt;br /&gt;
 # crm configure &amp;lt; MyOST.res&lt;br /&gt;
&lt;br /&gt;
You can define as many OST resources as you want. &lt;br /&gt;
&lt;br /&gt;
If a server fails or the monitoring of a OST results in the detection of a failure, the cluster first tries to restart the resource on the failed node. If the node fails to restart it, the resource is migrated to another node.&lt;br /&gt;
&lt;br /&gt;
More sophosticated ways of failure management (such as trying to restart a node three times before migrating to another node) are possible using the cluster resource manager. See the Pacemaker documentation for details.&lt;br /&gt;
&lt;br /&gt;
If mounting the file system depends on another resource like the start of a RAID or multipath driver, you can include this resource in the cluster configuration. This resource is then monitored by the cluster, enabling Pacemaker to react to failures.&lt;br /&gt;
&lt;br /&gt;
==== Configuring Constraints ====&lt;br /&gt;
In a simple Lustre cluster setup, constraints are not required. However, in a larger cluster setup, you may want to use constraints to establish relationships between resources. For example, to keep the load distributed equally across nodes in your cluster, you may want to control how many OSTs can run on a particular node.&lt;br /&gt;
&lt;br /&gt;
Constraints on resources are established by Pacemaker through a point system. Resources accumulate or lose points according to the constraints you define. If a resource has negative points with respect to a certain node, it cannot run on that node.&lt;br /&gt;
&lt;br /&gt;
For example, to constrain the co-location of two resources, complete the steps below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Add co-location constraints between resources.&#039;&#039;&#039; Enter commands similar to the following:&lt;br /&gt;
&lt;br /&gt;
 # crm configure colocation colresOST1resOST2 -100: resOST1 resOST2&lt;br /&gt;
&lt;br /&gt;
This constraint assigns -100 points to resOST2 if an attempt is made to run resOST2 on the same node as resOST1. If the resulting total number of points assigned to reOST2 is negative, it will not be able run on that node. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. After defining all necessary constraints, start the resources.&#039;&#039;&#039; Enter:&lt;br /&gt;
&lt;br /&gt;
 # crm resource start resMyOST&lt;br /&gt;
&lt;br /&gt;
Execute this command for each OST (Filesystem resource) in the cluster.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Use care when setting up your point system. You can use the point system if your cluster has at least three nodes or if the resource can acquire points from other constraints. However, in a system with only two nodes and no way to acquire points, the constraint in the example above will result in an inability to migrate a resource from a failed node. &lt;br /&gt;
&lt;br /&gt;
For example, if resOST1 is running on &#039;&#039;node1&#039;&#039; and resOST2 on &#039;&#039;node2&#039;&#039; and &#039;&#039;node2&#039;&#039; fails, an attempt will be made to run resOST2 on &#039;&#039;node1&#039;&#039;. However, the constraint will assign resOST2 -100 points since resOST1 is already running on &#039;&#039;node1&#039;&#039;. Consequently resOST2 will be unable to run on &#039;&#039;node1&#039;&#039; and, since it is a two-node system, no other node is available.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
To find out more about how the cluster resource manager calculates points, see the Pacemaker documentation.&lt;br /&gt;
&lt;br /&gt;
==== Internal Monitoring of the System ====&lt;br /&gt;
&lt;br /&gt;
In addition to monitoring of the resource itself, the nodes of the cluster must also be monitored. An important parameter to monitor is whether the node is connected to the network. Each node pings one or more hosts and counts the answers it receives. The number of responses determines how “good” its connection is to the network.&lt;br /&gt;
&lt;br /&gt;
Pacemaker provides a simple way to configure this task.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Define a ping resource.&#039;&#039;&#039; In the command below, the &#039;&#039;host_list&#039;&#039; contains a list of hosts that the nodes should ping.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# crm configure resPing ocf:pacemaker:pingd \&lt;br /&gt;
  params host_list=“host1 ...“ multiplier=“10“ dampen=”5s“&lt;br /&gt;
# crm configure clone clonePing resPing&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For every accessible host detected, any resource on that node gets 10 points (set by the &#039;&#039;multiplier=&#039;&#039; parameter). The clone configuration makes the ping resource run on every available node.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Set up constraints to run a resource on the node with the best connectivity.&#039;&#039;&#039; The score from the &#039;&#039;ping&#039;&#039; resource can be used in other constraints to allow a resource to run only on those nodes that have a sufficient ping score. For example, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm configure location locMyOST resMyOST rule $id=&amp;quot;locMyOST&amp;quot; pingd: defined pingd&lt;br /&gt;
&lt;br /&gt;
This location constraint adds the &#039;&#039;ping&#039;&#039; score to the total score assigned to a resource for a particular node. The resource will tend to run on the node with the best connectivity.&lt;br /&gt;
&lt;br /&gt;
Other system checks, such as CPU usage or free RAM, are measured by the Sysinfo resource. The capabilities of the Sysinfo resource are somewhat limited, so it will be replaced by the SystemHealth strategy in future releases of Pacemaker. For more information about the SystemHealth feature, see:&lt;br /&gt;
[http://www.clusterlabs.org/wiki/SystemHealth www.clusterlabs.org/wiki/SystemHealth]&lt;br /&gt;
&lt;br /&gt;
==== 	Administering the Cluster ====&lt;br /&gt;
&lt;br /&gt;
Careful system administration is required to support high availability in a cluster. A primary task of an administrator is to check the cluster for errors or failures of any resources. When a failure occurs, the administrator must search for the cause of the problem, solve it and then reset the corresponding failcounter.&lt;br /&gt;
This section describes some basic commands useful to an administrator. For more detailed information, see the Pacemaker documentation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Displaying a Status Overview&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The command &#039;&#039;crm_mon&#039;&#039; displays an overview of the status of the cluster. It functions similarly to the Linux top command by updating the output each time a cluster event occurs. To generate a one-time output, add the &amp;lt;br&amp;gt;&lt;br /&gt;
option &#039;&#039;-1&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
To include a display of all failcounters for all resources on the nodes, add the &#039;&#039;-f&#039;&#039; option to the command. The output of the command crm_mon -1f looks similar to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
============ &lt;br /&gt;
Last updated: Fri Dec 25 17:31:54 2009 &lt;br /&gt;
Stack: openais &lt;br /&gt;
Current DC: node1 - partition with quorum &lt;br /&gt;
Version: 1.0.6-cebe2b6ff49b36b29a3bd7ada1c4701c7470febe &lt;br /&gt;
2 Nodes configured, 2 expected votes &lt;br /&gt;
2 Resources configured.&lt;br /&gt;
============&lt;br /&gt;
&lt;br /&gt;
Online: [ node1 node2 ]&lt;br /&gt;
&lt;br /&gt;
Clone Set: clonePing&lt;br /&gt;
     Started: [ node1 node2 ]&lt;br /&gt;
resMyOST       (ocf::heartbeat:filesys): Started node1&lt;br /&gt;
&lt;br /&gt;
Migration summary:&lt;br /&gt;
* Node node1:  pingd=20&lt;br /&gt;
   resMyOST: migration-threshold=1000000 fail-count=1&lt;br /&gt;
* Node node2:  pingd=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Switching a Node to Standby&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can switch a node to standby to, for example, perform maintenance on the node. In standby, the node is still a full member of the cluster but cannot run any resources. All resources that were running on that node are forced away. &lt;br /&gt;
&lt;br /&gt;
To switch the node called &#039;&#039;node01&#039;&#039; to standby, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm node standby node01&lt;br /&gt;
&lt;br /&gt;
To switch the node online again enter:&lt;br /&gt;
&lt;br /&gt;
 # crm node online node01&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Migrating a Resource to Another Node&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The cluster resource manager can migrate a resource from one node to another while the resource is running. To migrate a resource away from the node it is running on, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm resource migrate resMyOST&lt;br /&gt;
&lt;br /&gt;
This command adds a location constraint to the configuration that specifies that the resource &#039;&#039;resMyOST&#039;&#039; can no longer run on the original node. &lt;br /&gt;
&lt;br /&gt;
To delete this constraint, enter:&lt;br /&gt;
&lt;br /&gt;
 # crm resource unmigrate resMyOST&lt;br /&gt;
&lt;br /&gt;
A target node can be specified in the migration command as follows:&lt;br /&gt;
&lt;br /&gt;
 # crm configure migrate resMyOST node02&lt;br /&gt;
&lt;br /&gt;
This command causes the resource &#039;&#039;resMyOST&#039;&#039; to move to node &#039;&#039;node02&#039;&#039;, while adding a location constraint to the configuration. To remove the location constraint, enter the &#039;&#039;unmigrate&#039;&#039; command again.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Resetting the failcounter&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If Pacemaker monitors a resource and finds that it isn’t running, by default it restarts the resource on the node. If the resource cannot be restarted on the node, it then migrates the resource to another node. &lt;br /&gt;
&lt;br /&gt;
It is the administrator’s task to find out the cause of the error and to reset the failcounter of the resource. This can be achieved by entering:&lt;br /&gt;
&lt;br /&gt;
 # crm resource failcount &amp;lt;resource&amp;gt; delete &amp;lt;node&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command deletes (resets) the failcounter for the resource on the specified node.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;“Cleaning up” a Resource&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Sometimes it is necessary to “clean up” a resource. Internally, this command removes any information about a resource from the Local Resource Manager on every node and thus forces a complete re-read of the status of that resource. The command syntax is:&lt;br /&gt;
&lt;br /&gt;
 # crm resource cleanup resMyOST&lt;br /&gt;
&lt;br /&gt;
This command removes information about the resource called &#039;&#039;resMyOST&#039;&#039; on all nodes.&lt;br /&gt;
&lt;br /&gt;
== Setting up Fencing ==&lt;br /&gt;
&lt;br /&gt;
Fencing is a technique used to isolate a node from the cluster when it is malfunctioning to prevent data corruption. For example, if a “split-brain” condition occurs in which two nodes can no longer communicate and both attempt to mount the same filesystem resource, data corruption can result. (The Multiple Mount Protection (MMP) mechanism in Lustre is designed to protect a file system from being mounted simultaneously by more than one node.)&lt;br /&gt;
&lt;br /&gt;
Pacemaker uses the STONITH (Shoot The Other Node In The Head) approach to fencing malfunctioning nodes, in which a malfunctioning node is simply switched off. A good discussion about fencing can be found [http://www.clusterlabs.org/doc/crm_fencing.html here]. This article provides information useful for deciding which devices to purchase or how to set up STONITH resources for your cluster and also provides a detailed setup procedure.&lt;br /&gt;
&lt;br /&gt;
A basic setup includes the following steps:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Test your fencing system manually before configuring the corresponding resources in the cluster.&#039;&#039;&#039; Manual testing is done by calling the STONITH command directly from each node. If this works in all tests, it will work in the cluster.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. After configuring of the according resources, check that the system works as expected.&#039;&#039;&#039; To cause an artificial “split-brain” situation, you could use a host-based firewall to prohibit communication from other nodes on the heartbeat interface(s) by entering:&lt;br /&gt;
&lt;br /&gt;
 # iptables -I INPUT -i &amp;lt;heartbeat-IF&amp;gt; -p 5405 -s &amp;lt;other node&amp;gt; -j DROP&lt;br /&gt;
&lt;br /&gt;
When the other nodes are not able to see the node isolated by the firewall, the isolated node should be shut down or rebooted.&lt;br /&gt;
&lt;br /&gt;
== Setting Up Monitoring ==&lt;br /&gt;
&lt;br /&gt;
Any cluster must to be monitored to provide the high availability it was designed for. Consider the following scenario demonstrating the importance of monitoring: &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;A node fails and all resources migrate to its backup node. Since the failover was smooth, nobody notices the problem. After some time, the second node fails and service stops. This is a serious problem since neither of the nodes is now able to provide service. The administrator must recover data from backups and possibly even install it on new hardware. A significant delay may result for users.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Pacemaker offers several options for making information available to a monitoring system. These include:&lt;br /&gt;
*Utilizing the &#039;&#039;crm_mon&#039;&#039; program to send out information about changes in cluster status. &lt;br /&gt;
*Using scripts to check resource failcounters.&lt;br /&gt;
&lt;br /&gt;
These options are described in the following sections.&lt;br /&gt;
&lt;br /&gt;
==== Using &#039;&#039;crm_mon&#039;&#039; to Send Email Messages ====&lt;br /&gt;
In the most simple setup, the &#039;&#039;crm_mon&#039;&#039; program can be used to send out an email each time the status of the cluster changes. This approach requires a fully working mail environment and &#039;&#039;mail&#039;&#039; command. &lt;br /&gt;
&lt;br /&gt;
Before configuring the &#039;&#039;crm_mon&#039;&#039; daemon, check that emails sent from the command line are delivered correctly by entering:&lt;br /&gt;
&lt;br /&gt;
 # crm_mon --daemonize –-mail-to &amp;lt;user@example.com&amp;gt; [--mail-host mail.example.com]&lt;br /&gt;
&lt;br /&gt;
The resource monitor in the cluster can be configured to ensure the mail alerting service resource is running, as shown below: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
primitive resMON ocf&amp;amp;#58;pacemaker&amp;amp;#58;ClusterMon \ &lt;br /&gt;
	operations $id=&amp;quot;resMON-operations&amp;quot; \ &lt;br /&gt;
	op monitor interval=&amp;quot;180&amp;quot; timeout=&amp;quot;20&amp;quot; \ &lt;br /&gt;
	params extra_options=&amp;quot;--mail-to &amp;lt;your@mail.address&amp;gt;&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a node fails, which could prevent the email from being sent, the resource is started on another node and an email about the successful start of the resource is sent out from the new node. The administrator&#039;s task is to search for the cause of the failover.&lt;br /&gt;
&lt;br /&gt;
==== Using &#039;&#039;crm_mon&#039;&#039; to Send SNMP Traps ====&lt;br /&gt;
The &#039;&#039;crm_mon&#039;&#039; daemon can be used to send SNMP traps to a network management server. The configuration from the command line is:&lt;br /&gt;
&lt;br /&gt;
 # crm_mon –-daemonize –-snmp-traps nms.example.com&lt;br /&gt;
&lt;br /&gt;
This daemon can  also be configured as a cluster resource as shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
primitive resMON ocf&amp;amp;#58;pacemaker&amp;amp;#58;ClusterMon \ &lt;br /&gt;
	operations $id=&amp;quot;resMON-operations&amp;quot; \ &lt;br /&gt;
	op monitor interval=&amp;quot;180&amp;quot; timeout=&amp;quot;20&amp;quot; \ &lt;br /&gt;
	params extra_options=&amp;quot;--snmp-trap nms.example.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The MIB of the traps is defined in the &#039;&#039;PCMKR.txt&#039;&#039; file.&lt;br /&gt;
&lt;br /&gt;
==== Polling the Failcounters ====&lt;br /&gt;
If all the nodes of a cluster have problems, pushing information about events may be not be sufficient. An alternative is to check the failcounters of all resources periodically from the network management station (NMS). A simple script that checks for the presence of any failcounters in the output of &#039;&#039;crm_mon -1f&#039;&#039; is shown below:&lt;br /&gt;
&lt;br /&gt;
 # crm_mon -1f | grep fail-count&lt;br /&gt;
&lt;br /&gt;
This script can be called by the NMS via SSH, or by the SNMP agent on the nodes by adding the following line to the Net-SNMP configuration in &#039;&#039;snmpd.conf&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 extend failcounter crm_mon -1f | grep -q fail-count&lt;br /&gt;
&lt;br /&gt;
The code returned by the script can be checked by the NMS using:&lt;br /&gt;
&lt;br /&gt;
 snmpget &amp;lt;node&amp;gt; nsExtend.\”failcounter\”&lt;br /&gt;
&lt;br /&gt;
A result of &#039;&#039;0&#039;&#039; indicates a failure.&lt;/div&gt;</summary>
		<author><name>Sven</name></author>
	</entry>
</feed>