Migrating HP Serviceguard for Linux Xen Toolkit
  to Novell SUSE Linux Enterprise High Availability
  Extension Cluster
  ...
Executive Summary
This white paper describes a procedure to migrate an HP Serviceguard for Linux (SGLX) Xen Toolkit to
a S...
agent” (cmappmgr). The “VM agent” is installed on the Xen virtual machine and the
    corresponding “Host agent” is instal...
The SGLX Xen Toolkit
The SGLX Xen Toolkit is a separate set of scripts that allows users to configure a Serviceguard
packa...
•    In the SGLX Xen Toolkit, the parameter XEN_RETRY_INTERVAL and XEN_PROBE_TIMEOUT
         are used to tune the monitor...
PACKAGE            STATUS               STATE                AUTO_RUN       NODE
    xenvm_pkg          up                ...
# cat xenpkg.info | grep XEN
XEN_BIN                    "/usr/sbin/xm"
XEN_VM_PATH                  /mnt/xen/
XEN_VM_NAME ...
SG_FS_UMOUNT_RETRY_COUNT="1"
SG_FS_NAME[0]="/dev/xen_vg/xen_lv"
SG_FS_DIRECTORY[0]="/mnt/xen"
SG_FS_TYPE[0]="ext3"
SG_FS_M...
Migrating Common SGLX Package Parameters to RAs
There are a number of functions that are common to most Serviceguard for L...
The example of the Filesystem RA setup is shown in the CIB Object Listing of the “Setting up the SLE
HA group and resource...
Xen Resource Agent Migration Procedure
This section covers the details that are unique to the Xen Toolkit package in the m...
failover_policy                 configured_node
failback_policy                 manual
priority                        no_...
LVM volume groups

                                                 LVM RA
vg             ________xen_vg________
         ...
1. Setting up the SLE HA cluster, Quorum, and STONITH
    2. Setting up the SLE HA group and resources
    3. Starting and...
primitive rs_xen_fs ocf:heartbeat:Filesystem 
      operations $id="rs_xen_fs-operations" 
      op monitor interval="20" ...
fly1:~ # xm list
Name                             ID  Mem VCPUs               State     Time(s)
Domain-0                  ...
2) openais@lists.linux-foundation.org

      3) linux-ha@lists.linux-ha.org



For More Information
• HP Serviceguard for ...
Terms
CDB
        Cluster Database

IPC
        Inter Process Communication

LVM
        Logical volume management

Modula...
Appendix

Serviceguard package configuration worksheet with Xen Toolkit parameters


           Serviceguard Parameters   ...
Modular Packages – External script file   External resource agent monitor operation
Legacy Packages – Customer defined
com...
© Copyright 2009 Hewlett-Packard Development Company, L.P. The information
contained herein is subject to change without n...
Upcoming SlideShare
Loading in …5
×

Migrating SGLX Xen Toolkit to SLES11 HA

