Automatic discovery and HyperSwap configuration tool for IBM Power HA SystemMirror for AIX

The IBM® HyperSwap® feature in IBM PowerHA® SystemMirror® provides continuous storage availability in a multisite PowerHA cluster. It gives the advantage of planned and unplanned maintenance and migration of storage. To achieve HyperSwap configuration across sites, administrators need to configure Peer-to-Peer Remote Copy (PPRC) Metro Mirror between pairs and need to enable the HyperSwap feature for each of the disks. This involves collecting the logical unit number (LUN) and logical subsystem (LSS) information of the shared disks from the cluster nodes, and this is a time-consuming process. This article describes the scripts that can perform the HyperSwap configuration automatically.

Share:

Venkateshwar Rao Yerravalli (vyerrava@in.ibm.com), System Software Engineer, IBM

Image of VenkateshwarVenkateshwar Rao has a Master's degree in Electrical Power Engineering from JNTU CEH, Kukatpally. He has 6 years of experience in UNIX development, working on high avaliability (HA) clusters and disaster recovery for the past 4 years. He enjoys playing badminton and watching movies. You can reach him at vyerrava@in.ibm.com.



11 April 2014

Introduction

The auto discover scripts work as a tool for discovering LSS and LUN information and automaps the LUNs from the primary storage to the secondary storage. It automatically creates the PPRC Metro Mirror between the primary storage and the secondary storage disks and enables the disks to HyperSwap.

Prerequisites

Steps to perform before using the tool:

  • The .rhosts file should be edited and remote shell (rsh) communication should be enabled between the cluster nodes.
  • Make sure that proper zoning information is available for storage disk allocation.
  • DSCLI software must be installed on all logical partitions (LPARs). Tool assumes the default installation path for DSCLI software (/opt/ibm/dscli/)

Input for script

Configuration parameters:

  • Node details (cluster site and node details)
  • Storage details including: storage Hardware Management Console (HMC) details and storage worldwide node name (WWNN)
  • PPRC port details used for PPRC path for replication

IBM Power HA SystemMirror for AIX Enterprise Edition

The IBM PowerHA SystemMirror for AIX Enterprise Edition has two types of deployments.

  • Stretched cluster (extended cluster for short distances)
  • Linked cluster

HyperSwap supports both types of cluster deployments. HyperSwap is supported on IBM System Storage DS8800 system and above. It is recommended that the two DS8000 systems – one in each site, be similar if not concurrent with respect to rpm or type and capacity, at least for the disks that will be swapped. This eases the configuration of the LUNs carved for HyperSwap and also minimizes human error.

Unplanned HyperSwap

Unplanned storage failures, Fibre Channel (FC) failures, LUN failures, and switch failures can result in I/O movement from the primary storage to the secondary storage within seconds time.

Planned HyperSwap

Planned migration and maintenance activity on storage can be done without any down time by initiating a swap from the primary storage to the secondary storage. This results in I/O moving from the primary storage to the secondary storage within seconds time.

Figure 1. HyperSwap setup diagram

HyperSwap autoconfiguration subroutines

Download the .zip file and extract the contents to any local directory. It contains the following two files.

hyperswap_config.pm is a package module which has the following subroutines that helps in configuring HyperSwap.

  • sub Discover_Hyperswap()
  • sub Configure_pprc()
  • sub Migrate_disk()
  • sub Cleanup_PPRC()

hyperswap.pl is a sample perl script that uses the above subroutines for configuring HyperSwap.

sub Discover_Hyperswap()

Syntax:

hyp::Discover_Hyperswap(<primstor>,<secstor>,<nodes>,<siteAnods>,<siteBnods>,
 <input file>,[PortA],[PortB])

Description:

This function generates the LUN and LSS information in the environment. This script automatically maps all the LUNs and LSS from the primary storage to the secondary storage and the information will be recorded in text file as specified in the arguments.

Input:

<primstor>: This is required argument. We need to give the 
primary storage WWNN as input
<secstor>: This is required argument. We need to give the 
secondary storage WWNN as input
<nodes>: This is required argument. We need to supply the 
comma separated nodes list in the cluster
<siteAnodes>: This is required argument. We need to supply 
the comma separated nodes list in the siteA of that cluster
<siteBnodes>: This is required argument. We need to supply 
the comma separated nodes list in the siteB of that cluster
<input file>: Give the name of the file which records the 
discovered information.
[protA]: Port from the primary storage used for the PPRC 
path creation
[portB]: Port from the secondary storage used for the PPRC 
path creation.

Example:

