IBM Copy Services Manager deployment considerations
In this chapter, we provide considerations for deploying IBM Copy Services Manager within your environment.
We briefly describe supported platforms for CSM server deployment and considerations for CSM server replication options for deploying CSM in a disaster recovery environment, security considerations for typical deployments, and some considerations for using the CSM command-line interface (csmcli).
The following topics are described in this chapter:
 – High availability considerations
 – Security and users
2.1 Planning considerations
IBM Copy Services Manager can be deployed on a range of platforms:
IBM z/OS
Linux for IBM z® Systems
Linux on x86_64 bit
Microsoft Windows Server
IBM AIX
Linux on IBM Power Systems (Big Endian - ppc64)
See the following link for detailed requirements (including virtualized environment).
For installation steps, see the IBM Copy Services Manager documentation IBM Copy Services Manager Documentation.
2.1.1 High availability considerations
IBM Copy Services Manager has built-in functionality for business continuity of the CSM management environment. The CSM server data can be replicated from the Active CSM server to a Standby CSM server (see Figure 2-1). Default communications port for CSM data replication is TCP:9561. The port can be changed in the CSM server configuration file for replication, named rmserver.properties.1
Figure 2-1 CSM Server replication
Failover and failback
Although there is no automated failover from the Active to the Standby server, nor automated failback (after a failover and initial CSM server recovery). These procedures are straight forward.
 
Important: When a CSM Server is defined as Standby, its configuration is overwritten completely. If you have an active configuration you want to use later, you need to save this configuration before defining the server as Standby. You can save the server from either GUI or csmcli (mkbackup command in csmcli).
Note: Both Active and Standby CSM servers must be at the same CSM software level.
In case the primary (Active) CSM Server is not available, manual intervention is required to “promote” the Standby CSM server to Active (failover) and continue the storage replication management. Upon primary CSM server recovery, the administrator must decide which configuration to use for further operations, and take appropriate actions.
Disaster recovery and HyperSwap considerations
More security configuration is required if the managing CSM server instance is running outside the z/OS image or Parallel Sysplex instance configured for z/OS HyperSwap. See Chapter 7, “Securing IBM z/OS HyperSwap communication with IBM Copy Services Manager” on page 151.
2.1.2 Security and users
For IBM Copy Services Manager 6.1.x, users’ definitions are stored by default in the CSM server’s basic user registry. Copy Services Manager provides a set of predefined user roles: Monitor, Operator, and Administrator.
In addition to basic user registry, for CSM server deployment on z/OS, an operating system repository, such as IBM RACF®, can be used. LDAP can be used for both z/OS systems and other supported platforms.
For more information, see the IBM Copy Services Manager documentation IBM Copy Services Manager documentation.
2.2 CSM command-line interface (CLI)
During the disaster scenarios, failover and failback procedures involve multiple actions in the CSM-managed environment. For the handling of multiple operations, scripting would be the effective choice. For scripting commands, the csmcli (Copy Services Manager command-line interface) is provided.
 
