Configuring PowerHA with Global Replication Services (7.5)

Background

IBM Power Virtual Server Global Replication Services (GRS). GRS provides asynchronous volume-level replication between two IBM Power Virtual Server locations. PowerHA fully integrates and automates IASP-based replication.

Before you begin

This scenario assumes that the following tasks have been completed prior to these steps:

  • A cluster between the nodes has been created, and the cluster nodes have a status of Active.

  • The nodes are all in the same device domain. When creating a cluster or adding a node to a cluster with default options, PowerHA automatically adds nodes to a single device domain.

  • An IASP has been created on the production node.

Procedure

Create the Cluster Resource Group

A cluster resource group (CRG) defines the following:

  • A recovery domain is a list of nodes that are potential hosts for the IASP along with the current role the node has (primary or backup).

  • A list of configuration objects, such as IASPs or IP addresses, that are switched between the nodes.

A CRG can be created using any of the following methods:

  • Type the CRTCRG command and press F4 to go to the Create Cluster Resource Group (CRTCRG) command screen.

  • Using the Work with Cluster (WRKCLU) command menu. Select option 9, Work with cluster resource groups, and use option 1, Create, and enter a name for the CRG to go to the Create Cluster Resource Group (CRTCRG) command screen.

  • From the command line, enter the CRTCRG command and your parameters.

For this example, a CRG is created using the following command:

CRTCRG CRG(MYCRG)        CRGTYPE(*DEV)        RCYDMN((PROD *PRIMARY *LAST DAL10)               (DR *BACKUP  *LAST WDC07))        CFGOBJ((MYIASP *DEVD *ONLINE))

This command creates a device CRG called MYIASP. The CRG defines two nodes: the first in a site named DAL10, and the second in a site named WDC07. The CRG has a single IASP device specified that is switched with the CRG called MYIASP. Additional IASPs or configurations can be added after the CRG is created using the Add CRG Device Entry (ADDCRGDEVE) command.

Site Names

In this example, the name of the sites match the site names in IBM Power Virtual Server. However, this is not required. Any name can be used for the site names as long as they are different. PowerHA uses the site names to determine relative location. In this instance, having two different site names indicates to PowerHA that the IASP is replicated between two physical locations.

Automatic Failover

By default, a cluster resource group has automatic failover enabled. When a failure is detected, automatic failover will automatically switch the IASP to a backup node.

Disabling Automatic Failover

Automatic failover can be disabled using the QCST_CRG_CANCEL_FAILOVER PowerHA policy. The following example disables all automatic failover for the CRG named GEOCRG:

ADDHAPCY PCY(QCST_CRG_CANCEL_FAILOVER) PCYDMN(GEOCRG) QUAL('SCOPE(*CRG)') VALUE('EVENT(*ALL)')

For additional information on customizing automatic failover, see the QCST_CRG_CANCEL_FAILOVER policy.

Enhanced Automatic Failover with Cluster Monitor

In environments where automatic failover is desired, it is possible to enhance automatic failover to monitor for additional events via a Hardware Management Console (HMC) using cluster monitors. See Advanced Node Failure Detection for additional information.

Optional CRG Exit Program

CRG Exit programs provide a way to define a program to call whenever a cluster event occurs and enable enhanced automation. See the Cluster Resource Group Exit Program topic in the IBM i Documentation for more information.

Configuring PowerHA Management of GRS

Adding Storage Credentials

PowerHA uses the Power Virtual Server API to manage and control resources in IBM Power Virtual Server.

Creating an API Key

The API key at a minimum must have the following access levels to the Workspace for Power Virtual Server service:

  • power-iaas.cloud-instance.read

  • power-iaas.cloud-instance.modify

PowerHA recommends using Service IDs rather than API keys attached to an IBM cloud user. This ensures that operations are audited as the service ID, not as the user. In addition, it decouples the PowerHA access from being tied to an identity representing a specific person.

  1. In the IBM Cloud console, go to Manage > Access (IAM) and select Service IDs.

  1. If you don’t have a service ID created, create the service ID.

  1. Click the Actions icon > Manage service ID.

  1. Click API keys.

  1. Click create

  1. Add a name and description to easily identify the API key.

  1. Click Create.

  1. Save your API key by copying or downloading it to a secure location.

For security reasons, the API key is only available to be copied or downloaded at the time of creation. If the API key is lost, you must create a new API key.

Add a storage controller configuration description representing the primary Power Virtual Server Workspace

An HA configuration description of type storage controller (*STGCTL) and subtype (*PVS) is used to represent a Power Virtual Server workspace. It contains the authentication credentials (API Key), as well as the information required to identify and control the workspace. With Global Replication Services, there is a Power Virtual Server Workspace in the primary location and a second Power Virtual Server workspace in the backup location.

A PVS Storage Controller configuration description can be created using any of the following methods:

  • Type the ADDHACFGD command and press F4 to go to the Add HA Configuration Description Screen.

  • Using the Work with Cluster (WRKCLU) command menu. Selection option 11, Work with HA Configuration Descriptions, and use option 1, Create.

  • From the command line, enter the ADDHACFGD command and your parameters.

For this example, a configuration description for DAL10 is created using the following command:

ADDHACFGD NAME(PVSWSDAL) TYPE(*STGCTL) SUBTYPE(*PVS) PVSHOST('apikey')

