Installation and Basic Setup with YaST

Contents

3.1. Installing the High Availability Extension
3.2. Initial Cluster Setup
3.3. Bringing the Cluster Online
3.4. Mass Deployment with AutoYaST

Abstract

There are two ways to install the software needed for High Availability clusters: either from a command line, using zypper, or with YaST which provides a graphical user interface. After installing the software on all nodes that will be part of your cluster, the next step is to initially configure the cluster so that the nodes can communicate with each other and to start the services needed to bring the cluster online. The initial cluster setup can either be done manually (be editing and copying the configuration files) or with the YaST cluster module.

This chapter describes how to do a new installation and setup with SUSE Linux Enterprise High Availability Extension 11 SP1 from scratch. Refer to chapter Appendix B, Upgrading Your Cluster to the Latest Product Version if you want to migrate an existing cluster that runs an older version of SUSE Linux Enterprise High Availability Extension or if you want to update any software packages on nodes that are part of a running cluster.

Installing the High Availability Extension

The packages needed for configuring and managing a cluster with the High Availability Extension are included in the High Availability installation pattern. This pattern is only available after SUSE® Linux Enterprise High Availability Extension has been installed as add-on. For information on how to install add-on products, see the SUSE Linux Enterprise 11 SP1 Deployment Guide, available at http://www.novell.com/documentation. Refer to chapter Installing Add-On Products.

[Note]Installing the Software Packages

The software packages needed for High Availability clusters are not automatically copied to the cluster nodes.

If you do not want to install SUSE® Linux Enterprise Server 11 SP1 and SUSE® Linux Enterprise High Availability Extension 11 SP1 manually on all nodes that will be part of your cluster, use AutoYaST to clone existing nodes. For more information, refer to Section 3.4, “Mass Deployment with AutoYaST”.

Procedure 3.1. Installing the High Availability Pattern

  1. Start YaST as root user and select Software+Software Management.

    Alternatively, start the YaST package manager as root on a command line with yast2 sw_single.

  2. From the Filter list, select Patterns and activate the High Availability pattern in the pattern list.

  3. Click Accept to start the installation of the packages.

Initial Cluster Setup

After having installed the HA packages, proceed with the initial cluster setup. This includes the following basic steps:

The following procedures guide you through each of the steps, using the YaST cluster module. To access the cluster configuration dialog, start YaST as root and select High Availability+Cluster. Alternatively, start the YaST cluster module as root on a command line with yast2 cluster.

If you start the cluster module for the first time, it appears as wizard, guiding you through all the steps necessary for basic setup. Otherwise, click the categories on the left panel to access the configuration options for each step.

Defining the Communication Channels

For successful communication between the cluster nodes, define at least one communication channel. However, it is recommended to set up the communication via two or more redundant paths (either by using network device bonding or by adding a second communication channel with Corosync). For each communication channel, you need to define the following parameters:

Bind Network Address (bindnetaddr)

The network address to bind to. To ease sharing configuration files across the cluster, OpenAIS uses network interface netmask to mask only the address bits that are used for routing the network. Set the value to the subnet you will use for cluster multicast.

Multicast Address (mcastaddr)

Can be an IPv4 or IPv6 address.

Multicast Port (mcastport)

The UDP port specified for mcastaddr.

All nodes in the cluster will know each other from using the same multicast address and the same port number. For different clusters, use a different multicast address.

To configure redundant communication with Corosync, you need to define multiple interface sections in /etc/corosync/corosync.conf, each with a different ringnumber. Use the Redundant Ring Protocol (RRP) to tell the cluster how to use these interfaces. RRP can have three modes (rrp_mode): if set to active, Corosync uses all interfaces actively. If set to passive, Corosync uses the second interface only if the first ring fails. If rrp_mode is set to none, RRP is disabled. With RRP, two physically separate networks are used for communication. In case one network fails, the cluster nodes can still communicate via the other network.

If several rings are configured, each node can have multiple IP addresses. As soon as rrp_mode is enabled, the Stream Control Transmission Protocol (SCTP) is used for communication between the nodes by default (instead of TCP).

Procedure 3.2. Defining the Communication Channels

  1. In the YaST cluster module, switch to the Communication Channels category.

  2. Define the Bind Network Address, the Multicast Address and the Multicast Port to use for all cluster nodes.

  3. If you want to define a second channel:

    1. Activate Redundant Channel.

    2. Define the Bind Network Address, the Multicast Address and the Multicast Port for the redundant channel.

    3. Select the rrp_mode you want to use. To disable the RRP, select None. For more information about the modes, click Help.

      When using RRP, the primary ring (the first channel you have configured) gets the ringnumber 0, the second ring (redundant channel) the ringnumber 1 in /etc/corosync/corosync.conf.

  4. Activate Auto Generate Node ID to automatically generate a unique ID for every cluster node.

  5. If you only wanted to modify the communication channels for an existing cluster, click Finish to write the configuration to /etc/corosync/corosync.conf and to close the YaST cluster module. YaST then automatically also adjusts the firewall settings and opens the UDP port used for multicast.

  6. For further cluster configuration, click proceed with Procedure 3.3, “Enabling Secure Authentication”.