Tip: For running the csmcli, proper Java Runtime Environment (JRE) configuration is required.
The CSM CLI can be used either for submitting batch commands (scripting, using the associated options and arguments), or interactively by starting the csmcli (shell) with no parameters.
2.2.1 Getting started with csmcli
For more information about how to install, customize, and start csmcli, and also for detailed help for all commands, go to IBM Knowledge Center.
2.2.2 Hints and tips
One of the benefits of using the command-line interface is that the output of the commands run can be used for other purposes (for example, documenting configurations, use as input for other commands, and so on). This section provides examples of how to use the CSM command-line interface (csmcli).
Creating a report for later use (documenting configuration)
When a human-readable report is needed for later use (for example, the output is too large to fit on a single display, or the output results need to be filtered, and so on), one option is to format the csmcli output with the delim option and redirect to a file. Later, this file can be imported in tabular program, for further analysis.
Example 2-1 shows how to use the csmcli in batch mode to retrieve information about the replication sessions managed by CSM.
Example 2-1 Displaying replication sessions using csmcli
[root@myLinux CLI]# ./csmcli.sh lssess -fmt delim -delim : >lssession.txt
[root@myLinux CLI]# cat lssession.txt
Name:Status:State:Copy Type
===========================
PROD:Inactive:Defined:Metro Mirror Failover/Failback
MMHF_MT:Inactive:Defined:Metro Mirror - Metro Mirror
TEST:Inactive:Defined:Metro Mirror Failover/Failback
A-A_Test:Inactive:Defined:Metro Mirror - Metro Mirror
HUK_load_issue:Inactive:Defined:Metro Mirror Failover/Failback
AD_Test:Warning:Prepared:Metro Mirror Failover/Failback
Imported in a tabular program, the output of the command in Example 2-1 looks similar to Figure 2-2.
Figure 2-2 Using tabular program to display CSM data
Caveat: using the semicolon (“;”) character as separator
If the output of the csmcli needs to be delimited by the semicolon (“;”) character, running the csmcli command in batch mode might not return the wanted results (error), because the parent shell ($0) interprets the “;” as a shell command separator, as shown in Example 2-2.
Example 2-2 Wrong usage of semicolon delimiter
[root@myLinux CLI]# ./csmcli.sh -noinfo lsdevice -hdr off -devtype ds8000 -fmt delim -delim ;
CMMCI9018E Parameter -delim is missing a required value.
Usage: lsdevice [ { -help|-h|-? } ] [ { -l|-s } ] [-fmt default|xml|delim|stanza] [-p on|off] [-delim char] [-hdr on|off] [-r #] [-v on|off] -devtype ds|ds6000|ds8000|ess|storwize-v3500|storwize-v3700|storwize-v5000|storwize-v7000|flashsystem-v9000|flashsystem-v840|svc|xiv [-connectionID connection_id] [id ... | -]
Tip: Enter "help lsdevice" for more information.
[root@myLinux CLI]#
In this situation, you need to mask the semicolon (;) by the backslash character (), as shown in Example 2-3.
Example 2-3 Correct usage of the semicolon (;) delimiter
[root@omyLinux CLI]# ./csmcli.sh -noinfo lsdevice -hdr off -devtype ds8000 -fmt delim -delim ;
DS8000:BOX:2107.FAW31;HMC;DS8000;Connected;Connected
DS8000:BOX:2107.FCL91;HMC;DS8000;Connected;Connected
DS8000:BOX:2107.FCM21;HMC;DS8000;Connected;Connected
[root@omyLinux CLI]#
2.2.3 Advanced csmcli scripting examples
CSM command-line interface also can be used for advanced scripts: The command outputs can be used as input for other commands. This section provides some examples. Note that the examples are run on a system using a UNIX-like shell. Assume that you need to list all volumes that belong to LSS A3 on all storage systems registered in CSM. This listing can be accomplished completing the following steps:
1. List all storage systems registered in CSM:
./csmcli.sh -noinfo lsdevice -devtype ds8000
2. For each storage system, you need to list all volumes:
./csmcli.sh -noinfo lsvol -devtype ds -dev [device_name]
3. From the list of volumes, select only those of which the ID starts with A3.
The three steps can be combined in one single script. Let’s run them in reverse order:
1. To list all volumes with ID starting with A3, list all volumes in a delim formatted mode:
./csmcli.sh -noinfo lsvol -devtype ds -dev DS8000:BOX:2107.FAW31 -hdr off -fmt delim -delim ;
2. You can select only the volume ID in CSM format:
./csmcli.sh -noinfo lsvol -devtype ds -dev DS8000:BOX:2107.FAW31 -hdr off -fmt delim -delim ; |cut -d ';' -f 2
3. Applying another cut, but this time against the semicolon (;) separator, select only the real volume ID:
./csmcli.sh -noinfo lsvol -devtype ds -dev DS8000:BOX:2107.FAW31 -hdr off -fmt delim -delim ; |cut -d ';' -f 2 |cut -d ':' -f 4
4. Finally, grep the output by ^A3 (use the carat (^) character to grep only on the beginning of the line):
./csmcli.sh -noinfo lsvol -devtype ds -dev DS8000:BOX:2107.FAW31 -hdr off -fmt delim -delim ; |cut -d ';' -f 2 |cut -d ':' -f 4 |grep "^A3"
5. Now, use the lsdevice command as input for your customized command:
for i in `./csmcli.sh -noinfo lsdevice -hdr off -devtype ds8000 -fmt delim -delim ; |cut -d';' -f 1`
do
echo "Volumes from system $i which belongs to LSS $1 : "
./csmcli.sh -noinfo lsvol -devtype ds -dev $i -p off -fmt delim -delim ; |cut -d ';' -f 2 |cut -d ':' -f 4 |grep "^A3"
done
6. Optionally, modify the script to use the LSS ID from a parameter list. See Example 2-4.
Example 2-4 Sample script
[root@myLinux CLI]# cat list_lss.sh
for i in `./csmcli.sh -noinfo lsdevice -hdr off -devtype ds8000 -fmt delim -delim ; |cut -d';' -f 1`
do
echo "Volumes from system $i which belongs to LSS $1 : "
./csmcli.sh -noinfo lsvol -devtype ds -dev $i -p off -fmt delim -delim ; |cut -d ';' -f 2 |cut -d ':' -f 4 |grep "^$1"
done
[root@myLinux CLI]# ./list_lss.sh A3
Volumes from system DS8000:BOX:2107.FAW31 which belongs to LSS A3 :
A31A
A31B
A31C
A31D
A31E
A31F
Volumes from system DS8000:BOX:2107.FCL91 which belongs to LSS A3 :
A31A
A31B
A31C
A31D
A31E
A31F
Volumes from system DS8000:BOX:2107.FCM21 which belongs to LSS A3 :
A31A
A31B
A31C
A31D
A31E
A31F
[root@myLinux CLI]#
2.2.4 Remote CLI
The csmcli is especially helpful for developing replication session failover/failback procedures implemented as command scripts. The CSM command-line interface can be run directly from the CSM server, or it can be installed and run on a workstation that has network connectivity to the CSM server.
Also, starting with release 8.1 of the DS8000 series Hardware Management Console (HMC), the CSM server is preinstalled. When running the CSM server on the DS8000 HMC, only remote csmcli is available for handling scripts or interactive commands (shell).
When running the CSM CLI on a system other than the CSM server, the csmcli libraries are installed on that system during the installation process, and a secure connection to the CSM server (using an SSL certificate) is established. Figure 2-3 shows the secure communication port for remote CLI.
Figure 2-3 CSM server secure communication
Setup
To install the Copy Services Manager CLI on a remote system, you must download and extract the appropriate files for your software level and operating system. The following steps show how to install and start the csmcli:
1. Download the Copy Services Manager CLI installation package (csmcli) to the (remote) system where you want to run the CSM commands. The package can be downloaded from the same website as the Copy Services Manager server installation package. Optionally you can download the remote CLI from the IBM Fix Central site.
The package types and their associated file names are listed in Table 2-1.
Table 2-1 Copy Services Manager CLI installation package file names by operating system
Operating system
Copy Services Manager CLI installation package file name
Microsoft Windows
csm-CLI-6.1.x-win.zip
AIX
csm-CLI-6.1.x-aix.tar.gz
Linux on IBM PowerPC®
csm-CLI-6.1.x-linux-ppc.tar.gz
Linux on IBM z Systems®
csm-CLI-6.1.x-linux-s390x.tar.gz
RedHat or SuSE Linux on x86
csm-CLI-6.1.x-linux-x86_64.tar.gz
z/OS
csm-CLI-6.1.x-zos.pax
2. Unpack the csmcli package to a directory on the remote system, in the following steps referred to as the CSM_CLI_DIR directory:
 – For Windows, extract the files by right-clicking and selecting Extract All.
 – For AIX or Linux, use the gunzip, and then the tar command to extract the files.
 – For z/OS, extract the files by using the pax command.
3. For z/OS only: After extracting files using the pax command, there is an extra step to set file attributes on Java libraries that the CSM CLI uses, as shown in Example 2-5.
Example 2-5 Setting the file attributes in z/OS
extattr +a CSM_CLI_DIR/csm/Java/lib/s390x/compressedrefs/libj9ifa27.so
extattr +a CSM_CLI_DIR/csm/Java/lib/s390x/default/libj9ifa27.so
4. Open the CSM_CLI_DIR/csm/CLI directory.
5. Edit the repcli.properties file by typing the server name (or IP address) and port of your Copy Services Manager server. The default settings are shown in Example 2-6.
Example 2-6 Updating repcli.properties
server=localhost /* Primary Copy Service Manager server name (IP Address is OK)
port=9560        /* Default port used for remote CLI
6. Optionally, you can update the csmcli-auth.properties with the username and password used for accessing the server. Remove the number sign (#) character in front of the username and password and update accordingly. See Example 2-7.
Example 2-7 Updating csmcli-auth.properties file
[root@myLinux CLI]# cat csmcli-auth.properties
# This is the properties file for CSM CLI authentication.
# You can place your CSM username and password in this file for automatic CLI authentication.
# If the password was entered in the properties file, when the CLI shell is entered or a CLI command is issued, the CLI
# encrypts your password and rewrites this properties file with the encrypted password for security reasons.
# If a password is not entered, the CLI prompts for one and does not update this file with an encrypted password.
# Place this properties file into the same directory that the csmcli.bat or csmcli.sh file is located,
# or under the users home directory under csm-cli.
# For example in Windows: C:\Users\Administrator\csm-cli\csmcli-auth.properties
password=XXXXXXXX
username=csmUser
[root@myLinux CLI]#
7. Start the Copy Services Manager CLI running csmcli.bat for Windows, as in Example 2-8.
Example 2-8 Starting csmcli on remote Windows workstation
C: empcsm-CLI-6.1-wincsmCLI>csmcli.bat
IBM Copy Services Manager Command Line Interface (CLI)
Copyright 2007, 2015 IBM Corporation
CLI Client Version: 6.1.3, Build: a20160721-2100
Authentication file: csmcli-auth.properties
 
Connected to:
Server: PKSTN64.pok.stglabs.ibm.com Port: 9560 UseREST: false
Server Version: 6.1.4, Build: a20160920-1045
 
csmcli>
Alternatively, use csmcli.sh on AIX, Linux, or z/OS, as in Example 2-9.
Example 2-9 Starting csmcli on remote system using csmcli.sh
[root@myLinux CSM_kit]# ls
csm csm-CLI-6.1.3-linux-x86_64.tar
[root@myLinux linux]# cd csm/CLI/
[root@myLinux CLI]# ls
csmcli-auth.properties csmcli.bat csmcli.sh etc lib repcli.properties rmserver.properties
[root@myLinux CLI]#
[root@myLinux CLI]# ./csmcli.sh
IBM Copy Services Manager Command Line Interface (CLI)
Copyright 2007, 2015 IBM Corporation
CLI Client Version: 6.1.3, Build: a20160721-2100
Authentication file: csmcli-auth.properties
 
Connected to:
Server: PKSTN64.pok.stglabs.ibm.com Port: 9560 UseREST: false
Server Version: 6.1.4, Build: a20160920-1045
 
csmcli>
 

1 The path to the file differs depending on the platform on which the CSM server is deployed and your installation preferences.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.62.168