Cluster Suite HA – How to Configure a 2 Node Test _ Linux Puzzles

Embed Size (px)

Citation preview

  • 8/10/2019 Cluster Suite HA How to Configure a 2 Node Test _ Linux Puzzles

    1/4

    10/12/2014 Cluster Suite HA How to configure a 2 node test | Linux Puzzles

    http://marksallee.wordpress.com/2012/05/25/cluster-suite-ha-how-to-configure-a-2-node-test/ 1/4

    Cluster Suite HA How to configure a 2 node testThis page documents how to set up a two-node cluster test with Cluster Suite/High Availability, comparing fencing methods between KVM virtual machines and bare-metal servers. You will be required to do some manual editing of xml files, but its a lot easier to view than some other clustering file formats. These examples weredone with the luci/conga GUI along with editing the xml incluster.conf.

    Hardware requirements:

    One bare-metal server for the cluster master, and two servers (virtual or physical) for the cluster nodes.

    Software requirements:

    RHEL6, and a RHEL subscription to the High Availability package/add-on channel. We will be working with the packages luci, ricci, rgmanager, and cman.

    At first, I thought this must be a tribute to a famous 50s TV show couple, but whats with the ricci instead of ricky? Maybe the developers were a fan of a cert ain actresswith that last name.

    Package installationInstall these packages on the cluster master:

    yum groupinstall "High Availability"

    or: yum install luci

    Set the password, start the service:

    passwd luci ; service luci start

    yum install ricci ; passwd ricci

    Point your web browser to the URL suggested when you started the luci service, https://servername:8084 .Log in as root, set the cluster permissions for user ricci on the Admin tab in the upper right hand corner of the GUI. Log out and log back in as ricci.

    Install on cluster nodes:

    yum install ricci ; passwd ricci ; service ricci start ; chkconfig ricci on

    You will probably need to set the fully-qualified domain name of each cluster node as its host name, and in its own /etc/hosts file, such as:/etc/hosts:

    192.168.1.2 test1. domain.org

    192.168.1.3 test2. domain.org

    192.168.1.4 test1 -vm.domain.org

    192.168.1.5 test2 -vm.domain.org

    /etc/sysconfig/network:

    HOSTNAME=test1. domain.org

  • 8/10/2019 Cluster Suite HA How to Configure a 2 Node Test _ Linux Puzzles

    2/4

    10/12/2014 Cluster Suite HA How to configure a 2 node test | Linux Puzzles

    http://marksallee.wordpress.com/2012/05/25/cluster-suite-ha-how-to-configure-a-2-node-test/ 2/4

    Add nodes Add nodes to the Nodes tab. Select Download Sof tware to automatically install required packages.Test reboot of one node at a time from the GUI. Again, I restate that having the fully-qualified domain name was required for nodes to add properly.cluster.conf excerpt at this stage:

    Add fence devicesCreate fence devices for Dell DRAC5

    cluster.conf:

    Note: module_name is a required option which refers to the DRACs definition of which server is to be accessed. The cluster.conf validation wouldnt work without it.

  • 8/10/2019 Cluster Suite HA How to Configure a 2 Node Test _ Linux Puzzles

    3/4

    10/12/2014 Cluster Suite HA How to configure a 2 node test | Linux Puzzles

    http://marksallee.wordpress.com/2012/05/25/cluster-suite-ha-how-to-configure-a-2-node-test/ 3/4

    Other sources mentioned adding command_prompt=admin-> but this didnt work for me.

    Add fencing for KVM virtual machinesThis configuration applies to two VMs running on the same physical host, using fence_xvm.

    You could, of course, configure fence_xvm as the first fencing method, fence_drac5 as the backup method. This would work, but if you have other virtual machinesrunning on the same host, they would all be restarted with the fencing.

    At the time of this writing, fence_virt/fence_virsh across multiple physical hosts is still not very well documented or supported. This is a bit disappointing since its afeature which many virtualization users could use.

    Test Your Fencing MethodsOn one node, try: cman_tool kill -n nodename.fqdn.org

    and watch the logs on the other node for successful fencing, and takeover.

    Other methods of triggering fence:

    1. service network stop

    2. echo c > /proc/sysrq-trigger # hangs the system

    3. pull the network cable on one node

    Add failover domainCreate domain failover1 and add the two nodes to it. This section defines which nodes are a member of the failover group that will be active.

    Add service groupCreate a service group servicegroup1 with a virtual IP address, and Apache. References failoverdomain failover1.

  • 8/10/2019 Cluster Suite HA How to Configure a 2 Node Test _ Linux Puzzles

    4/4

    10/12/2014 Cluster Suite HA How to configure a 2 node test | Linux Puzzles

    http://marksallee.wordpress.com/2012/05/25/cluster-suite-ha-how-to-configure-a-2-node-test/ 4/4

    Policy:restart means it will attempt to restart the service once before relocating to another available node.restart-disable means that the system will attempt to restart the service, if fails it will leave it disabled and not attempt to relocate it to another node.relocate means relocate to another node without attempting a restart of service on the same node.cluster.conf for resource,service group:define a virtual IP address that can be failed-over between nodes.