Defining Authentication Settings

As next step, define the authentication settings for the cluster. You can use HMAC/SHA1 authentication which requires a shared secret, used to protect and authenticate messages. The authentication key (password) you specify will be used on all nodes in the cluster.

Procedure 3.3. Enabling Secure Authentication

  1. In the YaST cluster module, switch to the Security category.

  2. Activate Enabling Security Auth.

  3. For a newly created cluster, click Generate Auth Key File. This creates an authentication key that is written to /etc/corosync/authkey.

  4. If you only want to modify the authentication settings, click Finish to write the configuration to /etc/corosync/corosync.conf and to close the YaST cluster module.

  5. For further cluster configuration, proceed with Section 3.2.3, “Transferring the Configuration to All Nodes”.

Transferring the Configuration to All Nodes

Instead of copying the resulting configuration files to all nodes manually, use the csync2 tool for replication across all nodes in the cluster. Csync2 can handle any number of hosts, sorted into synchronization groups. Each synchronization group has its own list of member hosts and its include/exlude patterns that define which files should be synchronized in the synchronization group. The groups, the hostnames belonging to each group, and the include/exclude rules for each group are specified in the Csync2 configuration file, /etc/csync2/csync2.cfg.

For authentication, Csync2 uses the IP addresses and pre-shared-keys within a synchronization group. You need to generate one key file for each synchronization group and copy it to all group members.

For more information about Csync2, refer to http://oss.linbit.com/csync2/paper.pdf

Procedure 3.4. Configuring Csync2 with YaST

  1. In the YaST cluster module, switch to the Csync2 category.

  2. To specify the synchronization group, click Add in the Sync Host group and enter the local hostnames of all nodes in your cluster. For each node, you must use exactly the strings that are returned by the hostname command.

  3. Click Generate Pre-Shared-Keys to create a key file for the synchronization group. The key file is written to /etc/csync2/key_hagroup. After it has been created, it must be copied manually to all members of the cluster.

  4. To populate the Sync File list with the files that usually need to be synchronized among all nodes, click Add Suggested Files.

  5. If you want to Edit, Add or Remove files from the list of files to be synchronized use the respective buttons. You must enter the absolute pathname for each file.

  6. Activate Csync2 by clicking Turn Csync2 On. This will start Csync2 automatically at boot time.

  7. If all options are set according to your wishes, click Finish to close the YaST cluster module. YaST then writes the Csync2 configuration to /etc/csync2/csync2.cfg.

After you have configured Csync2, start the synchronization process from command line as described below.

Procedure 3.5. Synchronizing the Configuration Files with Csync2

To successfully synchronize the files with Csync2, make sure that the following prerequisites are met:

  • The same Csync2 configuration is available on all nodes. Either include /etc/csync2/csync2.cfg in the list of files to be synchronized with Csync2 or copy the file manually to all nodes after you have configured it as described in Procedure 3.4, “Configuring Csync2 with YaST”.

  • Copy the /etc/csync2/key_hagroup file you have generated on one node in Step 3 to all nodes in the cluster as it is needed for authentication by Csync2. However, do not try to regenerate the file on the other nodes as it needs to be the same file on all nodes.

  • Make sure that xinetd is running on all nodes, as Csync2 depends on that daemon. Start xinetd as root with the following command:

    rcxinetd start
    [Note]Starting Services at Boot Time

    If you want Csync2 and xinetd to start automatically at boot time, execute the following command on all nodes:

    chkconfig csync2 on
    chkconfig xinetd on
  1. Start the file synchronization by executing the following command on one of the nodes:

    csync2 -xv

    This will synchronize all the files once. If all files can be synchronized successfully, Csync2 will finish with no errors.

    If one or several files that are to be synchronized have been modified also on other nodes (not only on the current one), Csync2 will report a conflict. You will get an output similar to the one below:

    While syncing file /etc/corosync/corosync.conf:
    ERROR from peer hex-14: File is also marked dirty here!
    Finished with 1 errors.
  2. If you are sure that the file version on the current node is the best one, you can resolve the conflict by forcing this file and resynchronizing:

    csync2 -f /etc/corosync/corosync.conf
    csync2 -x

For more information on the Csync2 options run csync2 -help.

[Note]Triggering Synchronization

Csync2 does not continuously synchronize files between the nodes. Each time you have updated any of the files that need to be synchronized, you need to resynchronize the files manually.

After you have synchronized the key files to all nodes in the cluster, start the basic services to bring the cluster online as described in Section 3.3, “Bringing the Cluster Online”.