1,420 views
1,339 views

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,420
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
23
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Migrating SGLX Xen Toolkit to SLES11 HA

  1. 1. Migrating HP Serviceguard for Linux Xen Toolkit to Novell SUSE Linux Enterprise High Availability Extension Cluster August 2009 Executive Summary ............................................................................................................................ 2 Introduction ....................................................................................................................................... 2 Audience ...................................................................................................................................... 3 The SGLX Xen Toolkit ......................................................................................................................... 4 Special Features ............................................................................................................................ 4 Gathering Serviceguard parameters ................................................................................................. 5 Gathering cluster parameters ....................................................................................................... 5 Gathering Serviceguard Xen Toolkit parameters ............................................................................. 6 Saving Serviceguard Xen Toolkit parameters ..................................................................................... 8 Migrating Common SGLX Package Parameters to RAs ........................................................................... 9 Volume groups .............................................................................................................................. 9 File systems ................................................................................................................................... 9 IP addresses ................................................................................................................................ 10 Xen Resource Agent Migration Procedure ........................................................................................... 11 Xen Toolkit migration planning ...................................................................................................... 11 Migration phase .......................................................................................................................... 13 Setting up the SLE HA cluster, Quorum, and STONITH .................................................................. 14 Setting up the SLE HA group and resources ................................................................................. 14 Starting and Verifying the SLE HA group ..................................................................................... 15 Application monitoring support on SLE HA .................................................................................. 16 Conclusion .............................................................................................................................. 16 Troubleshooting ........................................................................................................................... 16 For More Information ....................................................................................................................... 17 Terms ............................................................................................................................................. 18 Appendix ....................................................................................................................................... 19 Serviceguard package configuration worksheet with Xen Toolkit parameters ................................... 19 1
  2. 2. Executive Summary This white paper describes a procedure to migrate an HP Serviceguard for Linux (SGLX) Xen Toolkit to a SUSE Linux Enterprise High Availability Extension (SLE HA) cluster from Novell. The white paper “Migrating an HP Serviceguard for Linux cluster to a Novell SUSE Linux Enterprise High Availability Extension Cluster”, available at docs.hp.com -> High Availability -> Serviceguard for Linux, describes the basics of transitioning an SGLX cluster and a user written toolkit. It is assumed that there is an existing SGLX cluster running at least one instance of a Xen Toolkit package. The conversion can be done in 3 steps: gathering information for the conversion process (for both the cluster and the toolkit), completing basic Cluster Migration based on the earlier white paper, and finally, completing the Xen Toolkit migration. A step-by-step process describes how to use the configuration information from a Xen Toolkit package on an existing SGLX cluster to quickly create an SLE HA cluster resource group (a collection of resources) with similar functionality. Introduction SUSE Linux Enterprise High Availability Extension (SLE HA) is an integrated suite of open source clustering technologies that enable enterprises to implement highly available physical and virtual Linux clusters. Used with SUSE Linux Enterprise Server (SLES), it helps organizations maintain business continuity, protect data integrity, and reduce unplanned downtime for their mission-critical Linux workloads. SLE HA provides monitoring, messaging, and cluster resource management functionality. It is optimized to work with SUSE Linux Enterprise Server, and its tight integration ensures customers have secure, up-to-date high availability solution. Based on a flexible policy engine, it supports a wide range of clustering scenarios. Its adherence to open standards and open interfaces enables interoperability with industry-standard tools and technologies, and its support for virtual environments gives enterprises flexibility to create highly available services with highly utilized physical resources. SLE HA is available as an extension to SUSE Linux Enterprise Server 11 (SLES11) from Novell. It includes Pacemaker, a high availability clustering solution with various configuration options. The white paper “Migrating an HP Serviceguard for Linux Cluster to a Novell SUSE Linux Enterprise High Availability Extension Cluster”, henceforth referred to as the Cluster Migration white paper, describes the process for taking an existing SGLX cluster and, using information extracted from that cluster configuration, creating an SLE HA cluster with characteristics that are familiar to an HP Serviceguard for Linux user. That white paper also described the process to take information related to a user- created Serviceguard package and create a similar SLE HA resource group. A toolkit is really a package template for a specific application. This white paper leverages the process described in the Cluster Migration white paper to extract information used by the Xen Toolkit and uses that information to create a series of resources, including a Xen RA resource primitive, to create the SLE HA resource group. This process is described for Modular type of packages created using the Serviceguard Xen Toolkit. The Serviceguard package configuration worksheet, first introduced in the Cluster Migration white paper, is used in this process. A blank copy of the worksheet, with added Xen Toolkit parameters, is included in the Appendix section of this white paper. The SLE HA Xen Resource Agent (RA) is listed in the HA cluster GUI as “ocf: heartbeat: Xen”. The Serviceguard Xen Toolkit has the following features that are not part of the SLE HA Xen RA. • In the SGLX Xen Toolkit, the XEN_VM_APPMON parameter allows the monitoring of applications running on a Virtual Machine. The parameter uses a “VM agent” (cmappserver) and a “Host 2
  3. 3. agent” (cmappmgr). The “VM agent” is installed on the Xen virtual machine and the corresponding “Host agent” is installed on the Xen host. The VM and Host agents are supplied with Serviceguard for Linux rpm packages. • In the SGLX Xen Toolkit, the XEN_RETRY_INTERVAL and XEN_PROBE_TIMEOUT tuning parameters are supplied to set the monitor and probe intervals on the status of a Xen virtual machine. On an SLE HA cluster, these parameters are handled internally by the Xen resource and do not require user intervention. There are a number of other differences between the SGLX Xen Toolkit and the SLE HA Xen RA. These differences are relatively minor and are described in “The SGLX Xen Toolkit” section. SLE HA cluster delivered with SUSE Linux Enterprise Server 11 is used as the basis for this white paper. The information in this white paper is not expected to change significantly for later versions of SLES 11. Audience This document is targeted for users of HP SGLX on SLES10 who wish to migrate to SLE HA Cluster on SUSE Linux Enterprise Server 11. It is assumed that the reader has an understanding of HP SGLX, HP SGLX Xen Toolkit, and SUSE Linux Enterprise Server and has read “Migrating an HP Serviceguard for Linux Cluster to a Novell SUSE Linux Enterprise High Availability Extension Cluster”. Information in that white paper and the SUSE Linux documentation are not necessarily repeated here. For more information on each solution, see http://www.hp.com/go/sglx, http://docs.hp.com -> High Availability and “SUSE Linux Enterprise High Availability Extension Guide”. 3
  4. 4. The SGLX Xen Toolkit The SGLX Xen Toolkit is a separate set of scripts that allows users to configure a Serviceguard package to control and monitor a Xen virtual machine. The toolkit consists of an 'rpm' file which, after installation and configuration, enables a Serviceguard for Linux package to provide high availability for a Xen virtual machine. It works as a subsystem under the SGLX core software to provide functions for starting, stopping, and monitoring the Xen machine in a cluster environment. The sample SGLX Xen Toolkit scripts that are included in this white paper are from the latest release of the Serviceguard Xen Toolkit version A.02.00. The Xen Toolkit is designed as an SGLX modular package. The start and stop scripts reside in the module script directory /opt/cmcluster/conf/scripts/xenhost.sh. The user configurable attributes are declared in the module attribute definition file located in the module directory /opt/cmcluster/conf/modules/xenhost. The Xen virtual machine monitoring script is placed in the SGLX directory /opt/cmcluster/xen/xenhost.mon. Each Xen VM runs as a separate package with its own VM repository and VM configuration files. Special Features The following features are different between the SGLX Xen Toolkit and the RHCS Xen RA. These differences are expected to have little or no impact in most environments. • The SGLX Xen toolkit includes the following parameters: o XEN_BIN – Location of Xen Management binary o XEN_VM_PATH – Location of the Xen VM configuration file o XEN_VM_NAME – Name of the Xen virtual machine o XEN_RETRY_INTERVAL – The time period the Xen Control Script waits to check if the Xen VM has halted completely. The parameter also set the monitoring interval for the Xen monitor. o XEN_PROBE_TIMEOUT – The amount of time that must elapse before the VM probe function attempts a forced shutdown on the VM. o XEN_VM_APPMON – The attribute used to enable and disable application monitoring for applications running on a guest VM. The SLE HA Xen RA takes the following parameters. o Instance Attributes xmfile: Location and name of the Xen configuration file (for example: /mnt/xen/vm_rh5_ha_sles11). This parameter maps to XEN_VM_PATH and XEN_VM_NAME combined. o Operation Attributes Type: monitor • start-delay: 120 (default value) • interval: 10 (default) : This maps to XEN_RETRY_INTERVAL from SGLX Xen Toolkit • timeout: 30 (default) : This maps to XEN_PROBE_TIMEOUT from the SGLX Xen Toolkit o Meta Attributes Target-role: default (started) The initial state of the VM 4
  5. 5. • In the SGLX Xen Toolkit, the parameter XEN_RETRY_INTERVAL and XEN_PROBE_TIMEOUT are used to tune the monitoring and probe interval. The SLE HA uses the default or user specified values from the operation attributes in the configuration file. • The SGLX Xen Toolkit validates the Xen configuration during “cmapplyconf”. The command checks for the existence of the Xen Management Binary and the Xen Platform. The SLE HA Xen Resource checks for the existence of the Xen platform internally. An option to create a Xen RA is provided only when a Xen Host is present. Before migrating to the SLE HA cluster, it is recommended to backup the most recent copy of the application data. This is to protect against data loss in the event of an operator error during the migration. Use any SLES supported backup software to backup the data. Gathering Serviceguard parameters The Serviceguard cluster parameters need to be saved. They are translated to the equivalent SLE HA parameters so that the environments can have similar functionality. The most important step in the migration is saving the Serviceguard parameters in the Package migration template. Part of this process must be completed while the SGLX cluster is still available. The cluster does not need to be up during this part of the process but certain cluster commands do need to be able to run. Gathering cluster parameters The first step is to gather the cluster information, including the names of the packages that are configured in the cluster. Run the following command, on any one of the Serviceguard cluster nodes, to collect this information. #cmviewcl –v > cluster.info Following is an example output of this command, where a Xen Toolkit package is configured. The package “xenvm_pkg” is a Xen Toolkit package. # cmviewcl -v CLUSTER STATUS xen_cluster up NODE STATUS STATE fly1 up running Quorum_Server_Status: NAME STATUS STATE ADDRESS linuxlp64.cup.hp.com up running 16.89.115.35 Network_Parameters: INTERFACE STATUS NAME PRIMARY up eth0 NODE STATUS STATE fly2 up running Quorum_Server_Status: NAME STATUS STATE ADDRESS linuxlp64.cup.hp.com up running 16.89.115.35 Network_Parameters: INTERFACE STATUS NAME PRIMARY up eth0 5
  6. 6. PACKAGE STATUS STATE AUTO_RUN NODE xenvm_pkg up running disabled fly2 Policy_Parameters: POLICY_NAME CONFIGURED_VALUE Failover configured_node Failback manual Script_Parameters: ITEM STATUS MAX_RESTARTS RESTARTS NAME Service up 0 0 cmxenvmd_srv Node_Switching_Parameters: NODE_TYPE STATUS SWITCHING NAME Primary up enabled fly1 Alternate up enabled fly2 (current) Other_Attributes: ATTRIBUTE_NAME ATTRIBUTE_VALUE Style modular Priority no_priority The command "xm list" shows that the virtual machine "vm_rh5_ha_sles11" is running on node2 (fly4). fly1:~ # xm list Name ID Mem VCPUs State Time(s) Domain-0 0 3007 4 r----- 3449.1 vm_rh5_ha_sles11 1 1024 4 -b---- 0.6 Gathering Serviceguard Xen Toolkit parameters The next step is gathering the SGLX Xen Toolkit parameters. The SGLX Xen Toolkit is distributed as a Modular package. Hence, all references to a package refer to Modular packages. The toolkit configuration information can be obtained using one of the following methods: Package configuration file Executing the cmgetpkgenv <pkgname> command Package configuration file In the SGLX Xen Toolkit Modular package, the package configuration file also has the Xen Toolkit parameters. To get the current package configuration file, run the following command: # cmgetconf -p <pkg_name> > xenpkg.info For this example: # cmgetconf -p xenvm_pkg > xenpkg.info Following is an example output. Only sections that have Xen Toolkit parameters are included here for ease of reading. Other sections in the Xen Toolkit Modular package configuration file, that have the common SGLX parameters, are not included in this example. The common SGLX parameters are described in the Cluster Migration white paper. 6
  7. 7. # cat xenpkg.info | grep XEN XEN_BIN "/usr/sbin/xm" XEN_VM_PATH /mnt/xen/ XEN_VM_NAME "vm_rh5_ha_sles11" XEN_RETRY_INTERVAL 10 XEN_PROBE_TIMEOUT 20 XEN_VM_APPMON "NO" Executing the cmgetpkgenv <pkgname> command In the SGLX Xen Toolkit Modular package, all parameters are stored in the Cluster Database (CDB). Run the following command to view this information: # cmgetpkgenv <pkg_name> > xenpkg.info For this example: # cmgetpkgenv xenvm_pkg > xenpkg.info Following is an example output with a Xen Toolkit package configured. The package “xenvm_pkg” is a Xen Toolkit package. SG_MODULE_VERSION[10]="1" SG_MODULE_NAME[11]="sg/pev" SG_MODULE_VERSION[11]="1" SG_MODULE_NAME[12]="sg/external_pre" SG_MODULE_VERSION[12]="1" SG_MODULE_NAME[13]="sg/external" SG_MODULE_VERSION[13]="1" SG_MODULE_NAME[14]="sg/acp" SG_MODULE_VERSION[14]="1" SG_MODULE_NAME[15]="sg/pr_cntl" SG_MODULE_VERSION[15]="2" SG_MODULE_NAME[16]="xen/xenhost" SG_MODULE_VERSION[16]="1" SG_PACKAGE_TYPE="failover" SG_NODE_NAME[0]="*" SG_AUTO_RUN="yes" SG_NODE_FAIL_FAST_ENABLED="no" SG_RUN_SCRIPT_TIMEOUT="no_timeout" SG_HALT_SCRIPT_TIMEOUT="no_timeout" SG_SUCCESSOR_HALT_TIMEOUT="no_timeout" SG_SCRIPT_LOG_FILE="/opt/cmcluster/run/log/xenvm_pkg.log" SG_OPERATION_SEQUENCE[0]="$SGCONF/scripts/sg/pr_cntl.sh" SG_OPERATION_SEQUENCE[1]="$SGCONF/scripts/sg/external_pre.sh" SG_OPERATION_SEQUENCE[2]="$SGCONF/scripts/sg/volume_group.sh" SG_OPERATION_SEQUENCE[3]="$SGCONF/scripts/sg/filesystem.sh" SG_OPERATION_SEQUENCE[4]="$SGCONF/scripts/sg/package_ip.sh" SG_OPERATION_SEQUENCE[5]="$SGCONF/scripts/sg/external.sh" SG_OPERATION_SEQUENCE[6]="$SGCONF/scripts/sg/service.sh" SG_OPERATION_SEQUENCE[7]="$SGCONF/scripts/xen/xenhost.sh" SG_FAILOVER_POLICY="configured_node" SG_FAILBACK_POLICY="manual" SG_PRIORITY="no_priority" SG_SERVICE_NAME[0]="cmxenvmd_srv" SG_SERVICE_CMD[0]="/opt/cmcluster/xen/xenhost.mon" SG_SERVICE_RESTART[0]="none" SG_SERVICE_FAIL_FAST_ENABLED[0]="no" SG_SERVICE_HALT_TIMEOUT[0]="300" SG_VGCHANGE_CMD="vgchange -a y" SG_VG[0]="xen_vg" SG_CONCURRENT_FSCK_OPERATIONS="1" SG_CONCURRENT_MOUNT_AND_UMOUNT_OPERATIONS="1" SG_FS_MOUNT_RETRY_COUNT="0" 7
  8. 8. SG_FS_UMOUNT_RETRY_COUNT="1" SG_FS_NAME[0]="/dev/xen_vg/xen_lv" SG_FS_DIRECTORY[0]="/mnt/xen" SG_FS_TYPE[0]="ext3" SG_FS_MOUNT_OPT[0]="-o rw" SG_FS_UMOUNT_OPT[0]="" SG_FS_FSCK_OPT[0]="" SG_XEN_BIN="/usr/sbin/xm" SG_XEN_VM_PATH="/mnt/xen/" SG_XEN_VM_NAME="vm_rh5_ha_sles11" SG_XEN_RETRY_INTERVAL="10" SG_XEN_PROBE_TIMEOUT="20" SG_XEN_VM_APPMON="NO" PKG_PR_MODE="pr_enabled" Saving Serviceguard Xen Toolkit parameters The Serviceguard parameters, such as IP addresses, Volume Groups, or File Systems are common to most toolkits. These parameters are saved in the Serviceguard package configuration worksheet and are described in the next section. The Xen attributes in the Serviceguard package configuration file are sufficient, to configure an SGLX Xen VM toolkit. # cat xenpkg.info | grep XEN XEN_BIN "/usr/sbin/xm" XEN_VM_PATH /mnt/xen/ XEN_VM_NAME "vm_rh5_ha_sles11" XEN_RETRY_INTERVAL 10 XEN_PROBE_TIMEOUT 20 XEN_VM_APPMON "NO" 8
  9. 9. Migrating Common SGLX Package Parameters to RAs There are a number of functions that are common to most Serviceguard for Linux packages. These include the Volume groups and file systems. In an SLE HA cluster, these functions are managed by a number of resource agents. Volume groups The vg parameter in the package configuration file specifies an LVM volume group on which a file system needs to be mounted. Multiple vgs can be defined for a package. Similarly in the SLE HA cluster, an LVM resource can be configured for each volume group used by the application. Create a separate LVM resource for every volume group entry in the package configuration. The example of the LVM RA setup is shown in the XML in the “Setting up the SLE HA group and resources” section. File systems At start time, a Serviceguard package activates one or more logical volumes (associated with the file systems) and then mounts the file systems. At halt time, the package un-mounts the file systems. In Serviceguard, the fs_name parameter, in conjunction with fs_directory, fs_type, fs_mount_opt, fs_umount_opt, and fs_fsck_opt parameters, specifies a file system that is to be mounted by the package. The fs_name specifies the block device file for a logical volume and the parameter fs_directory is the root of the file system specified by fs_name. In case of Modular packages, the file system information is specified as follows in the package configuration file. fs_name /dev/xen_vg/xen_lv fs_directory /mnt/xen fs_type "ext3" fs_mount_opt "-o rw" fs_umount_opt "" fs_fsck_opt "" In SLE HA, the SGLX parameters translate to the device, directory, fstype and options parameter of the File system resource agent as shown in the following table. Comparison of Filesystem Attributes for SGLX and SLE HA: SGLX Description SLE HA Modular fs_name Logical volume device fs_directory Mount point directory directory fs_type File system type (e.g. ext3) fstype fs_mount_opt Option used for mounting options fs_umount_opt Options used for unmounting N/A Create a separate SLE HA Filesystem resource for every file system entry in the package configuration. For every fs_name entry in the Serviceguard package a corresponding SLE HA Filesystem resource needs to be created. Ensure that resources are defined in the resource group in the order in which the fs_name parameters are defined in the Serviceguard package configuration file. 9
  10. 10. The example of the Filesystem RA setup is shown in the CIB Object Listing of the “Setting up the SLE HA group and resources” section. IP addresses A Xen virtual machine package does not use a relocatable IP address on the host. The IP address used by the guest OS internally is under the management of the guest OS and is not controlled by package control scripts. 10
  11. 11. Xen Resource Agent Migration Procedure This section covers the details that are unique to the Xen Toolkit package in the migration process. A step-by-step procedure is described for a Xen Toolkit package. Xen Toolkit migration planning In this step, the required SLE HA resources are determined. The Serviceguard Package migration worksheet is filled with values from the Serviceguard Cluster configuration files. Following are the package configuration parameters of the Xen Toolkit Modular package: package_name xenvm_pkg package_description "Serviceguard Package" module_name sg/basic module_version 1 module_name sg/all module_version 2 module_name sg/failover module_version 1 module_name sg/priority module_version 1 module_name sg/dependency module_version 1 module_name sg/weight module_version 1 module_name sg/monitor_subnet module_version 1 module_name sg/package_ip module_version 1 module_name sg/service module_version 1 module_name sg/volume_group module_version 1 module_name sg/filesystem module_version 1 module_name sg/pev module_version 1 module_name sg/external_pre module_version 1 module_name sg/external module_version 1 module_name sg/acp module_version 1 module_name sg/pr_cntl module_version 2 module_name xen/xenhost module_version 1 package_type failover node_name * auto_run yes node_fail_fast_enabled no run_script_timeout no_timeout halt_script_timeout no_timeout successor_halt_timeout no_timeout script_log_file $SGRUN/log/$SG_PACKAGE.log operation_sequence $SGCONF/scripts/sg/pr_cntl.sh operation_sequence $SGCONF/scripts/sg/external_pre.sh operation_sequence $SGCONF/scripts/sg/volume_group.sh operation_sequence $SGCONF/scripts/sg/filesystem.sh operation_sequence $SGCONF/scripts/sg/package_ip.sh operation_sequence $SGCONF/scripts/sg/external.sh operation_sequence $SGCONF/scripts/sg/service.sh operation_sequence $SGCONF/scripts/xen/xenhost.sh 11
  12. 12. failover_policy configured_node failback_policy manual priority no_priority service_name cmxenvmd_srv service_cmd /opt/cmcluster/xen/xenhost.mon service_restart none service_fail_fast_enabled no service_halt_timeout 300 vgchange_cmd "vgchange -a y" vg xen_vg concurrent_fsck_operations 1 concurrent_mount_and_umount_operations 1 fs_mount_retry_count 0 fs_umount_retry_count 1 fs_name "/dev/xen_vg/xen_lv" fs_directory "/mnt/xen" fs_type ext3 fs_mount_opt "-o rw" fs_umount_opt "" fs_fsck_opt "" xen/xenhost/XEN_BIN "/usr/sbin/xm" xen/xenhost/XEN_VM_PATH "/mnt/xen/" xen/xenhost/XEN_VM_NAME "vm_rh5_ha_sles11" xen/xenhost/XEN_RETRY_INTERVAL 10 xen/xenhost/XEN_PROBE_TIMEOUT 20 xen/xenhost/XEN_VM_APPMON "NO" The table below illustrates how this information is used to populate the Serviceguard package configuration worksheet. SGLX Parameters SLE HA parameters SGLX Package Group Resource Agent configuration package_name ___xenvm_pkg_______ Group RA name ____vmsvc_sles11___ package_type __FAILOVER_______ Group resource agent Logical Volumes and File Systems Filesystem RA fs_name __/dev/xen_vg/xen_lv__ device _____/dev/xen_vg/xen_lv____ fs_directory __/mnt/xen_ directory ____/mnt/xen______ fs_type ________ext3_______ fstype ___________ext3__________ fs_mount_opt _______-o rw________ options _________rw____________ IP Address IP address RA ip_address ____Not Used_________ ip _______Not Used________ 12
  13. 13. LVM volume groups LVM RA vg ________xen_vg________ volgrpname ______xen_vg___________ Service configuration service_name _____cmxenvmd_srv_______ External Resource Agent configuration service_cmd External RA name __________ __/opt/cmcluster/xen/xenhost.mon______ User defined variables External resource agent monitor operation External script file External RA Modular Packages – External script file Legacy Packages – Customer defined Set in the external resource agent commands External RA Xen Toolkit variables External resource agent start, stop and validate XEN_BIN "/usr/sbin/xm" operations XEN_VM_PATH “/mnt/xen/” XEN_VM_NAME "vm_rh5_ha_sles11" XEN_RETRY_INTERVAL 10 Xen RA XEN_PROBE_TIMEOUT 20 XEN_VM_APPMON "NO" Instance Attributes • xmfile: Location and name of the Xen configuration file (for example: “/mnt/xen/vm_rh5_ha_sles11”). Operation Attributes Type: monitor start-delay: 120 (default value) interval = 10 (default) timeout = 30 (default) Meta Attributes Target-role: started Migration phase During this phase, the SLE HA cluster is configured and the SLE HA cluster Xen resource, along with other resources, is setup using the Package configuration worksheet. The actual migration is done in the following steps: 13
  14. 14. 1. Setting up the SLE HA cluster, Quorum, and STONITH 2. Setting up the SLE HA group and resources 3. Starting and verifying the SLE HA group Setting up the SLE HA cluster, Quorum, and STONITH See the Cluster Migration white paper and complete the following steps. 1. Installing and Configuring the SLE HA Cluster 2. Configuring Channel Bonding 3. Setting Token timeout 4. Configuring the NO-Quorum policy 5. Configuring STONITH 6. Enabling IPv6 (Optional) 7. Cluster across Subnet configuration (Optional) Setting up the SLE HA group and resources The next step in the migration is setting up the SLE HA resources. This is done in the following steps: 1. Setting up the SLE HA group 2. Setting up the SLE HA sfex resource 3. Setting up the SLE HA LVM resource 4. Setting up the SLE HA Filesystem resource 5. Setting up the SLE HA Xen resource Note: The monitoring interval of the SLE HA Xen resource by default is 10 seconds. The SGLX XEN_RETRY_INTERVAL is also 10 seconds. For information on the resource configuration details, see the package configuration worksheet prepared during the planning phase. For information on creating the resource groups, see the Cluster Migration white paper. After the configuration of the resources for the SLE HA group vmsvc_sles11, run the following command on any one of the SLE HA cluster nodes to list the CIB objects in the CRM cluster configuration. #crm configure show Following is an example output of this command where an SLE HA group is configured with sfex, LVM, Filesystem and Xen resources. # crm configure show node fly1 attributes standby="false" node fly2 attributes standby="false" primitive vmsvc_sfex ocf:heartbeat:sfex operations $id="vmsvc_sfex-operations" op monitor interval="10" timeout="10" params device="/dev/sdi" meta target-role="started" primitive rs_xen_lvm ocf:heartbeat:LVM operations $id="rs_xen_lvm-operations" op monitor interval="10" timeout="30" start-delay="10" params volgrpname="xen_vg" meta target-role="started" 14
  15. 15. primitive rs_xen_fs ocf:heartbeat:Filesystem operations $id="rs_xen_fs-operations" op monitor interval="20" timeout="40" start-delay="10" params device="/dev/xen_vg/xen_lv" directory="/mnt/xen" fstype="ext3" options="rw" meta target-role="started" primitive rs_xen_vm ocf:heartbeat:Xen operations $id="rs_xen_vm-operations" op monitor interval="10" timeout="30" start-delay="120" params xmfile="/mnt/xen/vm_rh5_ha_sles11" meta target-role="started" primitive StonithClone stonith:external/sbd operations $id="StonithClone-operations" op monitor interval="15" timeout="15" start-delay="15" params sbd_device="/dev/sdj" meta target-role="started" group vmsvc_sles11 vmsvc_sfex rs_xen_lvm rs_xen_fs rs_xen_vm meta target-role="started" clone StonithSet StonithClone meta target-role="Started" location cli-prefer-vmsvc_sles11 vmsvc_sles11 rule $id="cli-prefer-rule-vmsvc_sles11" inf: #uname eq fly1 property $id="cib-bootstrap-options" dc-version="1.0.3-0080ec086ae9c20ad5c4c3562000c0ad68374f0a" expected-quorum-votes="2" last-lrm-refresh="1245069235" Starting and Verifying the SLE HA group If target_role (Meta attribute) of the group RA is set to started, then Pacemaker will automatically start the group RA. If the target_role is not set to started, then it should be explicitly started. Use the crm_mon command or the GUI to verify the SLE HA cluster status. All nodes should be up and running. Following is an example output of the crm_mon command: ============ Last updated: Tue Jun 16 00:09:42 2009 Current DC: fly1 - partition with quorum Version: 1.0.3-0080ec086ae9c20ad5c4c3562000c0ad68374f0a 2 Nodes configured, 2 expected votes 2 Resources configured. ============ Online: [ fly1 fly2 ] Resource Group: vmsvc_sles11 vmsvc_sfex (ocf::heartbeat:sfex): Started fly1 rs_xen_lvm (ocf::heartbeat:LVM): Started fly1 rs_xen_fs (ocf::heartbeat:Filesystem): Started fly1 rs_xen_vm (ocf::heartbeat:Xen): Started fly1 Clone Set: StonithSet Started: [ fly2 fly1 ] 15
  16. 16. fly1:~ # xm list Name ID Mem VCPUs State Time(s) Domain-0 0 3007 4 r----- 4532.7 vm_rh5_ha_sles11 1 1024 4 -b---- 139.4 After migration, the crm_mon output shows services running on fly2. ============ Last updated: Tue Jun 16 03:24:10 2009 Current DC: fly2 - partition with quorum Version: 1.0.3-0080ec086ae9c20ad5c4c3562000c0ad68374f0a 2 Nodes configured, 2 expected votes 2 Resources configured. ============ Online: [ fly1 fly2 ] Resource Group: vmsvc_sles11 vmsvc_sfex (ocf::heartbeat:sfex): Started fly2 rs_xen_lvm (ocf::heartbeat:LVM): Started fly2 rs_xen_fs (ocf::heartbeat:Filesystem): Started fly2 rs_xen_vm (ocf::heartbeat:Xen): Started fly2 Clone Set: StonithSet Started: [ fly2 fly1 ] Application monitoring support on SLE HA SGLX Xen Toolkit ensures high availability to the packaged virtual machines. However, the applications running on a Xen VM are not highly available. An application executing on a VM may fail and the VM guest OS continues to run, oblivious to the application state. The Xen Toolkit handles this situation by using Application Monitoring to monitor guests running on a VM guest. The package configuration files parameter XEN_VM_APPMON controls the application monitoring behavior and is used in conjunction with “cmappserver” and “cmappmgr” application monitoring infrastructure provided by Serviceguard. The Application Monitoring feature has not direct support in SLE-HA. Conclusion This completes the migration of SGLX Xen Toolkit to SLE HA. The VM configuration can also be done through the “crm_gui” GUI interface. This allows for a single point visual management of LVMs, FS, and VM configuration. Troubleshooting • Your subscription to Novell SUSE Linux Enterprise Server includes support from either HP or Novell (based on where you purchased the subscription). • See the troubleshooting section in “SUSE Linux Enterprise High Availability Extension Guide” available at the following location http://www.novell.com/documentation/sle_ha/index.html • The Pacemaker FAQ is at the following location: http://www.clusterlabs.org/wiki/FAQ • Troubleshooting tips can be got from the following groups. 1) pacemaker@oss.clusterlabs.org 16
  17. 17. 2) openais@lists.linux-foundation.org 3) linux-ha@lists.linux-ha.org For More Information • HP Serviceguard for Linux product documentation at http://docs.hp.com • Designing High-Availability for Xen Virtual Machines with HP Serviceguard for Linux http://docs.hp.com/en/5992-6601/5992-6601.pdf • HP Serviceguard for Linux certification matrix showing servers, storage, and software versions supported at: http://www.hp.com/info/sglx • SUSE Linux Enterprise High Availability Extension at: http://www.novell.com/products/highavailability • SUSE Linux Enterprise Server at: http://www.novell.com/products/server • SUSE Linux Enterprise at: http://www.novell.com/linux • Pacemaker cluster documentation at: http://clusterlabs.org/wiki/Documentation • Documentation on OpenAIS at: http://www.openais.org/doku.php?id=support 17
  18. 18. Terms CDB Cluster Database IPC Inter Process Communication LVM Logical volume management Modular package Single package configuration file, introduced in HP Serviceguard A.11.18. The package configuration information is included in only the package configuration (ASCII) file, whereas in pre-11.18 packages configuration information is in both the package ASCII file and the package control script. RA Resource Agent SGLX HP Serviceguard on Linux SID System Identifier SLE HA Cluster SUSE Linux Enterprise High Availability Extension Cluster SLES SUSE Linux Enterprise Server XML The Extensible Markup Language is a general-purpose specification for creating custom markup languages. 18
  19. 19. Appendix Serviceguard package configuration worksheet with Xen Toolkit parameters Serviceguard Parameters SLE HA parameters SGLX Package Group Resource Agent configuration package_name __________ Group RA name ____________ package_type _________ Group resource agent Logical Volumes and File Systems Filesystem RA fs_name _______________ fs_directory _______________ device ____________________ fs_type _______________ directory ____________________ fs_mount_opt _______________ fstype _____________________ IP Address options _____________________ ip_address _____________ IP address RA LVM volume groups vg ___________________ ip ____________________ Service configuration service_name __________________ LVM RA service_cmd __________________ volgrpname _________________ User defined variables External Resource Agent configuration External RA name __________ External script file 19
  20. 20. Modular Packages – External script file External resource agent monitor operation Legacy Packages – Customer defined commands External RA Xen Toolkit variables Set in the external resource agent XEN_BIN _________________ XEN_VM_PATH _________________ External RA XEN_VM_NAME _____________ XEN_RETRY_INTERVAL _____________ External resource agent start, stop and validate XEN_PROBE_TIMEOUT _____________ operations XEN_VM_APPMON ____________ Xen RA Instance Attributes " xmfile: ____________ Operation Attributes Type: monitor start-delay: 120 (default value) interval = 10 (default) timeout = 30 (default) Meta Attributes Target-role: __________ 20
  21. 21. © Copyright 2009 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein. Linux is a U.S. registered trademark of Linus Torvalds. Microsoft and Windows are U.S. registered trademarks of Microsoft Corporation. UNIX is a registered trademark of The Open Group. 5992-5076, August 2009 21

×