$primarystor="IBM.2107-75APK61";
$secondarystor="IBM.2107-75AKB31";
$stordet="IBM.2107-75APK61,9.122.227.146,fvtadmin,passw3rd:IBM.2107-
75AKB31,9.122.227.147,fvtadmin,passw3rd";
$nodes="powerha59,powerha60,powerha61,powerha62";
$siteA_nodes="powerha59,powerha60";
$siteB_nodes="powerha61,powerha62";
$file=hypswppprc;

hyp::Discover_Hyperswap($primarystor,$secondarystor,$nodes,$siteA_nodes,
$siteB_nodes,$file,I0130,I0131)

sub Configure_pprc()

Syntax:

hyp::Configure_pprc(<stordet>,<file>)

Description:

This function creates the PPRC paths and pairs automatically.

Input:

<stordet>: Comma separated storage details of all the storages.
<file>: Input file which has the discovered and lun mapping details.

Example:

$stordet="IBM.2107-75APK61,9.122.227.146,fvtadmin,passw3rd:IBM.2107-
75AKB31,9.122.227.147,fvtadmin,passw3rd";
$file=hypswppprc;
hyp::Configure_pprc($stordet,$file)

sub Migrate_disk()

Syntax:

hyp::Migrate_disk(<nodes>,<stordet>)

Description:

This function configures the HyperSwap properties for all the disks in the cluster.

Input:

<nodes> : We need to supply the comma separated nodes list 
in the cluster
<stordet> : We need to supply all storages information 
separated by comma and storage to storage separated by ":"

Example:

$stordet="IBM.2107-75APK61,9.122.227.146,fvtadmin,passw3rd:IBM.2107-
75AKB31,9.122.227.147,fvtadmin,passw3rd";
$nodes="powerha59,powerha60,powerha61,powerha62";
hyp::Migrate_disk($nodes,$stordet)

sub List_PPRC()

Syntax:

hyp::List_PPRC($nodes,$stordet)

Description:

This function is used to list the PPRC pairs that are created and to check the mirroring state of the disks.

Input:

<nodes> : We need to supply the comma separated nodes list 
in the cluster
<stordet> :We need to supply all storages information 
separated by comma and storage to storage separated by ":"

Example:

$nodes="powerha59,powerha60,powerha61,powerha62";
$stordet="IBM.2107-75APK61,9.122.227.146,fvtadmin,passw3rd:IBM.2107-
75AKB31,9.122.227.147,fvtadmin,passw3rd";
hyp::List_PPRC($nodes,$stordet)

sub Cleanup_PPRC()

Syntax:

hyp::Cleanup_PPRC (<nodes>,<stordet>)

Description:

This function is used to clean up the PPRC pairs and paths that are previously created.

Input:

<nodes> : We need to supply the comma separated nodes list 
in the cluster
<stordet> :We need to supply all storages information 
separated by comma and storage to storage separated by ":"

Example:

$nodes="powerha59,powerha60,powerha61,powerha62";
$stordet="IBM.2107-75APK61,9.122.227.146,fvtadmin,passw3rd:IBM.2107-
75AKB31,9.122.227.147,fvtadmin,passw3rd";
hyp::Cleanup_PPRC($nodes,$stordet)

How to use the scripts for auto discovery and configuration

Step 1

Use the discover sub function to discover and auto map all the LUNs and LSS.

./hyperswap.pl -discover

Check the auto LUN map in the file generated by the discover script. Adjust the file if you want to have some specific requirements accordingly in the file.

Step 2

Use the configure sub function to create PPRC paths and PPRC pairs.

./hyperswap.pl -configure

After creating the PPRC pairs, use the list_PPRC function to check the state of the mirrored disks. Proceed to the next step after all the configured disks are in the FULL DUPLEX mode.

./hyperswap.pl -list

Step 3

Use the migrate_disk sub function to change the attribute of all the PPRC disks to HyperSwap enabled.

./hyperswap.pl -migrate
Figure 2. Step-by-step process overview

Summary

This tool can reduce the tedious activity of mapping the LUNs, creation of PPRC paths and pairs, and enabling the HyperSwap properties for all the disks in the entire cluster. User just need to have the basic knowledge of AIX and PowerHA for using this tool. With this script, they can easily configure HyperSwap in the cluster without an in-depth knowledge of dscli commands and its syntax.


Resources


Downloads

DescriptionNameSize
Code samplehyperswap.pl3 KB
Code samplehyperswap_config.pm28 KB

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into AIX and Unix on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=AIX and UNIX
ArticleID=967836
ArticleTitle=Automatic discovery and HyperSwap configuration tool for IBM Power HA SystemMirror for AIX
publish-date=04112014