This command specifies to add a storage controller configuration description named PVSWSDAL with the API key ‘apikey’, representing the API key created previously. The PVSHOST parameter has additional elements that by default will prompt to select a workspace from the workspaces the API key has access to in the IBM Cloud infrastructure.

Tip: The name of the configuration description does not need to match the name of the workspace or data center. This name is only known to the PowerHA product.

Add a storage controller configuration description representing the secondary Power Virtual Server Workspace

The HA Configuration description for the backup (target) location is created in the same way as the primary.

Tip: If the API key used for the previous configuration description has access to both workspaces, the same API key can be used for both configuration descriptions.

For example, a configuration description for WDC07 is added using the following command:

ADDHACFGD NAME(PVSWSWDC07) TYPE(*STGCTL) SUBTYPE(*PVS) PVSHOST('apikey')

Configuring Global Replication Services (GRS)

PowerHA requires GRS to be configured outside of PowerHA. This includes performing the following actions:

Actions on the primary site:

  • Ensuring the IASP volumes are all in the same storage pool.

  • Enabling replication for the IASP volumes by setting the volumes to be replication-enabled

  • Creating a new volume group

  • Placing the replication enabled volumes into the volume group

Actions on the target workspace:

  • Onboard the auxiliary volumes by using the IBM Cloud CLI or API.

  • Attach the a auxiliary volumes to the target virtual server

See the IBM Cloud documentation on getting started with GRS for additional information.

Adding Copy Description

A copy description gives PowerHA the information it needs to describe and manage a single copy of an IASP. With GRS, because the IASP is replicated, there are two copies of the IASP. Therefore, PowerHA requires two copy descriptions.

The information required in the copy description describes the location of the copy of the IASP it describes. For example, a copy description for the primary (source) copy can be added using the following command:

ADDPVSCPYD ASPCPY(DAL10CPY) ASPDEV(MYIASP) CRG(MYCRG) SITE(DAL10) NODE(*CRG) PVSCFGD(PVSWSDAL)     

This command adds a copy description named DAL10CPY for asp device MYIASP. I describes this copy of the IASP being represented by the site named DAL10 in the CRG called MYCRG. Specifying a node of *CRG indicates to the copy description that the lowest numbered backup node at the given site of the CRG currently owns the copy. Finally, the Power Virtual Server configuration description parameter gives the copy description the credentials needed to control the Power Virtual Server Workspace previously defined in the configuration description called PVSWSDAL.

A copy description representing the backup (target) copy can be added using the following command:

ADDPVSCPYD ASPCPY(WDC07CPY) ASPDEV(MYIASP) CRG(MYCRG) SITE(WDC07) NODE(*CRG) PVSCFGD(PVSWSWDC)

Adding Volumes to the Copy Descriptions

One of the pieces of information PowerHA needs to manage and control replication is the identifying information about the volumes in storage that represent the IASP, in this case PowerHA uses the IBM Power Virtual Server volume identifiers (Volume IDs). These Volume IDs must be added to the copy descriptions at both the primary and backup sites.

Adding Volumes to the Primary (Source) Copy Description

The Change Power Virtual Server Copy Description (CHGPVSCPYD) command is used to add volumes. For example, the copy description for the primary copy can be added using the following command:

CHGPVSCPYD ASPCPY(DAL10CPY) ACTION(*ADDVOL)

This command specifies to add volumes to the copy description named DAL10CPY. By default, the command uses the value *SELECT for the volumes to add. With the *SELECT option, PowerHA queries the IBM Power Virtual Server workspace for volumes that can be added into the copy description. Alternatively, the volumes may be specified manually via the command line using the VOLID parameter.

Adding Volumes to the Backup (Target) Copy Description

Volumes are added to the target copy description in the same way that they are added to the source copy description, using the CHGPVSCPYD command. In this instance, the volume IDs must be obtained from the target Power Virtual Server workspace in the IBM Cloud.

For example, the copy description for the backup copy can be added using the following command:

CHGPVSCPYD ASPCPY(WDC07CPY) ACTION(*ADDVOL)

Starting a PowerHA Session

A session in PowerHA describes the relationship between copy descriptions, including the type of replication and is used to manage and control replication. A session can be started in this example using the following command:

STRPVSSSN SSN(MYSSN) TYPE(*GLOBALMIR) CRG(MYCRG)

This command specifies to start a session called MYSSN that is of type Global Mirror. PowerHA uses Global Mirror to represent asynchronous replication as is used with Global Replication Services. In addition, the command specifies that this session references the CRG named MYCRG. PowerHA automatically pulls together the CRG information and Copy Description information from the copy descriptions that describe sites in the CRG.

Results

PowerHA management of GRS is now configured between the nodes in the CRG. To verify and monitor the status of replication, use one of the following:

  • The Display PVS Session (DSPPVSSSN) command. For example, DSPPVSSSN SSN(MYSSN).

  • The PowerHA web interface.

  • The SQL Service table function QHASM.SESSION_INFO.

Privacy Policy | Cookie Policy | Impressum
From time to time, this website may contain technical inaccuracies and we do not warrant the accuracy of any posted information.
Copyright © Fortra, LLC and its group of companies. All trademarks and registered trademarks are the property of their respective owners.