Starting Services

Optionally, the YaST cluster module lets you define if to start certain services on a node at boot time. You can also use the module to start and stop the services manually (in case you do not want to use the command line for that). In order to bring the cluster nodes online and to start the cluster resource manager, OpenAIS must be started as a service.

Procedure 3.6. Starting or Stopping Services

  1. In the YaST cluster module, switch to the Service category.

  2. To start OpenAIS each time this cluster node is booted, select the respective option in the Booting group.

  3. If you want to use the Pacemaker GUI for configuring, managing and monitoring cluster resources, activate Start mgmtd as Well. This daemon is needed for the GUI.

  4. To start or stop OpenAIS immediately, click the respective button.

  5. Click Finish to close the YaST cluster module.

If you selected Off in the Booting group, you must start OpenAIS manually each time this node is booted. To start OpenAIS manually, use the rcopenais  start command.

Bringing the Cluster Online

After the initial cluster configuration is done, you can now start the service needed to bring the stack online.

Procedure 3.7. Starting OpenAIS/Corosync and Checking the Status

  1. Run the following command on each of the cluster nodes to start OpenAIS/Corosync:

    rcopenais start
  2. On one of the nodes, check the cluster status with the following command:

    crm_mon

    If all nodes are online, the output should be similar to the following:

    ============
    Last updated: Tue Mar  2 18:35:34 2010
    Stack: openais
    Current DC: e229 - partition with quorum
    Version: 1.1.1-530add2a3721a0ecccb24660a97dbfdaa3e68f51
    2 Nodes configured, 2 expected votes
    0 Resources configured.
    ============
         
     Online: [ e231 e229 ]

    This output indicates that the cluster resource manager is started and is ready to manage resources.

After the basic configuration is done and the nodes are online, you can now start to configure cluster resources. Use either the crm command line tool or the graphical user interface. For more information, refer to Chapter 5, Configuring and Managing Cluster Resources (GUI) or Chapter 6, Configuring and Managing Cluster Resources (Command Line).

Mass Deployment with AutoYaST

AutoYaST is a system for installing one or more SUSE Linux Enterprise systems automatically and without user intervention. SUSE Linux Enterprise lets you create a AutoYaST profile that contains installation and configuration data. The profile tells AutoYaST what to install and how to configure the installed system to get a completely ready-to-use system in the end. This profile can then be used for mass deployment in different ways.

For detailed instructions of how to make use of AutoYaST in various scenarios, see the SUSE Linux Enterprise 11 SP1 Deployment Guide, available at http://www.novell.com/documentation. Refer to chapter Automated Installation.

Procedure 3.8. Cloning a Cluster Node with AutoYaST

The following procedure is suitable for deploying cluster nodes which are clones of an already existing node. The cloned nodes will have the same packages installed and the same system configuration.

If you need to deploy cluster nodes on non-identical hardware, refer to the Rule-Based Autoinstallation section in the SUSE Linux Enterprise 11 SP1 Deployment Guide, available at http://www.novell.com/documentation.

[Important]Identical Hardware

This scenario assumes you are rolling out SUSE Linux Enterprise High Availability Extension 11 SP1 to a set of machines with exactly the same hardware configuration.

  1. Make sure the node you want to clone is correctly installed and configured as described in Section 3.1, “Installing the High Availability Extension” and Section 3.2, “Initial Cluster Setup”.

  2. Follow the description outlined in the SUSE Linux Enterprise 11 SP1 Deployment Guide for simple mass installation. This includes the following basic steps:

    1. Creating an AutoYaST profile. Use the AutoYaST GUI to create and modify a profile from the existing system configuration. In AutoYaST, choose the High Availability module and click the Clone button. If needed, adjust the configuration in the other modules and save the resulting control file as XML.

    2. Determining the source of the AutoYaST profile and the parameter to pass to the installation routines for the other nodes.

    3. Determining the source of the SUSE Linux Enterprise Server and SUSE Linux Enterprise High Availability Extension installation data.

    4. Determining and setting up the boot scenario for autoinstallation.

    5. Passing the command line to the installation routines, either by adding the parameters manually or by creating an info file.

    6. Starting and monitoring the autoinstallation process.

After the clone has been successfully installed, execute the following steps to make the cloned node join the cluster:

Procedure 3.9. Bringing the Cloned Node Online

  1. Transfer the key configuration files from the already configured nodes to the cloned node with Csync2 as described in Section 3.2.3, “Transferring the Configuration to All Nodes”.

  2. Start the OpenAIS service on the cloned node as described in Section 3.3, “Bringing the Cluster Online” to bring the node online.

The cloned node will now join the cluster because the /etc/corosync/corosync.config file has been applied to the cloned node via Csync2. The CIB is automatically synchronized among the cluster nodes.