Step by step tutorial to configure two node redhat clustering By -- Sojan VM



Two node Red Hat and Clustering
  node1
  node2
  management server
Configure the Shared Storage

Install the clustering software on the nodes
High availability application service “High Availability”
package group  and webserver
service ricci start
provide  passwd for ricci

Install the cluster management software on
the management server
yum groupinstall “High Availability Management”
chkconfig luci on
service luci start












Define a cluster
Node1 and Node2



Then create a partition and format


Define kvm Fence device
Cluster.conf--------------------cluster configuration fine


<?xml version="1.0"?>

<cluster config_version="6" name="cluster">

        <clusternodes>

                <clusternode name="cluster_node1" nodeid="1">

                        <fence>

                                <method name="kvm">

                                        <device domain="cluster_node1" name="kvm"/>

                                </method>

                        </fence>

                </clusternode>

                <clusternode name="cluster_node2" nodeid="2">

                        <fence>

                                <method name="kvm">

                                        <device domain="cluster_node2" name="kvm"/>

                                </method>

                        </fence>

                </clusternode>

        </clusternodes>

        <cman expected_votes="1" two_node="1"/>

        <fencedevices>

                <fencedevice agent="fence_xvm" name="kvm"/>

        </fencedevices>



</cluster>




Kvm Host configuration
Let's start Installing the necessary packages on the host:
yum install   fence-virt fence-virtd fence-virtd-libvirt fence-virtd-multicast
Then create the key needed for the host to authenticate all the fencing requests from the guest cluster:
dd if=/dev/urandom of=/etc/cluster/fence_xvm.key bs=4096 count=1
The key should then be copied to /etc/cluster/fence_xvm.key of every guest.
Now run the configuration tool:
fence_virtd –c
service fence_virtd start
 
check your fence is working or not:
fence_xvm -o reboot –H node2
 
Define Resources For Clustered Web Service
Shared Storage (if not in fstab)
IP address

Apache Resource






Define Failover Domains

Node2































Define Clustered Web Service
Define service
Add storage resource (if not in fstab)
Add ip address resource

add script resource








No comments: