Beruflich Dokumente
Kultur Dokumente
Scripting examples
ibm.com/redbooks
7574edno.fm
International Technical Support Organization SVC 4.2.1 Advanced Copy Services November 2007
SG24-7574-00
7574edno.fm
Note: Before using this information and the product it supports, read the information in Notices on page v.
First Edition (November 2007) This edition applies to the IBM System Storage SAN Volume Controller v4.2.1. This document created or updated on February 10, 2008.
Copyright International Business Machines Corporation 2007. All rights reserved. Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
7574spec.fm
Notices
This information was developed for products and services offered in the U.S.A. IBM may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM representative for information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any IBM intellectual property right may be used instead. However, it is the user's responsibility to evaluate and verify the operation of any non-IBM product, program, or service. IBM may have patents or pending patent applications covering subject matter described in this document. The furnishing of this document does not give you any license to these patents. You can send license inquiries, in writing, to: IBM Director of Licensing, IBM Corporation, North Castle Drive, Armonk, NY 10504-1785 U.S.A. The following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you. This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time without notice. Any references in this information to non-IBM Web sites are provided for convenience only and do not in any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the materials for this IBM product and use of those Web sites is at your own risk. IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligation to you. Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products. This information contains examples of data and reports used in daily business operations. To illustrate them as completely as possible, the examples include the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to the names and addresses used by an actual business enterprise is entirely coincidental. COPYRIGHT LICENSE: This information contains sample application programs in source language, which illustrate programming techniques on various operating platforms. You may copy, modify, and distribute these sample programs in any form without payment to IBM, for the purposes of developing, using, marketing or distributing application programs conforming to the application programming interface for the operating platform for which the sample programs are written. These examples have not been thoroughly tested under all conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of these programs.
7574spec.fm
Trademarks
The following terms are trademarks of the International Business Machines Corporation in the United States, other countries, or both:
Redbooks (logo) AIX DS4000 DS8000 FlashCopy IBM Redbooks System Storage Tivoli
The following terms are trademarks of other companies: QLogic, and the QLogic logo are registered trademarks of QLogic Corporation. SANblade is a registered trademark in the United States. Snapshot, and the Network Appliance logo are trademarks or registered trademarks of Network Appliance, Inc. in the U.S. and other countries. Java, and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. Windows Server, Windows, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both. Linux is a trademark of Linus Torvalds in the United States, other countries, or both. Other company, product, or service names may be trademarks or service marks of others.
vi
7574TOC.fm
Contents
Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .v Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii The team that wrote this book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii Become a published author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv Comments welcome. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv Chapter 1. Introduction to SVC 4.2.1 Advanced Copy Services . . . . . . . . . . . . . . . . . . . 1.1 What is new in FlashCopy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.1 Incremental FlashCopy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.2 Cascaded FlashCopy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.3 Dynamically configurable replication services space . . . . . . . . . . . . . . . . . . . . . . . 1.1.4 Grain size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.5 Bitmap space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.6 Cleaning mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 What is new in Remote Copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3 Other new functionality in 4.2.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3.1 Increased storage addressing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3.2 Volume management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3.3 Managed disks test before added to MDisk Groups . . . . . . . . . . . . . . . . . . . . . . . . 1.3.4 Cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 2 2 2 2 3 3 3 3 3 3 3 4
Chapter 2. Planning for Advanced Copy Services implementation . . . . . . . . . . . . . . . . 5 2.1 First questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.2 Reasons for copying data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.3 Deciding what data to copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.4 Ensuring copied data sets are usable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.4.1 Understanding caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.4.2 Understanding consistency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.5 Accessing the copied data sets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.6 Determining how much data can be replicated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.6.1 VDisk capacity limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.7 Understanding your current environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.7.1 Storage controller information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.7.2 Server information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.7.3 Rate of transfer of data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.7.4 Intersite latency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.8 Administration of Copy Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.8.1 SSH Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.8.2 Command Auditing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.8.3 Authorization Roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.9 Removing workarounds with 4.2.1 new functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Chapter 3. Remote Copy: Metro Mirror and Global Mirror . . . . . . . . . . . . . . . . . . . . . . 3.1 Remote Copy services overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.1 Metro Mirror . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.2 Cluster partnership . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.3 Intercluster communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 24 24 25 26 vii
7574TOC.fm
3.1.4 Maintenance of the intercluster link. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.5 I/O channel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.6 Background copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.7 Remote Mirror relationship . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.8 Copy relationship naming convention . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.9 Supported methods for synchronizing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.10 Remote mirror consistency groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 State overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.1 Connected or disconnected . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.2 Consistent or inconsistent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.3 Consistent or synchronized. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.4 Detailed Information about copy states. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 Metro Mirror and Global Mirror configuration limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4 Remote Copy internals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.1 Read stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.2 Write ordering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.3 Write consistency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.4 Write completion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.5 Freeze/Run on consistency groups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.6 Management of difference map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.7 Non-volatile journal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.8 Quick Recovery Copy or Reconstruct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 4. Implementing Remote Copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Implementation using the GUI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.1 Creation of cluster partnership . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.2 Changing a cluster partnership . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.3 Deleting a cluster partnership . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.4 Creating a copy relationship . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.5 Changing copy relationship. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.6 Starting a copy relationship. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.7 Stopping a copy relationship. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.8 Deleting a copy relationship . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.9 Creating consistency groups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.10 Starting a consistency group. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.11 Stopping a consistency group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.12 Renaming a consistency group. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.13 Reversing copy directions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3 Implementation using the CLI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.1 Listing cluster candidates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.2 Create cluster partnership. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.3 Change cluster partnership . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.4 Deleting a cluster partnership . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.5 Creating a copy relationship . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.6 Starting a copy relationship. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.7 Stopping a copy relationship . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.8 Change a copy relationship . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.9 Delete copy relationship . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.10 Creating a consistency group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.11 Start consistency group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.12 Stopping the consistency group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.13 Changing a consistency group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
26 27 27 28 28 29 30 31 32 33 34 34 38 38 38 39 39 39 40 41 42 43 45 46 47 47 50 51 52 56 57 59 60 61 63 64 66 66 68 69 69 70 70 71 72 74 74 75 75 77 78 79
viii
7574TOC.fm
4.3.14 Deleting a consistency group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.15 Reversing copy directions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4 Example of site failover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4.1 Site failover when production site loses back-end storage . . . . . . . . . . . . . . . . . . 4.4.2 Site failover using the GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4.3 Site failover using the CLI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5 Copy commands using the CLI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
79 81 82 83 84 87 89
Chapter 5. FlashCopy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 5.1 Introduction to FlashCopy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 5.1.1 What is FlashCopy and what is it useful for? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 5.1.2 Usage cases of FlashCopy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 5.2 FlashCopy functions and features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 5.2.1 FlashCopy Mappings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 5.2.2 FlashCopy Consistency Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 5.2.3 FlashCopy background copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 5.2.4 FlashCopy autodelete option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 5.2.5 Multiple Target FlashCopy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 5.2.6 Cascaded FlashCopy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 5.2.7 Combined Multiple Target FlashCopy and Cascaded FlashCopy . . . . . . . . . . . . 98 5.2.8 Incremental FlashCopy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 5.3 FlashCopy internals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 5.3.1 What is the indirection layer and what is it for?. . . . . . . . . . . . . . . . . . . . . . . . . . 101 5.3.2 What is a grain? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 5.3.3 What is a bitmap? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 5.3.4 Usable bitmap space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 5.3.5 Number of FlashCopy Mappings in a cluster . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 5.3.6 How can we specify and view the bitmap space on an I/O group. . . . . . . . . . . . 104 5.3.7 Where is the bitmap stored? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 5.3.8 FlashCopy characteristics listed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 5.3.9 FlashCopy maximum configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 5.4 FlashCopy events and states . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 5.4.1 FlashCopy Mapping states . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 5.4.2 FlashCopy events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 5.4.3 FlashCopy consistency group states . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 5.5 Dependencies between FlashCopy Mappings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 5.5.1 Linked lists of mappings and resulting dependencies. . . . . . . . . . . . . . . . . . . . . 110 5.5.2 Stopping state and cleaning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 5.5.3 Command Line commands for information on dependencies. . . . . . . . . . . . . . . 116 Chapter 6. Implementing FlashCopy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1 Example 1: basic FlashCopy using the GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1.1 Creating a FlashCopy mapping. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1.2 Starting a FlashCopy mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1.3 Modify a mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1.4 Stopping a mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1.5 Creating a FlashCopy Consistency Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1.6 Creating a FlashCopy mapping and adding it to the Consistency Group . . . . . . 6.1.7 Preparing a FlashCopy Consistency Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1.8 Starting a FlashCopy Consistency Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1.9 Stopping a Consistency Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1.10 Renaming a Consistency Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1.11 Issuing a command to a mapping within a Consistency Group . . . . . . . . . . . . 117 118 118 124 125 126 127 130 134 136 139 140 141
Contents
ix
7574TOC.fm
6.2 Example 2: Multiple Target FlashCopy using the GUI . . . . . . . . . . . . . . . . . . . . . . . . 6.2.1 Creating FlashCopy Mappings and a Consistency Group . . . . . . . . . . . . . . . . . 6.2.2 Starting a Consistency Group in an MTFC tree . . . . . . . . . . . . . . . . . . . . . . . . . 6.3 Example 3: Cascaded and Incremental FC using the GUI . . . . . . . . . . . . . . . . . . . . . 6.3.1 Creating FlashCopy Consistency Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.3.2 Create Incremental FlashCopy Mappings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.4 Example 4: FlashCopy of Metro Mirror VDisks using the CLI . . . . . . . . . . . . . . . . . . . 6.4.1 Checking VDisks and Metro Mirror relationship to be used . . . . . . . . . . . . . . . . 6.4.2 Create FlashCopy mappings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.4.3 Creating a FlashCopy Consistency Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.4.4 Adding FlashCopy mappings to the Consistency Group. . . . . . . . . . . . . . . . . . . 6.4.5 Preparing a FlashCopy mapping. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.4.6 Starting a FlashCopy Consistency Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.4.7 Modify a mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.4.8 Stopping a mapping and a Consistency Group. . . . . . . . . . . . . . . . . . . . . . . . . . 6.4.9 Deleting a mapping and a Consistency Group . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 7. Server integration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.1 What data is copied?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2 What data is on the copied VDisk? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3 AIX specifics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3.1 Creating useful copies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3.2 Accessing useful copies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.4 Windows 2000/2003 and Copy Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.4.1 Creating useful copies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.4.2 Accessing useful copies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.5 Linux Specifics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.5.1 Creating useful copies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.5.2 Accessing useful copies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.6 Other Operating Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 8. Automation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1 Running commands on the cluster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1.1 Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1.2 Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1.3 Submission . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1.4 Authorization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1.5 Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.2 Creating connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.2.1 Transient connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.2.2 Persistent connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.3 SVC command line scripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.3.1 Submitting command line scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.3.2 An example SVC Command Line script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.4 Server side scripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.4.1 An example script for creating persistent SVC connections . . . . . . . . . . . . . . . . 8.4.2 Handling the SVC response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.5 SVC CIMOM programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.5.1 CIM concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.5.2 How SVC concepts map to CIM concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.5.3 Example script to create and start a FlashCopy mapping. . . . . . . . . . . . . . . . . .
142 143 146 148 149 149 157 158 161 163 164 166 166 169 170 170 173 174 174 175 175 178 188 188 194 200 200 203 205 207 208 208 209 210 210 210 211 211 214 214 215 216 217 217 223 224 225 226 227
7574TOC.fm
8.6 Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 8.7 Auditing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 Related publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IBM Redbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Other resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenced Web sites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How to get Redbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Help from IBM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 237 237 238 238 238
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Contents
xi
7574TOC.fm
xii
7574pref.fm
Preface
This book describes the new features that have been added with the release of the IBM System Storage SAN Volume Controller 4.2.1 code. Readers are expected to have an advanced knowledge of the SVC and SAN environment, and we recommend these books as background reading: IBM System Storage SAN Volume Controller, SG24-6423 Introduction to Storage Area Networks, SG24-5470 SAN Volume Controller: Best Practices and Performance Guidelines, SG24-7521 Using the SVC for Business Continuity, SG24-7371
Jon Tate is a Project Manager for IBM System Storage SAN Solutions at the International Technical Support Organization, San Jose Center. Before joining the ITSO in 1999, he worked in the IBM Technical Support Center, providing Level 2 support for IBM storage
xiii
7574pref.fm
products. Jon has 22 years of experience in storage software and management, services, and support, and is both an IBM Certified IT Specialist and an IBM SAN Certified Specialist. He is also the UK Chair of the Storage Networking Industry Association (SNIA). Pall Thorir Beck is a Technical Team Lead in IBM ITD Denmark. He has 11 years of experience working with storage, and joined the IBM Denmark team in 2005. Prior to working for IBM in Denmark he worked as an IBM CE performing hardware installaions and repairs for IBM iSeries, pSeries and zSeries in Iceland. His current position involves the administration, design, and support of large SAN environments in Denmark. He is also part of a Nordic storage team that covers storage for open systems in Sweden, Norway and Finland. Pall has a diploma as an Electronics Technician from Odensen Tekniske Skole in Denmark, and IR in Reykjavik, Iceland. Tom Jahn is a Senior I/T Specialist for IBM TSS Storage Systems Sales in Germany. He has 10 years of experience providing technical sales support in IBM. Tom provided technical sales support for networking and server consolidation on OS/390 UNIX for IBM and its customers before he joined the storage brand eight years ago. He is engaged in providing technical support for open systems storage solutions across multiple platforms and a wide customer base, currently with a focus on storage virtualization. He holds a Dipl. Ing. degree in Computer Science from the Staatliche Studienakademie Sachsen. Dan Rumney is the IBM Global Support Manager for the JPMC Account. Prior to this role, he has worked in development and support of storage products since joining IBM in 2002. Dan worked in System Verification Test for IBM before moving to support. He has been providing Level 2 and Level 3 support of SAN Volume Controller for the past 2 years.. We extend our thanks to the following people for their contributions to this project. There are many people that contributed to this book. In particular, we thank the development and PFE teams in Hursley. In particular Matt Smith was also instrumental in moving any issues along and ensuring that they maintained a high profile. We would also like to thank the following people for their contributions: John Agombar Chris Beeken Iain Bethune Trevor Boardman Carlos Fuente Gary Jarman Colin Jewell Andrew Martin Paul Merrison Steve Randle Bill Scales Matt Smith Barry Whyte IBM Hursley Bill Wiegand IBM Advanced Technical Support Evelyn Wick IBM Beaverton Dorothy Faurot IBM Raleigh xiv
SVC 4.2.1 Advanced Copy Services
7574pref.fm
Marci Nagel IBM Rochester Chris Saul IBM San Jose Sharon Wang IBM Chicago Tom Cady Deanna Polm Sangam Racherla Bill Trimble IBM ITSO Tom and Jenny Chang Garden Inn Hotel, Los Gatos, California
Comments welcome
Your comments are important to us! We want our books to be as helpful as possible. Send us your comments about this book or other IBM Redbooks in one of the following ways: Use the online Contact us review Redbooks form found at: ibm.com/redbooks Send your comments in an e-mail to: redbooks@us.ibm.com Mail your comments to: IBM Corporation, International Technical Support Organization Dept. HYTD Mail Station P099 2455 South Road Poughkeepsie, NY 12601-5400
Preface
xv
7574pref.fm
xvi
7574 Introduction.fm
Chapter 1.
7574 Introduction.fm
7574 Introduction.fm
7574 Introduction.fm
1.3.4 Cache
In this version of software the cache space is partitioned by managed disk group. Each MDisk group that qualifies is limited to a certain amount of the cache, depending on how many MDisk groups there are running in the cluster.
Chapter 2.
Testing and Assurance Data are copied to provide test and assurance systems with a copy of real production data to allow for meaningful testing Business Operations Data are copied prior to system configuration changes to provide snapshots in case rollback is required
The reason for copying data dictates which data will be copied. For instance, the data copied for a Disaster Recovery solution may differ significantly from the data copied for Testing, even if the same servers are involved.
utilization would never exceed 50%. Its clear that decisions need to be made to select precisely which data need copying to balance the cost of copying with its benefits. There are costs associated with Copy Services beyond the cost of the technology. These include: The capital and maintenance cost of the additional storage needed The management cost of administering the Copy Services The opportunity cost of the bandwidth used to mirror the data These costs are offset by the benefit of having multiple copies of your data. Business cases for which these Copy Services can be used are listed in later chapters. The benefits of these copies are often calculated by determining the cost of having to recreate this data or the cost of losing it forever. The benefit is considered to be the fact that you do not have to meet this cost, if you implement the Copy Services solution. In extreme cases, the data may be critical to your businesss core function and the cost of losing it is your business. We call groupings of files and other information data sets. A data set could be multiple VDisks which contain the information that you are concerned with. It could be that a data set is smaller than a VDisk, for instance, a single partition on a larger VDisk. However, the smallest entity that SVC can replicate is a VDisk and we will not discuss file or filesystem replication in this Redbook. Some data sets have no business value, but is generated during day to day operations. Here are some examples of data sets that you may not wish to copy: Temporary file space Temporary database tables Non-business data, such as employees personal files Some data sets are easy to reproduce or, more relevantly, cheaper to reproduce than they are to copy. As such, you may decide that some data should be left uncopied. Examples of such data sets may include: Development sandboxes Test systems SAN Boot volumes (reinstallation may be simpler and cheaper than replication) Undoubtedly, even after removing data sets such as those above, you will be left with data sets that are too expensive to lose or recreate. It is the VDisks upon which these data sets reside that you will want to copy.
While information is cached on both reads and writes, we are only concerned with write caching, when we consider Copy Services
Figure 2-1 is a simplification. In a production environment, you will have cache above cache above cache. Consider a system with SAN Volume Controller (SVC) installed, as displayed in Figure 2-2 on page 10. This shows how a production environment can have many caches between the application that end users see and the disks in a storage subsystem. The numbering in the list below refers to the numbering of the caches in Figure 2-2 on page 10: 1. Database cache: Queries to the database may well be cached by the database process to allow for rapid completion of application processes. This may be done in the form of storing queries for later execution. 2. Filesystem cache: IO commands to the filesystem may be cached in memory to allow faster completion to processes running on the server. These commands will be passed to underlying storage at a later time or when the cache needs to make space for subsequent IO commands.
3. SVC cache: SVC has a redundant write-cache which allows for fast completion of IO commands to the server. The data from these commands are destaged at a later time. 4. Storage controller cache: Most modern storage controllers have write cache of their own. Once data is stored in these caches, the system will report a successful conclusion. At a later date, this information will be written to the physical disks themselves. The diagram shows 4 layers representing a function in the system. As data flows from layer to layer, it passes through a cache. Each cache makes a commitment to the layer above that any data that it accepts will eventually be destaged. However, there is no commitment as to when the data will be committed. This is important to remember when planning a solution that uses Copy Services. It should also be understood that each layer has no idea that there is data in the caches owned by higher layers. Remember: A cache makes a commitment that completed writes will be written to the layer below, but with no commitment as to when A cache has no idea about the existence of caches above it.
10
copying is identical to the volume that your application is seeing. Because of write-caching, this is not always the case. In Figure 2-3 you can see where FlashCopy exists with respect to caches. The server sees a SCSI LUN presented by the SVC, corresponding to a VDisk. When an application performs certain actions, data is written to this SCSI LUN. Because of the caching, data written at some time t0 may not actually hit the VDisk until a later time t1 . Normally this is not a problem, because: The writes will eventually get there All reads go through the same cache, so there is never any noticeable inconsistency between what is on the SCSI LUN that the server sees and what is on the VDisk that SVC presents.
When using Copy Services, this does become a problem. The business problem that is being solved demands that the data on the LUN be copied. As a result, every block of data that the system has written to its LUNs must be captured by the FlashCopy. However, as commented above, SVC works with VDisks and has no idea that there is data in the caches above it. In order to ensure that the FlashCopy Target VDisk is an identical match to the SCSI LUN that the server sees, data must be purged from the caches at all layers and the system must be configured to place no more data in the caches until the FlashCopy has been started. This can be done by Quiescing IO operations
Chapter 2. Planning for Advanced Copy Services implementation
11
Setting caches to a write-through mode Vendor-specific processes, such as setting applications to special backup modes that allow for consistent copies to be made. The same phenomenon exists for Global and Metro Mirror. In these cases, the Primary and Secondary VDisks remain in synch with one another, but, as with FlashCopy VDisks, there will be a time lag between the SVC VDisks and the SCSI LUN that the server sees. Thus, when the relationship is broken or stopped, the data on the VDisk will not be identical to the data that application sees on the LUN.
same order.
12
However, if W2 is sent before W1 completes, then there is no guarantee as to the order in which the cache will submit these to the layer below. In fact, the cache may well batch these and submit them at the same time.
13
At t0 , we have 2 VDisks which are about to be put into a copy relationship. They are very small VDisks with only 4 blocks each. The precise type of copy relationship is not relevant as the concept is the same. At this point in time, the relationship is inconsistent because the Target VDisk data set does not match any version of the Source VDisk data set. The subsequent points in time are described in the following list: 1. At this point, block A is copied from the Source to the Target. The relationship is still inconsistent. 2. At this point, block B is copied from the Source to the Target. The relationship is still inconsistent. 3. At this point, block C is copied from the Source to the Target. The relationship is still inconsistent. 4. At this point, block A is overwritten by the server with block E. The relationship is still inconsistent.
14
5. At this point, block D is copied from the Source to the Target. The relationship is now consistent as the Target VDisk data set represents the same data set as the Source VDisk at t3 . 6. At this point, block E is copied from the Source to the Target. The relationship is still consistent and is now synchronized The difference in time between t3 and t5 represents the Recovery Point Objective1 (RPO) for this VDisk.
See Using the SVC for Business Continuity, SG24-7371 to learn more about the language of Business Continuity
15
a. Global Mirror not supported until SVC 4.1.1.x b. Default is 40 TB. The bitmap space that is used to control Copy Services is shared between FlashCopy and Metro/Global Mirror. c. Fibre Channel Extenders d. SAN Routers
16
You should refer to the latest SVC documentation to find out what limitations apply to the level of SVC that you are running with.
17
Note: For the FlashCopy mapping bitmap space, the amount of mappings has to be taken into account. Each mapping target for a FlashCopy uses up bitmap space. This means for Multiple Target FlashCopy, even though there is only one source vdisk involved, multiple targets will consume the same amount of bitmap space as the same number of targets of independent FlashCopy mappings would use up.
18
If you have a well equipped test lab, you may be in a position to create this kind of graph on the same equipment as that in your production environment. Failing that, your storage controller vendor should be able to advise the maximum workload that your storage controllers are capable of without significant increases in latency. Once you have done this, you should investigate your storage controllers to see what kind of workload they are currently handling. The method by which you do this depends on the controller that you are using. If you use Tivoli Productivity Center (TPC) for Disk and it is configured to monitor your storage controllers, then you can gather this information that way. Alternatively, if you have TPC installed and it is monitoring your SVC, you can gather performance information about your MDisks and work it out that way. Bear in mind that any performance statistics gathered about your MDisks only tell part of the storage if your storage controller is also presenting volumes directly to other servers.
19
use to anyone. Thats not to say that the servers dont have demanding requirements, but you will need real figures in order to plan your Copy Services system. When a VDisk is being copied (either by FlashCopy or Metro/Global Mirror) writes to the VDisks will drive data copies. In the case of FlashCopy, the first write to a block on the source VDisk will result in data being written to the target VDisk; further writes to the same block will generate no extra IO. In the case of Metro/Global Mirror, each write to a block on the primary VDisk will be replicated to the secondary VDisk. You must ensure that the storage controllers that the target/secondary VDisks are on are up to the workload that will be driven to them. This is particularly important for Metro/Global Mirror relationships. For instance, you may have a set of VDisks that are residing on DS8000 storage controllers; these VDisks are comfortably handling a high write workload. You decided to replicate these VDisks to a remote site, using Metro Mirror. If the remote VDisks are residing on DS4000 storage controllers, then you could expect to see problems. The remote VDisks must be able to handle the same write workload as the local storage or else you will start to see performance problems. Under most workload patterns, Metro/Global Mirror does not cause serialization of writes that are submitted at the same time. Consider a server that sends 5 write operations to 5 different locations on a VDisk, all at the same time. Obviously, this server is not concerned about the write order as it has not waited for completion from the first before sending the second, third, fourth or fifth. Thus for Metro Mirror, these 5 writes will be sent to the secondary disk in any order and completion will be reported to the server as and when the operations are complete. For Global Mirror, these writes will be completed once they are in the cache and then written to the remote cluster as soon as possible. There is one workload pattern which can lead to performance issues with Global Mirror. In order to maintain write ordering, the Global Mirror code only allows a single write to be active on any given block of a VDisk. Thus, if a write comes in from a host to a block, and that block still has data waiting to be written to the remote cluster, the new write will be delayed until the copy has been completed. Applications that deliver this kind of workload will not achieve the performance that Global Mirror is intended to support. The Per VDisk Cumulative total number of overlapping writes (gwo) statistic provided by the SVC gives a count of colliding writes. If bad performance is being seen, checking this statistic can be used to determine if you are hitting this limitation.
20
21
Table 2-3 Commands available to each Role Role Service Allowed commands The following commands: svcinfo: all commnads svcservicetask: all commands The following commands: svcinfo: all commands. svctask : finderr, dumperrlog, dumpinternallog svcservicetask : finderr, dumperrlog svcconfig: backup All commands allowed for Monitor role plus: svctask : prestartfcconsistgrp startfcconsistgrp, stopfcconsistgrp chfcconsistgrp prestartfcmap startfcmap, stopfcmap chfcmap startrcconsistgrp, stoprcconsistgrp switchrcconsistgrp chrcconsistgrp startrcrelationship, stoprcrelationship switchrcrelationship chrcrelationship chpartnership All commands can be submitted by users of this role
Monitor
CopyOperator
Administrator
Up to 100 different keys can be stored on a cluster, so there is ample scope for assigning individual keys (and so roles) to systems or system administrators. Currently, there is no way to limit which copy relationships a user can affect. A CopyOperator can execute commands against any FlashCopy mapping or Metro/Global Mirror relationship. However, the audit log will track all commands that are executed so rogue operators cannot act with impunity. Chapter 8, Automation goes into more details about authorization and auditing.
22
Chapter 3.
23
(1)Write
Vdisk (Primary)
Vdisk (Secondary)
The Metro Mirror functionality ensures that I/Os are committed to both the primary and secondary VDisks before sending confirmation of the completion to the server. This ensures that the secondary VDisk is synchronized with the primary VDisk in case of a failure. The secondary VDisk is in a read-only state and manual intervention is required to change that access to read/write state. The server administrator will also need to mount the secondary disk so the application can start to use that VDisk.
Global Mirror
Global Mirror copy relationships work in a similar way as Metro Mirror does but by establishing an asynchronous copy relationship between two VDisks of equal size. This is mostly intended for intercluster relationships over long distances. 24
SVC Advanced Copy Services for Business Continuity
Global Mirror functionality is that a confirmation is sent to the server before it has received good completion at the secondary VDisk. When a write is sent to a primary VDisk it is given a sequence number. Mirror writes sent to the secondary VDisk are committed in sequence number order. If a write is issued, while another write is outstanding, it may be given the same sequence number. Figure 3-2 shows the sequence.
(1)Write
Vdisk (Primary)
Vdisk (Secondary)
Therefore, if a host has submitted concurrent writes, the SVC will batch them together (because the host does not care in what order they are written). The secondary VDisk is therefore consistent with the primary. If a host is writing to the same block, before the previous write is committed, the next write is held until the previous write is completed.
25
error event, the intercluster link is excluded. Then, the focal point node will deliberately prevent an intercluster link being created between the local cluster and the remote cluster. The other cluster will report partially_configured in its configuration state for the remote cluster. It is likely the other cluster will also have detected the same set of errors and excluded the link on the same basis; in which case both clusters will report partially_configured. If only one cluster detects an error and excludes the link, the cluster that does not detect the error will continue to report fully_configured.
27
In order to set the background copy bandwidth optimally, make sure that you take into consideration all aspects of your environments. The three biggest contributing resources are the primary storage, the intercluster link bandwidth, and the secondary storage. Provision the most restrictive of these three resources between the background copy bandwidth and the peak foreground I/O workload.
28
Secondary VDisk in an active relationship is always in read-only mode when it contains consistent image of the primary VDisk. This role changes when you change the copy direction. Figure 3-3 shows how the role name follows the copy direction.
Master VDisk
Auxiliary VDisk
Copy direction
Copy direction
When you create a copy relationship you need to state which VDisk is the master VDisk, and the other VDisk in that relationship will become the auxiliary. This relationship does not change even if you change copy directions. Note: When creating the SVC cluster partnership neither cluster is master/primary or auxiliary/secondary. They are both equal in this partnership and when you use the mkpartnership command you are using the only Remote Copy command that needs to be issued to both clusters, all other Remote Copy commands need be issued from only one of the clusters in the relationship.
29
30
Copy commands can be issued to either Metro Mirror or Global Mirror consistency groups, which affects all Remote Mirror relationships in that consistency group, or to a single standalone Remote Mirror relationship, if it is not part of a consistency group. In summary: Remote Mirror relationships can be part of a consistency group, or be stand-alone and therefore handled as single instances. A consistency group can contain zero or more relationships. An empty consistency group, with zero relationships in it, has little purpose until it is assigned its first relationship, except that it has a name. All the relationships in a consistency group must have matching master and auxiliary SVC clusters. All relationships must be of the same type. The rules behind consistency mean that certain configuration commands are prohibited, where this would not be the case if the relationship was not part of a consistency group.
31
inconsistent
INCONSISTENT S TOPPED
Start
INCONSISTENT C OPYING
Stop create_unsync
IDLING
Forced Start
create_sync
C ONSISTENT S TOPPED
Start
C ONSISTENT S YNCHRONIZED
Start in sync
Stop
Legend
32
As a result, the relationship can either return to the state it was in when it became disconnected, or it can enter a different connected state. Note: Relationships that are configured between virtual disks in the same cluster will never be described as being in a disconnected state since only one cluster is involved.
33
If two programs or systems communicate and store details as a result of the information exchanged, then either of the following actions might occur: All the data accessed by the group of systems must be placed into a single consistency group. The systems must be recovered independently (each within its own consistency group). Then, each system must perform recovery with the other applications to become consistent with them.
Consistent Stopped
This is a connected state. In this state, the secondary contains a consistent image, but it might be out-of-date with respect to the primary. This state can arise when a relationship was in consistent synchronized state and suffers an error which forces a consistency freeze. It can also arise when a relationship is created with a sync parameter set. 34
SVC Advanced Copy Services for Business Continuity
Normally, following an I/O error, subsequent write activity cause updates to the primary and the secondary is no longer synchronized. In this case, to re-establish synchronization, consistency must be given up for a period. A Start command with the Force option must be used to acknowledge this, and the relationship or consistency group transitions to inconsistent copying. Do this only after all outstanding errors are repaired. In the unusual case where the primary and secondary are still synchronized (perhaps following a user stop, and no further write I/O was received), a Start command takes the relationship to consistent synchronized. The No Force option is required. Also in this unusual case, a Switch command is permitted which moves the relationship or consistency group to consistent synchronized and reverses the roles of the primary and secondary (switches copy directions). If the relationship or consistency group becomes disconnected, then the secondary side transitions to consistent disconnected. The primary side transitions to idling disconnected. An informational status log is generated every time a relationship or consistency group enters the consistent stopped with a status of Online state. Note: It is possible to create some form of automation that monitors the status log. The SVC cluster has the possibility to send an SNMP trap that triggers an automation script that issues the start command in a case of loss of synchronization when certain log entries appear.
Consistent Synchronized
This is a connected state. In this state, the primary VDisk is accessible for read and write I/O and the secondary VDisk is accessible for read-only I/O. This state is also called normal copy state and indicates that now your relationship is both consistent and synchronized. Writes that are sent to the primary VDisk are sent to both primary and secondary VDisks. Either good completion must be received for both writes, or the write must be failed to the host, or a state transition out of consistent synchronized must take place before a write is completed to the host. A stop command takes the relationship to consistent stopped state. A stoprcrelationship command with the -access argument takes the relationship to the Idling state. A switch copy direction command leaves the relationship in the consistent synchronized state, but reverses the primary and secondary roles and therefore the copy direction. A Startrcrelationship or startrcconsistgrp command is accepted, but has no effect. If the relationship or consistency group becomes disconnected, the same transitions are made as for consistent stopped.
Inconsistent Stopped
This is a connected state. In this state, the primary is accessible for read and write I/O but the secondary is not accessible for either. The command start copy process needs to be given to make the secondary consistent. This state is entered when the relationship or consistency group was inconsistent copying and has either suffered a persistent error or received a stop command which has caused the copy process to stop.
35
A Start command causes the relationship or consistency group to move to the inconsistent copying state again. A stop command is accepted, but has no effect. If the relationship or consistency group becomes disconnected, the secondary side transitions to inconsistent disconnected. The primary side transitions to idling disconnected.
Inconsistent Copying
This is a connected state. In this state, the primary is accessible for read and write I/O but the secondary is not accessible for either read or write I/O. Inconsistent copying runs as a background copy process, which copies data from the primary to the secondary VDisk. This state is entered after a start command is issued to an inconsistent stopped relationship or consistency group. It is also entered when a forced start is issued to an idling or consistent stopped relationship or consistency group. In the absence of errors, an inconsistent copying relationship is active, and the copy progress increases until the copy process completes. In some error situations, the copy progress might freeze or even return to a known state. A persistent error or stop copy process command places the relationship or consistency group into an inconsistent stopped state. A start command is accepted, but has no effect. If the background copy process completes on a standalone relationship, or on all relationships for a consistency group, the relationship or consistency group transitions to consistent synchronized. If the relationship or consistency group becomes disconnected, then the secondary side transitions to inconsistent disconnected. The primary side transitions to idling disconnected.
Idling
This is a connected state. Both master and auxiliary disks are operating in the primary role. Consequently both are accessible for write I/O. In this state, the relationship or consistency group accepts a start command. Metro Mirror maintains a record of regions on each disk which received write I/O while Idling. This is used to determine what areas need to be copied following a start command. The Start command must specify the new copy direction. A Start command can cause a loss of consistency if either VDisk in any relationship has received write I/O. This is indicated by the synchronized status. If the start command would lead to a loss of consistency, then the Force parameter must be specified. Following a Start command, the relationship or consistency group transitions to consistent synchronized if there is no loss of consistency, or to inconsistent copying if there is such a loss. Also, while in this state, the relationship or consistency group accepts a Clean option on the start command. If the relationship or consistency group becomes disconnected, then both sides change their state to idling disconnected.
IdlingDisconnected
This is a disconnected state. The VDisk or disks in this half of the relationship or consistency group are all in the primary role and accept read and write I/O.
36
The main priority in this state is to recover the link and make the relationship or consistency group connected once more. No configuration activity is possible (except for deletes or stops) until the relationship becomes connected again. At that point, the relationship transition to a connected state. The exact connected state which is entered depends on the state of the other half of the relationship or consistency group, which depends on: The state when it became disconnected The write activity since it was disconnected The configuration activity since it was disconnected If both halves are idling disconnected, then the relationship becomes idling when reconnected. While idling disconnected, if a write I/O is received which causes loss of synchronization and the relationship was not already stopped (either through user stop or a persistent error), then an error log entry is raised to notify this. This error log is the same as that raised when the same situation arises when consistent synchronized.
Inconsistent Disconnected
This is a disconnected state. The VDisks in this half of the relationship or consistency group are all in the secondary role and do not accept read or write I/O. No configuration activity except for deletes is permitted until the relationship becomes connected again. When the relationship or consistency group becomes connected again, the relationship becomes inconsistent copying automatically unless either: The relationship was inconsistent stopped when it became disconnected The user issued a stop command while disconnected In either case, the relationship or consistency group becomes inconsistent stopped.
Consistent Disconnected
This is a disconnected state. The VDisks in this half of the relationship or consistency group are all in the secondary role and accept read I/O but not write I/O. This state is entered from consistent synchronized or consistent stopped when the secondary side of a relationship becomes disconnected. In this state, the relationship or consistency group displays an attribute of FreezeTime ( see 3.4.5, Freeze/Run on consistency groups on page 40) which is the point in time that consistency was frozen. When entered from consistent stopped, it retains the time it had in that state. When entered from consistent synchronized, the FreezeTime shows the last time at which the relationship or consistency group was known to be consistent. This corresponds to the time of the last successful heartbeat to the other cluster. A stop command with enable write access to secondary transitions the relationship or consistency group to an idling disconnected state. This allows write I/O to be performed to the VDisks and is used as part of a disaster recovery scenario. When the relationship or consistency group becomes connected again, the relationship or consistency group becomes consistent synchronized only if this does not lead to a loss of consistency under these criteria: The relationship was consistent synchronized when it became disconnected.
Chapter 3. Remote Copy: Metro Mirror and Global Mirror
37
No writes received successful completion at the primary while disconnected. Otherwise the relationship become consistent stopped. The FreezeTime setting is retained.
Empty
This state only applies to consistency groups. It is the state of a consistency group which has no relationships and no other state information to show. It is entered when a consistency group is first created or a all relationship are removed from the consistency group.It is exited when the first relationship is added to the consistency group at which point the state of the relationship becomes the state of the consistency group.
38
Note: Read stability is also known as Mirror Write Consistency. This definition of read stability makes no guarantee of data returned to reads while writes are outstanding, only where reads are issued after writes have completed. It is possible to conceive of an application that issues writes and without waiting for write completion, issues reads to the same region. Such an application, on seeing new data being returned for its read, might conclude that the Write data is indeed committed. Such an application is not satisfied by this definition of Read Stability. Remote Copy only guarantees Read Stability following a Write Completion.
39
write is completed. This situation is resolved before any read is released, either by forcing the relationship ConsistentStopped or by failing new and pending I/O.
FreezeTime
When the freeze has been achieved across all relationships in a consistency group and any system transients (such as path offline status associated with connectivity to the controllers) have completed, then a decision is made as to how to proceed. An attempt might be made to perform a recovery copy which, if successful, allows I/O to resume without loss of synchronization. Otherwise, assuming the primary is still online , then a Run is performed with the relationship consistentstopped. As a result of a run I/O is resumed which means: Host I/Os are allowed to complete New I/Os are allowed to proceed issuing writes only to the primary Read I/Os are allowed to proceed When a consistency group is in the state of Consistent Stopped, there is a parameter called freeze_time, see Example 3-1. It shows the time in YY/MM/DD/HH/MM format, and the time it shows is the last known time when the state between primary and secondary was consistent synchronized.
Example 3-1 The freeze time parameter.
IBM_2145:ITSOCL2:admin>svcinfo lsrcconsistgrp 254 id 254 name ITSO_SERVER_GRP master_cluster_id 000002006B603A38 master_cluster_name ITSOCL2 aux_cluster_id 0000020068403A42 aux_cluster_name ITSOCL3 primary master state consistent_stopped relationship_count 2 freeze_time 2007/11/08/20/14/54 status online sync in_sync copy_type metro RC_rel_id 2 40
SVC Advanced Copy Services for Business Continuity
RC_rel_name ITSO_SERVER_01 RC_rel_id 9 RC_rel_name ITSO_SERVER_02 The most useful value of the FreezeTime is on the secondary VDisk since the primary sets its value when it first finds out that the relationship is consistent
Space management
A difference map is maintained on all online nodes that are members of the I/O group of a primary VDisk. Space for a different map is permanently reserved for the secondary VDisk for use when it needs to act as a primary The difference map is implemented as a non-volatile bitmap, one bit corresponding to a grain of data, each grain corresponding to 256kB of aligned disk space. This is the unit of background copy (as well as recovery copy). The difference map space is allocated in units corresponding to 8GB of disk space. (4KB * 8 bits * 256kB). Whole units are allocated to each VDisk, with any excess being lost. The limit is expressed in terms of VDisk space in each I/O group. Note: When creating a copy relationship with VDisks that are less than 8GB we are still reserving bitmap space for 8GB, so when making a copy relationship it is a good practice to scale the size of the VDisks in increments of 8GB so as not to waste any bitmap space. Within each I/O group it includes both primary and secondary VDisks
Messaging
When two nodes are present in an I/O group they will exchange messages to ensure that each is kept up-to-date with respect to changes required in the difference map:
41
When a write takes place to a grain that has been synchronized the map must be marked out of sync on both nodes before the I/O is allowed to proceed. The Unlock message is not sent until both primary and secondary I/Os have completed successfully. If either write fails an UnlockDoneFailed message is sent. When a background copy or recovery copy operation has successfully synchronized a grain, the grain must be marked clean on both nodes. The node that owns the grain sends a message to the partner node to mark the grain Clean. This is replied to by using a CleanDone message. When an I/O touches a grain that is synchronized but it is not going to perform a write to the secondary (e.g. it is in ConsistentStopped state) then the grain must be marked Dirty on both nodes. A node sends a DirtyGrain message and receives a DirtyDone reply from the partner. When multiple write I/Os are active in the same synchronized grain each requires its own Lock/LockDone/Unlock exchange with the partner node. Only when the last I/O completes within a grain and no I/O that was active in that grain suffered a write failure is the grain marked Clean in each node.
42
43
44
Chapter 4.
45
4.1 Implementation
In this chapter we will show how we implemented Remote Copy in our environment. We will use both the GUI and the command line interface to assist us in creating Metro and Global Mirror relationships and consistency groups. Our environment consists of the equipment shown in Table 4-1
Table 4-1 SVC and Subsystem Production site Devices Disaster site Devices SVC ITSOCL2 SVC ITSOCL3 Subsystem DS4500 Subsystem DS4700
We will be using Metro Mirror intercluster relationship between the clusters as shown in Figure 4-1.
Our SVC clusters are ITSOCL2 and ITSOCL3, and we are going to create a copy relationship between those two clusters. Since Metro Mirror and Global mirror are using the same set of commands we will show you in detail how we implement Metro Mirror and we will add additional comments when Global Mirror differs from Metro Mirror. To be able to start the copy relationship there should been established connection between the two clusters through the SAN network and in this chapter we assume that this has been done. For information on how to install the SVC refer to the IBM System Storage SAN Volume Controller, SG24-6423.
46
After choosing to create our new partnership we will see our cluster candidates as in Figure 4-3 on page 48.
47
The candidates are the clusters that are already configured on the SAN and are zoned to our production cluster ITSOCL2. When we are creating the partnership we need to configure the link between the clusters. If we are creating a Metro Mirror Partnership we only need to think of the bandwidth for the link. If we are creating a Global Mirror partnership we need to be aware of the link tolerance between the two SVC clusters. These parameters are described as follows: Bandwidth Specifies the bandwidth that is used by the background copy process between the clusters. It adjusts the bandwidth that is used by Metro Mirror or Global Mirror for the initial background copy process. The bandwidth is set to default to 50 MBps (megabytes per second) if you do not specify it. Set the bandwidth to a value that is less than or equal to the bandwidth that can be sustained by the intercluster link. Link Tolerance ( Use for Global mirror only) Defines how sensitive the cluster is to inter-link overload tolerance. The value specified are the seconds that the cluster will tolerate continued difficulties before the cluster will suspend the copy function to prevent host I/O impact. The parameter accepts values from 60 to 86400 seconds in steps of 10 seconds. The default is 300 seconds (5 minutes). You can disable the link tolerance by entering a value of zero (0) for this parameter. Inter cluster delay ( Use for Global mirror only) An optional feature for Global Mirror permits a delay simulation to be applied on writes sent to secondary virtual disks. This allows testing to be performed and can be used to
48
test an application before full deployment of the feature. A value of 0 disables this feature. Intra cluster delay ( Use for Global mirror only) An optional feature for Global Mirror permits a delay simulation to be applied on writes sent to secondary virtual disks. This allows testing to be performed and can be used to test an application before full deployment of the feature. A value of 0 disables this feature. We will use the default values in our creation of the partnership and in Figure 4-4 on page 49, we have established a partial partnership between ITSOCL2 and ITSOCL3. Note: When creating a partnership be aware of setting the copy rate settings to a value appropriate to the link and secondary back-end storage.
We logon to ITSOCL3 to complete the creation of the partnership. See Figure 4-5 on page 50.
49
Figure 4-5 Completing the creation of the partnership on the remote cluster.
After selecting OK, we can see that the partnership is fully configured as in Figure 4-6.
We close that window and now we have a fully configured partnership between the clusters and all copy commands from now on only need to be entered from either of those clusters, not both. We will continue using ITSOCL2 as our production SVC cluster.
50
If any changes are made on the partnership link it will not stop any active mirroring. In Figure 4-8 we can change the same settings that we inserted when we created the partnership, as in Figure 1-2 on page 5.
Figure 4-8 Parameter that can be changed for the cluster partnership.
51
After we have clicked the delete button the cluster partnership will be partially configured as shown in Figure 4-11. We can only see that state on the remote cluster and on that cluster we complete the deletion of the partnership.
Figure 4-11 After deleting the local partner the deletion is partially done
As we did when we created the partnership we will have to logon to the remote cluster to finish the deletion. And as shown in Figure 4-11 we have a partially configured link that we will permanently delete by clicking delete.
between those VDisks as shown in Figure 4-12, then we will import that relationship into the consistency group.
After we have selected the creation of the relationship and pressed Go, we will get an overview of the steps ahead, see Figure 4-13 on page 53.
We name the relationship with a name that gives a meaning to what it is used for as shown in Figure 4-14.
53
We choose the copy type to be Metro Mirror, since we want the copy to be synchronous. We can also select the relationship to be inter or intra cluster. We select intercluster since we are mirroring from production to disaster/recovery clusters that are separated by distance.
If we know the name of the VDisk we are going to user as our Master VDisk, we can filter for that name, or to see all VDisk candidates on the Master cluster we can use an asterisk to see all the available VDisk candidates as in Figure 4-15 on page 54. After sorting our available candidates, we choose ITSO_MM_S001 as our Master Vdisk as in Figure 4-16 on page 55.
54
Now we need to choose our Auxiliary VDisk from the other SVC cluster. The SVC clusters are already in a partnership and therefore it provides the cluster a list of candidates for the auxiliary VDisk, without requiring us to login to the remote cluster. The GUI will only show VDisks that are of the same size as the Master Vdisk and are available for a copy relationship as in Figure 4-17 on page 55.
We are creating a copy relationship with unused VDisks, we know the status of the disks, and that is both VDisks exist and have not been mapped to any host. From an operating system point of view they are not initialized and empty. Therefore we can chose to select them as synchronized. This is the most common way to perform this action if you are creating a new relationship between unused VDisks. as shown in Figure 4-18 on page 56.
55
Figure 4-18 Select synchronized so the primary and secondary are in sync when the copy process starts.
We will not add this relationship to any consistency group at this time, we will do that later in this chapter. But this feature to be able to add a relationship directly to a consistency group is excellent to use when adding disks to a host that already has VDisks in an consistency group. Our relationship is called ITSO_SERVER_01 and it is now created as shown in Figure 4-19 on page 56.
56
When we are modifying a relationship we can change the name of the relationship, add/remove from a consistency group as shown in Figure 4.2.6.
In Figure 4-22, notice that even though we have created the relationship, and that although we have not started any copy process the relationship is in a consistent stopped state. It is consistent because we selected the synchronized parameter when creating the relationship.
Chapter 4. Implementing Remote Copy
57
The final step towards a fully configured relationship is to start the copy process between the VDisks. We select to start the copy process from the drop down menu as shown in Figure 4-23.
In Figure 4-24 on page 58 we do not have to mark forced start or mark as clean since we are starting a new relationship and we have already selected it to be synchronous from the start.
And now we see the final state of our relationship in Figure 4-25. Our relationship is in a consistent synchronized state so both primary and secondary VDisks should have the same content.
58
Now we have created a relationship between two VDisks on two SVC clusters that are in an intercluster partnership. Our Primary VDisk is the Master VDisk and is therefore our production disk.
In Figure 4-27 we can select that we want to enable write access to the secondary VDisk. Since we are only stopping the copy process and do not want to enable write access to the secondary, we select OK without setting a check mark to enable write access.
In Figure 4-28 on page 60 we can see the result of stopping the copy process. Our copy state is now consistent stopped.
59
In Figure 4-30 we can choose to remove the relationship from the consistency group before we delete it. This will still delete the relationship but it removes the relationship from the consistency group before deleting it.
60
After we have selected to create a new consistency group we click Go.. In Figure 4-32 we name our consistency group and select if we want to have it as an intracluster or intercluster consistency group.
61
We have given our consistency group the name ITSO_SERVER_GRP and it will be an intercluster relationship, since we know the relationship is between two SVC clusters. When we have configured the consistency group we also have the opportunity to add already configured relationships to it. The relationship and the consistency group need to have the same type of configuration and that is intercluster or intracluster. In Figure 4-33 on page 62 we already have a relationship that is not in a consistency group and we select that we want to add it as a member in our ITSO_SERVER_GRP consistency group.
If we do not select any relationship for our consistency group it will be defined as empty, we can then add relationship(s) to it at our convenience. In Figure 4-34 we see a summary of our consistency group.
After clicking Finish our consistency group is created, but as we can see in Figure 4-35 on page 63, the state of the consistency group is consistent stopped. This is because the relationship we added to the consistency group was in a consistent stopped state. Consistency groups enter the state of the first relationship that is added to the 62
SVC 4.2.1 Advanced Copy Services
group, and after that you cannot add a relationship of a different state than the consistency group already has.
We start by selecting the consistency group that we want to start the copy process on and the options as in Figure 4-37 on page 64.
63
Figure 4-37 Select options on how we will start the copy process
As before, this copy relationship and the VDisks in that relationship are in sync. Figure 4-38 shows successful start of copy process on the ITSO_SERVER_GRP consistency group.
64
In this case we do not enable write access to the secondary, but we select Go to stop the copy process.
65
After we have clicked on Go we enter the new name into the new name field, as shown in Figure 4-43.
66
We verify that the status is consistent synchronized and we can also see that the Primary is the Master VDisk, so the copy direction is from master to auxiliary. We select the consistency group that we want to change the copy direction on and highlight Switch Copy Direction and click on Go as shown in Figure 4-45 on page 67.
The next screen (Figure 4-46) shows us that this is the Primary VDisk and asks us if we would like to change that copy direction. If we choose the same current copy direction this command has no effect on the copy state. We select to change the Primary VDisk from Master to auxiliary and therefore select the Primary VDisk to be the auxiliary under new copy direction as shown in Figure 4-46.
67
We have now changed our Remote copy direction. Primary is now auxiliary as in Figure 4-47 on page 68. This command does not check if the secondary VDisk is mapped to a host or the host is actually sending I/Os to the primary VDisk when we make the change. So it is recommended to have the system administrator verify that all I/O is stopped when we issue the switch copy direction command.
IBM_2145:ITSOCL2:admin>svcinfo lsclustercandidate id configured cluster_name 0000020068203A42 no ITSOCL3 We can see that this SVC cluster is not configured so our SVC cluster candidate is not already configured as our partner. Only one cluster partnership is available for each cluster.
>>- svctask -- -- mkpartnership -- -----------------------------> >--+-----------------------------------+-- ---------------------> '- -bandwidth -- bandwidth_in_mbps -' >--+- remote_cluster_id ---+----------------------------------->< '- remote_cluster_name -' This creates a one-way partnership between our production cluster and the disaster/recovery cluster. To complete the two-way partnership, the equivalent mkpartnership command must be issued on the disaster/recovery cluster. We create the partnership using the default bandwidth , that is 50 MBps, and our remote cluster is called ITSOCL3. Example 4-3 shows the command used on the production SVC cluster.
Example 4-3 Creation of partnership with ITSOCL3.
IBM_2145:ITSOCL2:admin>svctask mkpartnership ITSOCL3 Now we have partially created the partnership. We can see that this is partially created by issuing the command lscluster -delim : ITSOCL3 . See Example 4-4.
Example 4-4 Partially configured partnership.
IBM_2145:ITSOCL2:admin>svcinfo lscluster -delim : ITSOCL3 id:0000020068403A42 name:ITSOCL3 location:remote partnership:partially_configured_local bandwidth:50 We logon to ITSOCL3 ( the remote cluster) and complete the creation. We issue the same command as before svctask mkpartnership ITSOCL2 and then the svcinfo lscluster -delim : ITSOCL2 to see the status of the partnership as in Example 4-5.
69
IBM_2145:ITSOCL3:admin>svctask mkpartnership ITSOCL2 IBM_2145:ITSOCL3:admin>svcinfo lscluster -delim : ITSOCL2 id:000002006B603A38 name:ITSOCL2 location:remote partnership:fully_configured bandwidth:50 Now we have created our fully configured partnership between ITSOCL2 and ITSOCL3 with a bandwidth of 50 MBps.
>>- svctask -- -- chpartnership -- -----------------------------> >-- -bandwidth -- bandwidth_in_mbps -- -------------------------> >--+- remote_cluster_id ---+----------------------------------->< '- remote_cluster_name -' We can change the parameters of the cluster link without stopping the active copy process. We might want to increase the bandwidth that background copy is allowed to use from the default value of 50 Mbps to 75 MBps. This is shown in Example 4-7.
Example 4-7 Changing bandwidth between clusters from 50 to 75 MB/s.
IBM_2145:ITSOCL2:admin>svctask chpartnership -bandwidth 75 ITSOCL3 IBM_2145:ITSOCL2:admin>svcinfo lscluster ITSOCL3 id 0000020068403A42 name ITSOCL3 location remote partnership fully_configured bandwidth 75
>>- svctask -- -- rmpartnership -- -----------------------------> >--+- remote_cluster_id ---+----------------------------------->< '- remote_cluster_name -' When deleting a copy partnership we need to delete the partnership from both the local and the remote clusters. From the cluster we are logged on we issue the rmparntership
70
command, we use the remote clusters name in the command as shown in Example 4-9 on page 71. After issuing the rmpartnership command we logon to the remote cluster to complete the deletion of the partnership
Example 4-9 Removing partnership.
>>- svctask -- -- mkrcrelationship -- --------------------------> >-- -master --+- master_vdisk_id ---+-- ------------------------> '- master_vdisk_name -' >-- -aux --+- aux_vdisk_id ---+-- ------------------------------> '- aux_vdisk_name -' >-- -cluster --+- cluster_id ---+-- ----------------------------> '- cluster_name -' >--+------------------------+-- --------------------------------> '- -name -- new_name_id -' >--+-----------------------------------------+-- ---------------> '- -consistgrp --+- consist_group_id ---+-' '- consist_group_name -' >--+---------+-- --+-----------+------------------------------->< '- -sync -' '- -global -'
71
Note: If there is a consistency group already created we can add a relationship to a consistency group in the same step, using the -consistgrp parameter.
When using the mkrelationship command we need to have names and/or ids of the VDisks and clusters we are using. For more detailed information about certain aspects of the command it can be found in the CLI command guide1. Our command will look like that shown in Example 4-11.
Example 4-11 Creating the relationship.
IBM_2145:ITSOCL3:admin>svctask mkrcrelationship -master ITSO_MM_S01 -aux ITSO_MM_T01 -cluster ITSOCL3 -name ITSO_SERVER_01 -sync RC Relationship, id [0], successfully created Now we have created a fully configured relationship between ITSO_MM_S01 and ITSO_MM_T01, but the copy process is not started. The VDisks are in sync and are only waiting for the copy process to be started, see Example 4-12.
Example 4-12 State of the relationship.
IBM_2145:ITSOCL3:admin>svcinfo lsrcrelationship 0 id 0 name ITSO_SERVER_02 master_cluster_id 000002006B603A38 master_cluster_name ITSOCL2 master_vdisk_id 1 master_vdisk_name ITSO_MM_S02 aux_cluster_id 0000020068403A42 aux_cluster_name ITSOCL3 aux_vdisk_id 0 aux_vdisk_name ITSO_MM_T02 primary master consistency_group_id consistency_group_name state consistent_stopped bg_copy_priority 50 progress freeze_time status online sync in_sync copy_type metro
IBM Total Storage SAN Volume Controller Command Line Interface Users Guide, SC26-7903-02
72
>--+----------+-- --+- rc_rel_id ---+-------------------------->< '- -clean -' '- rc_rel_name -' To start the copy process for our relationship, containing the VDisks ITSO_MM_S01 and ITSO_MM_T01, we will use the startrcrelationship command. If we have already put the relationship into a consistency group we would have to start the consistency group with all the relationships in that group by using the startrcconsistgrp command. We have created the relationship and now we want to start copying, but we need to apply the -force parameter, because this parameter is required if consistency would be lost by starting a copy operation. Since we do not know if an I/O has occurred to the primary VDisk after we created the relationship we need to issue the command with the -force parameter. In general, the -force parameter is required if the relationship is in one of the following states: ConsistentStopped but not synchronized Idling but not synchronized The -force parameter is not required if the relationship is in one of the following states: InconsistentStopped InconsistentCopying ConsistentSynchronized Example 4-14 shows where our relationship ITSO_SERVER_01 is started.
Example 4-14 Starting the copy process within the relationship.
ITSO_SERVER_01
After we have started the relationship it will become consistent synchronized as shown in Example 4-15.
Example 4-15 State of the relation ship is now consistent synchronized.
IBM_2145:ITSOCL2:admin>svcinfo lsrcrelationship ITSO_SERVER_01 id 2 name ITSO_SERVER_01 master_cluster_id 000002006B603A38 master_cluster_name ITSOCL2 master_vdisk_id 2 master_vdisk_name ITSO_MM_S001 aux_cluster_id 0000020068403A42 aux_cluster_name ITSOCL3 aux_vdisk_id 4 aux_vdisk_name ITSO_MM_T001 primary master consistency_group_id consistency_group_name state consistent_synchronized bg_copy_priority 50 progress freeze_time status online sync
73
copy_type metro
>>- svctask -- -- stoprcrelationship -- --+-----------+-- ------> '- -access -' >--+- rc_rel_id ---+------------------------------------------->< '- rc_rel_name -' The stoprcrelationship command applies only to a stand-alone relationship. If the relationship is part of a consistency group, the group needs to be stopped and therefore all relationships within that group too. We can issue this command to stop a relationship that is copying from primary to secondary VDisks. If the relationship is in a consistent state, that is; consistent stopped, consistent synchronized, or consistent disconnected state, we can use the -access parameter to enable write access to the secondary VDisk.
>>- svctask -- -- chrcrelationship -- --------------------------> >--+- -name -- new_name_arg -----------------+------------------> +- -force --------------------------------+ '- -consistgrp --+- consist_group_id ---+-' '- consist_group_name -' >--+- rc_rel_id ---+------------------------------------------->< '- rc_rel_name -' When we need to change relationship we use the command svctask chrcrelationship We can change name and add/remove relationships from the consistency group using this command. We can remove a relationship from a consistency group by specifying the -force parameter and the name or ID of the relationship. We start by adding a relationship to an existing consistency group with the name of ITSO_SERVER_GRP as in Example 4-18.
Example 4-18 adding a stand alone relationship to consistency group.
IBM_2145:ITSOCL2:admin>svctask chrcrelationship -consistgrp ITSO_SERVER_GRP ITSO_SERVER_01 Then we remove the relationship from the consistency group again as in Example 4-19.
74
IBM_2145:ITSOCL2:admin>svctask chrcrelationship -force ITSO_SERVER_01 This form of the modify relationship command succeeds in the connected or disconnected states. If the clusters are disconnected the relationship is only removed from the consistency group on the local cluster at the time the command is issued. When the clusters are reconnected the relationship is automatically removed from the consistency group on the other cluster. Alternatively, you can issue an explicit modify (chrcrelationship) command to remove the relationship from the group on the other cluster while it is still disconnected.
>>- svctask -- -- rmrcrelationship -- --+- rc_rel_id ---+------>< '- rc_rel_name -' When we delete a relationship we are only deleting the relationship between those two VDisks, it does not affect the VDisks themselves. It is not possible to delete a relationship if it is a member of a consistency group. We would have to remove it from the consistency group first and then delete it as shown in Example 4-21.
Example 4-21 Deleting a copy relationship
>>- svctask -- -- mkrcconsistgrp -- --+---------------------+---> '- -name -- new_name -' >-- --+--------------------------------+----------------------->< '- -cluster --+- cluster_id ---+-' '- cluster_name -'
Note: If we make a Metro Mirror or Global Mirror consistency group not using the -cluster (name or ID of the remote cluster) the consistency group will only be created on the local cluster. We will create a consistency group between ITSOCL2 and ITSOCL3 and implement the copy relationship (that we have already created) to that consistency group. We created the consistency group as shown in Example 4-23.
75
IBM_2145:ITSOCL2:admin>svctask mkrcconsistgrp -cluster ITSOCL3 -name ITSO_SERVER_GRP RC Consistency Group, id [255], successfully created This consistency group is now created but it has no relationship in it, and we can see that by looking closer at the relationship in Example 4-24.
Example 4-24 Showing the content of the consistency group
IBM_2145:ITSOCL2:admin>svcinfo lsrcconsistgrp ITSO_SERVER_GRP id 255 name ITSO_SERVER_GRP master_cluster_id 000002006B603A38 master_cluster_name ITSOCL2 aux_cluster_id 0000020068403A42 aux_cluster_name ITSOCL3 primary state empty relationship_count 0 freeze_time status sync copy_type empty_group To move a relationship between two consistency groups, you must issue the chrcrelationship command twice. Use the -force parameter to remove the relationship from its current group, and then use the -consistgrp parameter with the name of the new consistency group. Since our relationship was created as a standalone relationship it is not a member of a consistency group, so we only need to use the -consistgrp parameter as in Example 4-25.
Example 4-25 Adding relationship to consistency group.
IBM_2145:ITSOCL2:admin>svctask chrcrelationship -consistgrp ITSO_SERVER_GRP ITSO_SERVER_01 The content of our consistency group has changed as shown in Example 4-26.
Example 4-26 The consistency group now has a relationships member.
IBM_2145:ITSOCL2:admin>svcinfo lsrcconsistgrp ITSO_SERVER_GRP id 255 name ITSO_SERVER_GRP master_cluster_id 000002006B603A38 master_cluster_name ITSOCL2 aux_cluster_id 0000020068403A42 aux_cluster_name ITSOCL3 primary master state consistent_stopped relationship_count 1 freeze_time status online sync in_sync copy_type metro 76
SVC 4.2.1 Advanced Copy Services
RC_rel_id 0 RC_rel_name ITSO_SERVER_01 Note: If we try to add a relationship to a consistency group which has a different copy state, such as the relationship is stopped and the consistency group is synchronized, we will get an error message saying: The relationship cannot be added because the states of the relationship and the consistency group do not match.
>>- svctask -- -- startrcconsistgrp -- -------------------------> >--+--------------------------+-- --+----------+-- -------------> '- -primary --+- master -+-' '- -force -' '- aux ----' >--+----------+-- --+- rc_consist_group_id ---+---------------->< '- -clean -' '- rc_consist_group_name -'
When we start or stop a consistency group we are effecting all relationships in that group, hence the term consistency. It is possible to make changes to the consistency group within the start and stop commands, and this will be explained later. By issuing the startrcconsisgrp command we are given the following possibilities as parameters: -primary Which VDisk will become the primary VDisk in this relationship? Is it the master or the auxiliary that we want to be the active disk. -force Should we force the copy process to start? Do we know the state of the secondary VDisk, and can we start the copy process even if we know that we will loose consistency while the secondary is catching up with primary? -clean Is it a clean start? Clean in this sense means that any changes that have been made at the secondary are ignored, and only changes made at the primary are considered when synchronizing the primary and secondary VDisks. In our example we are starting the copy process by issuing the startrcconsistgrp command and stating that the primary will be the master VDisk. Example 4-28.
Example 4-28 Starting the copy process in the consistency group with master as primary disk.
IBM_2145:ITSOCL2:admin>svctask startrcconsistgrp -primary master ITSO_SERVER_GRP IBM_2145:ITSOCL2:admin>svcinfo lsrcconsistgrp ITSO_SERVER_GRP id 255 name ITSO_SERVER_GRP master_cluster_id 000002006B603A38
77
master_cluster_name ITSOCL2 aux_cluster_id 0000020068403A42 aux_cluster_name ITSOCL3 primary master state consistent_synchronized relationship_count 1 freeze_time status online sync copy_type metro RC_rel_id 0 RC_rel_name ITSO_SERVER_01 Now we have started the ITSO_SERVER_01 copy relationship in the ITSO_SERVER_GRP consistency group and the VDisks are in the state consistent synchronized.
>>- svctask -- -- stoprcrelationship -- --+-----------+-- ------> '- -access -' >--+- rc_rel_id ---+------------------------------------------->< '- rc_rel_name -' By issuing the stoprcconsistgrp command with the -access parameter, we will stop the copy process and enable write access to the secondary, This command will not change the copy directions, but the state of the consistency group will be idling, and that means that both VDisks have read/write access enabled, and no copy process is active. If we only issue the command stoprcconsistgrp the consistency group will stop mirroring between VDisks, but the secondary will still be in a read-only state. Example 4-30 is an example of how we used the stoprcconsistgrp with the -access command to stop the copy process and enable write access to the secondary VDisk. IBM_2145:ITSOCL2:admin>svctask stoprcconsistgrp -access ITSO_SERVER_GRP IBM_2145:ITSOCL2:admin>svcinfo lsrcconsistgrp ITSO_SERVER_GRP id 255 name ITSO_SERVER_GRP master_cluster_id 000002006B603A38 master_cluster_name ITSOCL2 aux_cluster_id 0000020068403A42 aux_cluster_name ITSOCL3 primary state idling relationship_count 1 freeze_time status sync in_sync copy_type metro RC_rel_id 0 78
SVC 4.2.1 Advanced Copy Services
RC_rel_name ITSO_SERVER_01 To change the copy direction follow the process in 4.3.15, Reversing copy directions on page 81.
>>- svctask -- -- chrcconsistgrp -- -- -name -- new_name_arg ---> >-- --+- rc_consist_group_name -+------------------------------>< '- rc_consist_group_id ---' When changing the consistency group, all we are changing is the name. A consistency group is only a name until it has got a relationships member. In Example 4-31 we are changing the consistency group name from ITSO_SERVER_GRP to ITSO_SILENT.
Example 4-31 Changing the name of the consistency group
IBM_2145:ITSOCL2:admin>svctask chrcconsistgrp -name ITSO_SILENT ITSO_SERVER_GRP Now our consistency group has the name ITSO_SILENT.
>>- svctask -- -- rmrcconsistgrp -- --+----------+-- -----------> '- -force -' >--+- rc_consist_group_id ---+--------------------------------->< '- rc_consist_group_name -' If we are deleting a consistency group that is not empty we can use the -force parameter to delete the consistency group. This will change all relationships in that consistency group to a standalone relationship. The state of the relationship is not changed by deleting the consistency group. In the examples that follow we delete a consistency group with two consistent synchronized relationships in it. First we check the status of the consistency group called ITSO_SILENT, and in this group we have two relationships called ITSO_SERVER_01 and ITSO_SERVER_02. As shown in Example 4-33 the copy status is consistent synchronized.
Example 4-33 Checking status of the relationships within the consistency group.
79
name ITSO_SILENT master_cluster_id 000002006B603A38 master_cluster_name ITSOCL2 aux_cluster_id 0000020068403A42 aux_cluster_name ITSOCL3 primary master state consistent_synchronized relationship_count 2 freeze_time status online sync copy_type metro RC_rel_id 2 RC_rel_name ITSO_SERVER_01 RC_rel_id 9 RC_rel_name ITSO_SERVER_02 Now we delete the consistency group as in Example 4-34.
Example 4-34 Deleting the consistency group.
IBM_2145:ITSOCL2:admin>svctask rmrcconsistgrp -force ITSO_SILENT And by checking the status of the relationships we now see that they have not changed state, both are consistent synchronized. Example 4-35 and Example 4-36.
Example 4-35 Status of ITSO_SERVER_01 copy relationship.
IBM_2145:ITSOCL2:admin>svcinfo lsrcrelationship ITSO_SERVER_01 id 2 name ITSO_SERVER_01 master_cluster_id 000002006B603A38 master_cluster_name ITSOCL2 master_vdisk_id 2 master_vdisk_name ITSO_MM_S001 aux_cluster_id 0000020068403A42 aux_cluster_name ITSOCL3 aux_vdisk_id 4 aux_vdisk_name ITSO_MM_T001 primary master consistency_group_id consistency_group_name state consistent_synchronized bg_copy_priority 50 progress freeze_time status online sync copy_type metro
Example 4-36 Status of ITSO_SERVER_02 copy relationship.
master_cluster_name ITSOCL2 master_vdisk_id 9 master_vdisk_name ITSO_GLOBAL aux_cluster_id 0000020068403A42 aux_cluster_name ITSOCL3 aux_vdisk_id 5 aux_vdisk_name ITSO_GLOBAL primary master consistency_group_id consistency_group_name state consistent_synchronized bg_copy_priority 50 progress freeze_time status online sync copy_type metro
IBM_2145:ITSOCL2:admin>svcinfo lsrcconsistgrp ITSO_SERVER_GRP id 255 name ITSO_SERVER_GRP master_cluster_id 000002006B603A38 master_cluster_name ITSOCL2 aux_cluster_id 0000020068403A42 aux_cluster_name ITSOCL3 primary master state consistent_synchronized relationship_count 1 freeze_time status online sync copy_type metro RC_rel_id 0 RC_rel_name ITSO_SERVER_01 And now we issue the switch command (Example 4-38).
Example 4-38 Issuing the switch copy directions command
IBM_2145:ITSOCL2:admin>svctask switchrcconsistgrp -primary aux ITSO_SERVER_GRP And then check the status after issuing the command, see Example 4-39.
Example 4-39 The state of the consistency group after the switch command.
81
name ITSO_SERVER_GRP master_cluster_id 000002006B603A38 master_cluster_name ITSOCL2 aux_cluster_id 0000020068403A42 aux_cluster_name ITSOCL3 primary aux state consistent_synchronized relationship_count 1 freeze_time status online sync copy_type metro RC_rel_id 0 RC_rel_name ITSO_SERVER_01 Now we have switched copy directions and the primary disk is now the auxiliary Vdisk.
82
The server loses access to its LUNs and the SVC cannot see its MDisks from that subsystem as shown in Figure 4-49.
83
If the disks on Server 1 become unavailable, we can perform a failover to the standby server at the disaster/recovery site and start using the secondary VDisks. Here are some guidelines which we can follow: 1. Terminate all connections from Server 1 to SVC cluster 1 VDisks If we can access SVC cluster 1 it is best to terminate all connections between server 1 and the SVC cluster. When the repair is complete we do not have to worry about conflicts with the old disks. 2. Stop all copy process that involve this server a. Log on to the remote SVC cluster and stop all copy services. i. By doing that we are able to grant write access to the secondary VDisk. b. If we lose connection to our MDisks the copy services automatically stops but that is because the SVC sees this as a hardware failure. i. You could also reverse the mirror and by that give read/write access to the target LUNs, but if the source Managed Disk Group (MDG) is offline, or has a hardware failure, you cannot change the copy direction. 3. Map VDisks from SVC cluster 2 to server B 4. Mount VDisks and restart the application. Note: The automation using CLI is mention in chapter 9 in this Redbook.
call site B. In site B we have standby server B and a Metro Mirror partner to our production SVC. In Figure 4-50 we can see a Metro Mirror consistency group called ITSO_SERVER_GRP, that is running on our production SVC. In this consistency group we have two active relationships and the state is consistent synchronized.
In our scenario the subsystem on site A went offline so all our MDisks were unavailable at that site. Our copy process will then automatically stop as shown in Figure 4-51 on page 85.
At this point the server cannot see its disks at the production site and we want to perform a failover to the disaster/recovery site. We will now log on to the SVC cluster located at the disaster/recovery site and make the secondary VDisks available for read/write access. Even though the status of the relationship is consistent stopped we need to stop the copy process to be able to enable read/write access to the VDisks in the consistency group. The state of the consistency group prevents us from using the Switch Copy Directions command. In Figure 4-52 we have clicked the Metro & Global Mirror consistency groups from the main menu and there we can see the current consistency groups this cluster partnership has. From the drop down menu we can select to stop the copy process on the selected consistency group.
85
When we have selected to stop the copy process and clicked Go, we will get the chance to change the mode of the secondary VDisks to enable write access, as shown in Figure 4-53 on page 86.
Figure 4-53 Stopping the copy process and enabling write access to secondary.
By setting a checkmark in the enable write access checkbox, and selecting OK, we are enabling write access to all VDisks in this consistency group. All relationships in the consistency group will become idle and therefore the consistency group itself. Figure 4-54 shows the status of the consistency group after we have enabled write access.
86
Now we can map the secondary VDisks to our disaster/backup server. After mapping the disk a server administrator needs to check if his SDD driver can see the disks and then restart the application. After fixing the problem on the production site all errors regarding the copy relationship need to be cleared before you can start the copy process again. When we have enabled write access to the secondary VDisk, and all errors are fixed, we can copy from the disaster/recovery site to the production site, and have the auxiliary as our primary disk. When the production environment is stabilized there is a need for a service window for the server to switch the copy directions and run production on the production site.
IBM_2145:ITSOCL3:admin>svcinfo lsrcconsistgrp 255 id 255 name senegal master_cluster_id 0000020068203A42 master_cluster_name ITSOCL3 aux_cluster_id 000002006B403A38 aux_cluster_name ITSOCL2 primary master state consistent_synchronized relationship_count 2
Chapter 4. Implementing Remote Copy
87
freeze_time status online sync copy_type metro RC_rel_id 0 RC_rel_name senegal_r01 RC_rel_id 1 RC_rel_name senegal_r02 On the server everything is normal but now something happens to our subsystem and we can see that state and status has changed. The CLI even shows us which VDisk (primary or the secondary) has a problem. And as soon as something happens to either disk the copy process stops. See Example 4-41.
Example 4-41 Copy stops
IBM_2145:ITSOCL3:admin>svcinfo lsrcconsistgrp 255 id 255 name senegal master_cluster_id 0000020068203A42 master_cluster_name ITSOCL3 aux_cluster_id 000002006B403A38 aux_cluster_name ITSOCL2 primary master state consistent_stopped relationship_count 2 freeze_time 2007/10/23/14/03/02 status primary_offline sync in_sync copy_type metro RC_rel_id 0 RC_rel_name senegal_r01 RC_rel_id 1 RC_rel_name senegal_r02 When this happens we need to enable write access to the secondary VDisk in this relationship, so we logon to the disaster/recovery cluster, in our case ITSOCL2. The main command to use for that is stoprcconsistgrp with the -access parameter. Note: stoprcconsistgrp with -access option is the command to be used to enable write access to the secondary VDisks in the group, if the group is in a consistent state. When a consistency group is in a consistent state (for example, in the consistent stopped, consistent synchronized, or consistent disconnected state) you can issue the -access parameter with the stoprcconsistgrp command to enable write access to the secondary virtual disks within that group. See Table 4-2 for examples when to use the -access option.
Table 4-2 Show us the criteria needed to use the -access option. Initial state InconsistentStopped InconsistentCopying ConsistentStopped Final state InconsistentStopped InconsistentStopped ConsistentStopped Notes -access permitted
88
Notes -access permitted -access permitted A relationship may move to stopped state when reconnected. On the cluster issuing the svctask stoprcconsistgrp command On the disconnected cluster On the cluster issuing the svctask stoprcconsistgrp command, -access permitted On the disconnected cluster, -access permitted.
InconsistentDisconnected
InconsistentStopped
InconsistentDisconnected ConsistentDisconnected
Unchanged ConsistentStopped
ConsistentDisconnected
Unchanged
in our case we use svctask stoprcconsistgrp -access senegal and the outcome is shown in Example 4-42. Notice that it is in idling state.
Example 4-42 Idling state
IBM_2145:ITSOCL2:admin>svcinfo lsrcconsistgrp 255 id 255 name senegal master_cluster_id 0000020068203A42 master_cluster_name ITSOCL3 aux_cluster_id 000002006B403A38 aux_cluster_name ITSOCL2 primary state idling relationship_count 2 freeze_time status sync in_sync copy_type metro RC_rel_id 4 RC_rel_name senegal_r01 RC_rel_id 22 RC_rel_name senegal_r02
Now we have enabled write access to the secondary VDisk so we can map the VDisk to the disaster/recovery server with the svctask mkvdiskhostmap and the server administrator can check if he can se the disks via the SDD driver.
89
All CLI commands can be found, along with a detailed description in the IBM System Storage SAN Volume Controller Command-Line Interface Users Guide, SC26-7903-02. chpartnership chrcconsistgrp chrcrelationship mkpartnership mkrcconsistgrp mkrcrelationship rmpartnership rmrcconsistgrp rmrcrelationship startrcconsistgrp startrcrelationship stoprcconsistgrp stoprcrelationship switchrcconsistgrp switchrcrelationship
90
Chapter 5.
FlashCopy
In this chapter we discuss SVC FlashCopy, which is the Point-in-Time copy capability of the SVC. FlashCopy is used to create instant copies of VDisks. We cover the characteristics of FlashCopy, and how to implement it to solve different problems to ensure we meet our Business Continuity objectives.
91
FlashCopy can have many uses. One obvious use is the backup of a consistent set of data without the need for a long backup window. The application manipulating the data only needs to make sure the data is consistent; and only needs to be suspended for a short period of time. Once the copy is started the backup application can access the target while the applications can resume manipulating the live data. No full volume copy is needed. One very useful case for FlashCopy in our Business Continuity strategy is to create a full consistent copy of production data for a given point-in-time at a remote location. Here, we combine Remote Copy and FlashCopy, where we take a FlashCopy from the Remote Copy secondary VDisks. The usage case could be either to take a consistent backup of our production data on the second location or to have a clone of the data for a given point-in-time available in case our production data gets invalidated due to a logical error. FlashCopy can also be used as a safety net for operations which could make copies of data inconsistent for a longer than normal period of time. For example, if Global Mirror gets out-of-synchronization for some reason, the auxiliary VDisk is still consistent in itself, but the process of resynchronizing renders the auxiliary VDisk inconsistent as long as it is not finished. To retain a consistent copy of the data of the auxiliary VDisk while it is being synchronized and thus is inconsistent, a FlashCopy of this VDisk can be created. Another use is the creation of clones of data for application development testing, or application integration testing. Here, full copies of data would be useful. One other use would be if a set of data has to be used for different purposes, for example a FlashCopy database could be used for data mining.
Chapter 5. FlashCopy
93
Source Vdisk m1
Mapping m1
Target Vdisk m1
time T0
Once associated with the mapping, the VDisks get a new responsibility, one VDisk becomes a source VDisk and one VDisk becomes a target VDisk. This mapping of VDisks gets a FlashCopy Mapping Name, which can be seen as an alias that we use to manage the source and target VDisk pairs for FlashCopy tasks, instead of using the names of the VDisks. The source VDisk provides the data to be copied to the target VDisk. The target VDisk is used to present the data of the source VDisk for the point-in-time when the FlashCopy was started, as long as the mapping exists and not all data of the source VDisk got copied to the target VDisk. Additionally, the entire source VDisk can get copied to the target VDisk using a background copy process. Once this is finished the mapping is no longer needed for the target VDisk to present the data. For a single VDisk there is a limit of 16 mappings to be shared between the use of this VDisk in mappings for MTFC and CFC. Any combination of mappings representing MTFC and CFC in a cascading tree may not exceed 16.
94
Source Vdisk m1
Source Vdisk m2
Mapping m1
Mapping m2
Target Vdisk m1
Target Vdisk m2
time T0
Data which has to be consistent can span multiple VDisks. For instance, database management system (DBMS) logs reside on a different VDisk than the database itself. The problem to take care of is called dependent writes. These occur, for instance, when database logs are written before (to indicate a database update is about to take place) and after (to log a successful write operation to the database) the database itself gets updated. If we were to start a FlashCopy of the involved VDisks without ensuring consistency across VDisks, it could happen that the FlashCopy target contains both written logs but not the database update. The logs in the FlashCopy target would indicate that the write I/O has occurred, but the actual write I/O would be missing from the target VDisk which holds the database, thus rendering the FlashCopy target data inconsistent from a DBMS point of view. Mappings which are not put into a consistency group are reported to be members of the pseudo consistency group 0.
Chapter 5. FlashCopy
95
background copy enabled would be that the target VDisk would become a real (independent from the source VDisk) clone of the FlashCopy Mapping source VDisk. The background copy rate is a property of a FlashCopy Mapping which is expressed as a value between 0 and 100 percent. It can be changed in any FlashCopy Mapping state and can be different in the Mappings of one Consistency Group. With a value of 0, background copy is disabled. Table 5-1 shows the relationship of the background copy rate value to the attempted number of grains to be split per second. Grains are discussed in 5.3.2, What is a grain? on page 101.
Table 5-1 Background copy rate/copy speed relationship Background copy rate value in % 1-10 11-20 21-30 31-40 41-50 51-60 61-70 71-80 81-90 91-100 Data copied/sec 128KB 256KB 512KB 1MB 2MB 4MB 8MB 16MB 32MB 64MB 256KB Grains split/sec 0.5 1 2 4 8 16 32 64 128 256 64KB Grains split/sec 2 4 8 16 32 64 128 256 512 1024
The SVC will try to achieve these copy rates. The background copy rate and the foreground copies share the same infrastructure. If the bandwidth needed (to copy data to the underlying managed disks provided by back end storage subsystems) is used up, a latency increase and a reduction of throughput on both the foreground copies and the background copy can occur. The degradation will be graceful. The background copy is performed by both nodes of the I/O group providing the source VDisk.
96
Mapping 1
Mapping 2
Mapping 16
Target Vdisk m1
Target Vdisk m2
...
For each source VDisk, up to 16 different mappings are possible. These mappings are independently controllable from each other. For instance, the background copy priority can be different for these mappings. The implementation of MTFC introduces some dependencies, discussed in 5.5, Dependencies between FlashCopy Mappings on page 110. MTFC Mappings can be members of the same or different consistency groups. In a case where all the mappings are in the same consistency group, the result of starting the consistency group will be multiple identical target VDisks.
Chapter 5. FlashCopy
97
Mapping m1
Mapping m2
Mappings m3-16
Source Vdisk m1
Vdisk t m1 s m2
Vdisk t m2 s m3-16
...
Vdisk t m3-16
The use of consistency groups is restricted when using CFC. A consistency group serves the purpose of invoking FlashCopy Mappings at the same point-in-time.
Within the same consistency group it is not possible to have mappings where:
The source VDisk of one mapping is the target of another mapping. The target VDisk of one mapping is the source VDisk for another mapping. These combinations would not be useful because within a consistency group there is no way to have the mappings established in a certain order, which renders the content of the target VDisks undefined (for instance, was the first mapping established before the target VDisk of the first mapping that acts as a source VDisk for the second mapping?). Even if there was a way to ensure an order in which the mappings are established within a consistency group, the result would be equal to MTFC (two VDisks which hold the same target data for one source VDisk). In other words, a cascade is useful when we want to copy VDisks in a certain order (and copying the changed content targets of FlashCopies) rather than at the same time in an undefined order (from within one single consistency group).
98
Source Vdisk m1 m2
Mapping m1
Mapping m2 Mapping m3
Target Vdisk m1
Target Vdisk m3
As we can see in this picture, what we call a target VDisk or a source VDisk is in reality a VDisk which can be in the role of being the source, the target or a source and a target, if it is a member of one or more FlashCopy Mappings.
Chapter 5. FlashCopy
99
Start Mapping m1: copy all data Restart Mapping m1: copy changed data only
Target Vdisk m1
Target Vdisk m1
T0 (1)
time
T0 (2)
The amount of data to be copied depends on the grain size as well: if the grain size is 64KB (as compared to 256KB), there might be less data to copy in order to get a full independent copy of the source again. A difference value is provided in the query of a mapping, which makes it possible to know how much data has changed, which would need to be copied once the IFC is restarted. The difference value is the percentage (0% - 100%) of how many grains have been changed and would need to be copied to the target VDisk in order to get a fully independent copy of the source VDisk again. This functionality is needed in cases where we want to have, for example, a full copy of a VDisk for disaster tolerance, and/or application testing and/or data mining. It greatly reduces the time to establish a full copy of the source data again as a new snapshot, once the first background copy completed. In cases where customers maintain full independent copies of data as part of their disaster tolerance strategy, using IFC can be of benefit for their Business Continuity goals.
100
Chapter 5. FlashCopy
101
256
FlashCopy
64
256
64
102
Note: For the FlashCopy Mapping address space, the amount of mappings has to be taken into account. Each mapping target for a FlashCopy uses up bitmap space. This means for MTFC, that even if there is only one source VDisk involved, multiple targets will consume the same amount of bitmap space as the same number of targets of independent FlashCopy Mappings would use up.
Chapter 5. FlashCopy
103
5.3.6 How can we specify and view the bitmap space on an I/O group
The user can increase and decrease the amount of memory used on nodes for keeping FlashCopy and Remote Copy bitmaps at runtime. For example, for FlashCopy we specify the amount of bitmap space of 20MB for io_grp0, shown in Example 5-1 on page 104 and list it.
Example 5-1 Specifying and viewing the bitmap space located on an I/O group
admin>svctask chiogrp -feature flash -size 20 io_grp0 admin> admin>svcinfo lsiogrp 0 id 0 name io_grp1_r node_count 2 vdisk_count 382 host_count 4 flash_copy_total_memory 20.0MB flash_copy_free_memory 20.0MB remote_copy_total_memory 20.0MB remote_copy_free_memory 19.9MB
104
3855
FlashCopy consistency groups per cluster FlashCopy VDisk space per I/O group
128 1024TB
Chapter 5. FlashCopy
105
Maximum 512
Notes Due to the time taken to prepare a consistency group with a large number of mappings.
Copying
The FlashCopy has been started. From now on, the target VDisk presents the content of the source VDisk for the point in time when the FlashCopy was started (but is not holding all the data yet).
Idle/Copied
VDisks are members of a mapping but behave independently. The target represents a full copy of the source for the point in time when the FlashCopy was started. On both VDisks, write- and read caching is enabled.
Stopping
The mapping is in the process of transferring data to a mapping which depends on it.
Stopped
The data on the target VDisk is lost and the target VDisk is put offline. To regain access to the target VDisk, the mapping must be either deleted or it must be started again.
Suspended
The FlashCopy Mapping was in the Copying or the Stopping state and the target has been flashed from the source. The access to the metadata has been lost resulting in both the source VDisk and the target VDisk going offline.
Preparing
The FlashCopy Mapping gets prepared for a FlashCopy start while I/O still continues to the source VDisk. This includes flushing the modified write data of the source VDisk from the cache, placing the cache for the source VDisk into write through mode, and discarding any data associated with the target VDisk from the cache.
Prepared
The FlashCopy Mapping is ready to be started.
106
Table 5-4 on page 107 summarizes the FlashCopy Mapping states and the corresponding cache states for the VDisks in a FlashCopy Mapping.
Table 5-4 FlashCopy Mapping states Source VDisk State Idling/Copied Copying Stopped Stopping Mapping State online online online online Cache State write-back write-back write-back write-back Target VDisk Mapping State online online offline Online if copy complete, offline if not offline online, but not accessible online, but not accessible Cache State write-back write-back n/a n/a
Create
Places the FlashCopy Mapping into the Idle/Copied state. It creates a new FlashCopy Mapping between two VDisks, assigning roles to them, one now being a source VDisk and one being the target VDisk for the new mapping.
Prepare
Places the FlashCopy Mapping in the Preparing state. The prepare command is directed to a consistency group (single mappings are members of consistency group 0, in this case the command is targeted at the mapping name for the given FlashCopy Mapping). Note: Even though the FlashCopy Mapping has not been started yet, the target VDisk has to be considered corrupt from now on, since beginning with the act of preparing, cached writes are discarded.
Flush Done
Places the FlashCopy Mapping in the Prepared state. This is done once all cached data from the source VDisk has been flushed and all cached data of the target VDisk has been invalidated.
Start
Places the FlashCopy Mapping in the Copying state. The FlashCopy Mapping is being started. The start of the FlashCopy Mapping is synchronized (ensuring consistency across all involved mappings in the consistency group).
Chapter 5. FlashCopy
107
Stop
Places the FlashCopy Mapping in either the Stopped or Stopping state. A FlashCopy Mapping can be stopped by a user command or by an I/O error.
Stop Complete
Places the FlashCopy Mapping in the Stopped state. It occurs as a transition from Stopping to Stopped as a result of a complete copy operation to break dependencies between FlashCopy Mappings.
Flush Failed
Places the FlashCopy Mapping in the Stopped state. This happens when the flush of data from the cache fails.
Copy Complete
Places the FlashCopy Mapping in the Idle/Copied state. This happens once every grain has been split. With the autodelete feature being used, the FlashCopy Mapping will be deleted once it completes the copy. Without it, the FlashCopy Mapping will remain and can be prepared and started again. The copy complete event will not occur while there are still mappings which depend on it in the copying state.
Modify
This does not place the FlashCopy Mapping in another state. Many properties can now be modified - name, consistency group, background copy rate, cleaning rate,and the autodelete attribute.
Delete
The Delete event deletes the FlashCopy Mapping. Figure 5-7 on page 109 is the FlashCopy Mapping state diagram. It illustrates which state a mapping can be in, and what events are responsible for a state change.
108
S TOPPING
Bitmap Online
Stop
S USPENDED
Bitmap Offline
Prepare
Flush Failed
Stop Stop
Bitmap Online
Bitmap Offline
IDLE_OR_C OPIED
Prepare
Flush Done
Start
Copy Complete
Legend
FlashCopy Event
Chapter 5. FlashCopy
109
S USPENDED C OPYING S USPENDED S TOPPING S TOPPED IDLE_C OPIED IDLE_OR_C OPIED IDLE_OR_C OPIED P REPARING S TOPPED P REPARED P REPARING IDLE_OR_C OPIE D P REPARED P REPARED C OPYING C OPYING S TOPPING S TOPPED IDLE _OR_C OPIED
Legend
110
Chapter 5. FlashCopy
111
The mapping being in the first position, at the head of the inked list (not necessarily the one being inserted first) does not depend on other mappings. Every other succeeding mapping depends on the preceding mappings in the list. The following illustrations show how mappings get inserted into a linked list, depending upon the being set up as MTFC or CFC or both. A simple MTFC is shown in Figure 5-9 on page 112.
Vdisk 1 s m1, s m2
Mapping m1 started at t1
Mapping m2 started at t2
Vdisk 2 t m1
Vdisk 3 t m2
time
Both mappings, sharing the same source VDisk result in an MTFC which results in the linked list consisting of two mappings, shown in Figure 5-10. These lists start with the leftmost mapping, which is called the head of the list. The arrow originates from the mapping which is dependent on the mapping to which the arrow points to.
m2 started at t2
m1 started at t1
The mapping m2, which was started after mapping m1, precedes mapping m1 in the list. Mapping m1 now depends on mapping m2. This means, for any grains not located in mapping m1, the target VDisk of mapping m2 gets asked. Figure 5-11 on page 113 shows which VDisks provide grains for VDisk 2. 112
SVC 4.2.1 Advanced Copy Services
Vdisk 1 provides grains to Vdisk 2 in case Vdisk 3 could not provide the grain
Vdisk 1 s m1, s m2
Vdisk 3 t m2
Vdisk 2 t m1
Mapping m1 started at t1
Mapping m2 started at t2
Vdisk 1 s m1
Vdisk 2 t m1 s m2
Vdisk 3 t m2
time
m1 started at t1
m2 started at t2
Chapter 5. FlashCopy
113
Vdisk 1 provides grains to Vdisk 3 in case Vdisk 2 could not provide the grain
Vdisk 1 s m1
Vdisk 2 t m1 s m2
Vdisk 3 t m2
The rules about inserting mappings to the list also apply when combining MTFC and CFC. An example of such a tree is shown in Figure 5-15.
Vdisk 1 s m1, s m2
Mapping m1 started at t1
Mapping m2 started at t2
Mapping m3 started at t3
Mapping m4 started at t4
Vdisk 2 t m1
Vdisk 3 t m2 s m3
Vdisk 4 t m3 s m4
Vdisk 5 t m4
time
114
m2 started at t2
m3 started at t3
m4 started at t4
m1 started at t1
Chapter 5. FlashCopy
115
>>- svcinfo -- -- lsvdiskdependentmaps --+- vdisk_id ---+------>< '- vdisk_name -' We can as well specify the mapping using the command is svcinfo lsfcmapdependentmaps, which displays all the FlashCopy Mappings that are dependent on the user specified mapping. The syntax is shown in Example 5-3.
Example 5-3 svcinfo lsfcmapdependentmaps
>>- svcinfo -- -- lsfcmapdependentmaps -- --+----------+-- -----> '- -nohdr -' >--+-----------------------+-- --+- fc_id ---+----------------->< '- -delim -- delimiter -' '- fc_name -'
116
Chapter 6.
Implementing FlashCopy
In this chapter we show how to use FlashCopy in three different cases using the SVC GUI, and in one case using the CLI. First we show a basic FlashCopy, secondly a Multiple Target FlashCopy and the third a Cascaded FlashCopy which uses the Incremental FlashCopy feature as well. The example using the CLI is FlashCopy using Metro Mirror secondary VDisks as the FlashCopy source VDisks.
117
The first screen of the Create a Mapping wizard is shown in Figure 6-2 on page 119. It gives an overview over the steps we go through to create the mapping.
118
The wizard is very straight forward and consists of setting the properties of the FlashCopy Mapping, choosing the VDisks to be used and to verify the settings. The first step, to set the properties of the FlashCopy mapping, is shown in Figure 6-3 on page 120.
119
We can choose the FlashCopy Mapping Name, or let the system decide. We have not defined a Consistency Group yet, so the related input field Consistency Group Name is empty. Therefore, this mapping will be associated with Consistency Group 0, which is used for stand-alone mappings. The Background Copy Priority specifies the speed of the background copy the SVC attempts to achieve, in case we would want to have the source copied to the target in fully. The possible speed is from 128 KBps at 10% priority, up to 64 MB/s at 100% priority. Priority 50 has a target copy rate of 2 MBps. Refer to 5.2.3, FlashCopy background copy on page 95 for a discussion about background copy. For our purpose, we chose NOCOPY, which means no data gets copied by the background copy process. The Cleaning Priority does not need to be set because there is no mapping yet which would depend on this mapping (this new parameter is discussed in 5.5, Dependencies between FlashCopy Mappings on page 110). The type of mapping will be Standard, as opposed to Incremental. We do not need it to be incremental because we do not want a full copy of the source VDisk which could benefit from being incrementally refreshed. Also, incremental FlashCopy would use up to twice the amount of bitmap space compared to standard FlashCopy (Incremental FlashCopy is discussed in 5.2.8, Incremental FlashCopy on page 99). The grain size we use is 256KB. The new option of a grain size of 64KB uses four times the amount of bitmap space compared to a grain size of 256KB. A Grain Size of 64KB can be used to decrease the amount of data to be copied when restarting an Incremental FlashCopy mapping and thus the time it takes to re-establish a full independent clone of a source VDisk. 120
SVC 4.2.1 Advanced Copy Services
The last feature which can be used on this screen is that we can choose to have the system automatically delete the FlashCopy mapping when the background copy completes. We are not creating a full copy here, so we do not use this option. Once we click on the Next button, we get a screen where we can filter the source VDisk candidates we want to see in the next step, shown in Figure 6-4 on page 121.
We can filter by Virtual Disk (VDisk) Name and Managed Disk Group Name (using a wildcard), by Virtual Disk Type (any, sequential, striped, image), I/O Group and State (offline, online, degraded). In our example we have chosen to filter by VDisk name, since our naming scheme indicates the production VDisks to be used as source VDisk with the characters prod as pat of the VDisk name. The next screen shows us the filtered VDisks, as shown in Figure 6-5 on page 122.
121
We select the VDisk vd-prod-0001 to be the source VDisk for our FlashCopy mapping. Pressing Next, we get to the screen where we can choose the target VDisk, this time without a filter screen before, therefore displaying all VDisks in the system. To get the target VDisk candidates filtered, we select Show Filter Row from the pull down menu, then click on filter on top of the Name column to get to the filter properties, shown in Figure 6-6 on page 122.
Figure 6-6 Create a FlashCopy mapping - Select the Target VDisk - Filter
Here we do not need to use the wildcard as we did within the filter screen for the source VDisk candidates. After selecting the VDisk to be the target VDisk and pressing Next, we verify the settings of the FlashCopy mapping as shown in Figure 6-7 on page 123.
122
Pressing Finish creates the mapping and takes Viewing FlashCopy screen, shown in Figure 6-8 on page 123.
Figure 6-8 Viewing FlashCopy mappings - one mapping created, state: Idle or Copied
We have successfully created the first FlashCopy mapping whose properties we can view, clicking on the FlashCopy mapping Name, shown in Figure 6-9 on page 124.
123
We see the state of the mapping is Idle_or_Copied, therefore it is ready to be prepared and started. The consistency group related fields hold no information, internally this mapping belongs to Consistency Group 0.
124
We get to the screen used to chose to prepare the mapping, shown in Figure 6-11 on page 125.
Pressing OK first prepares (puts the mapping in the state Preparing) and then starts the mapping. The state of the mapping is now Copying, shown in Figure 6-12 on page 125. The application altering the data residing on the source VDisk can resume to do so, the target VDisk is brought online and ready to be used.
Figure 6-12 Viewing FlashCopy Mappings - one mapping started, state: Copying
125
Here, the name of the mapping, the Consistency group it belongs to, the background copy priority, the cleaning priority and the autodelete option can be modified. What cannot be modified is the grain size and the type of mapping (standard, incremental) and the I/O group the bitmap resides on.
126
Now we get a warning screen, shown in Figure 6-15 on page 127, telling us that the content of the target VDisk will be unusable after we stop the mapping.
This is because most of the data of the target VDisk is still located on the source VDisk, only data which would have been overwritten on the source VDisk has been copied to the target VDisk (we had chosen not to enable the background copy process). What this means is that the mapping will still exist, but whatever data was written to the target VDisk will be invalidated. Also, any mapping which depends on this mapping would be affected. When we use the Forced Stop, no further cleaning occurs and dependent mappings will as well be stopped. We do not have any dependent mappings at that point in time, so we press the Stop button (we do not need to use the Forced Stop button). Now the status of the mapping is Stopping, as seen in Figure 6-16 on page 127, and shortly thereafter in the state Stopped.
127
consistency of the data within one VDisk, but also across data spanning all the involved VDisks. First we choose FlashCopy Consistency Groups on the My Work pane as in Figure 6-17 on page 128.
There are no Consistency Groups set up yet. To create one we choose Create a Consistency Group from the pull down menu. The next screen, shown in Figure 6-18 on page 128, lets us choose the name of the Consistency Group and what FlashCopy mappings we want to be members in it.
Figure 6-18 Creating FlashCopy Consistency Groups - including the one existing mapping
We want to include the mapping FlashCopy fcm-001 as the first member in the Consistency Group, therefore we select it and press OK. If we had created some more mappings, they would be displayed here and could be included in the Consistency Group at once.
128
The next screen, shown in Figure 6-19 on page 129, displays the result of the creation, which in our case was a success. If, for instance, the mapping put into the Consistency Group was in the Copying state, there would be an error message indicating this. Nonetheless, an empty Consistency Group would have been created.
Closing this screen brings us back to the Viewing FlashCopy Consistency Group screen seen in Figure 6-20 on page 129.
Clicking on the Consistency Group Name shows us the properties of the Consistency Group. The first panel, General, shows just the name, ID and the state of the Consistency Group, as shown in Figure 6-21 on page 130.
129
Figure 6-21 View FlashCopy Consistency Group Details for fcg-001 - General
The Consistency Group state is Stopped, since its member, the FlashCopy Mapping fcm-001 is in the Stopped state. The Relationship panel shows the details for the relationship as shown in Figure 6-22 on page 130.
Figure 6-22 View FlashCopy Consistency Group Details for fcg-001 - Relationships
130
Figure 6-23 Create a FlashCopy Mapping - Set Properties - Include in existing Consistency Group
The next screen lets us again filter the VDisks to be displayed as source VDisk candidates. This time we filter using the Managed Disk Group name (the backend storage system which holds the production VDisks is the DS4500), shown in Figure 6-24 on page 131.
Figure 6-24 Create a FlashCopy Mapping - Filtering Source VDisk Candidates - filter by mdgroup
131
Now we choose the source VDisk for the mapping from the filtered list, shown in Figure 6-25 on page 132.
We now choose the target VDisk for the new mapping shown in Figure 6-26.
The last step before the mapping is created is to verify the settings, as shown in Figure 6-27 on page 133.
132
Now we return to the Consistency Group screen, shown in Figure 6-28, and we see that both mappings are now members of the Consistency Group fcg-001.
Figure 6-28 Viewing FlashCopy Mappings - two mappings are members of one Consistency Group
The state of both mappings is Idle_or_Copied and therefore also the state of the Consistency Group, shown in Figure 6-29 on page 134.
133
Figure 6-29 Viewing FlashCopy Consistency Groups - fcg-001, state Idle or Copied
When clicking on the Name of the Consistency Group, we see the details of the Consistency Group. Clicking on Relationships now, as shown in Figure 6-30, we now see both FlashCopy Mappings as members of the Consistency Group.
Figure 6-30 View FlashCopy Consistency Group Relationship Details for fcg-001
134
A command needs to be completed within a certain period of time. The prepare command is asynchronous and if it takes more than two minutes for the maps to get to the "prepared" state that will not cause a problem. The start command is synchronous and must complete within two minutes. In a case where the start command is being prevented from being executed within two minutes, the event flush failed takes the mapping into the Stopped state. As it is in the Stopped state, it can be prepared again. The advantage of preparing the mappings first is that in the case just described, the mappings are already prepared, thus the time does not run out for the completion of the Start process. Another advantage is that when preparing it first, we can specify the point-in-time to start the Consistency Group or the mapping, whereas with an unprepared Consistency Group, the (variable) time to prepare the Consistency Group decides the exact point-in-time it is started. From the Consistency Group screen we choose Prepare a Consistency Group, as shown in Figure 6-31 on page 135.
A Consistency Group can only be put into the Preparing state, shown in Figure 6-32 when it is either in the Idle_or_Copied or Stopped state.
135
After a refresh, the state changes to Prepared, as shown in Figure 6-33 on page 136.
136
As with starting the standalone mapping, when starting the Consistency Group, the next screen asks us to prepare the Consistency Group, as shown in Figure 6-35. This only applies if we did not prepare the Consistency Group before; if it has been done before the checkbox will be greyed out.
Figure 6-35 Starting FlashCopy Consistency Group fcg-001 - preparing the mappings within the group
There is a checkbox to prepare the FlashCopy Consistency group (which is checked by default, but can be unchecked). As stated before, a Consistency Group or a FlashCopy Mapping always needs to be prepared before being started. The checkbox serves no other purpose than telling us that the Consistency Group will be prepared before it is being started. If we uncheck it, the start of the Consistency Group will fail as shown in Figure 6-36.
137
Figure 6-36 Starting FlashCopy Consistency Group fcg-001 - error when using the checkbox
Clicking the OK button, with the checkbox left checked, The Consistency Group first enters the Preparing, then Prepared and finally Copying state, in one uninterrupted sequence, as shown in Figure 6-37 on page 138.
Looking at the details of the Consistency Group fcg-001 we see that both mappings, which are members of the Consistency Group, are in the Copying state, shown in Figure 6-38.
138
Figure 6-38 Viewing FlashCopy Consistency Group Relationship Details for fcg-01, state: Copying
Figure 6-40 on page 140 shows the confirmation screen where we can just stop the Consistency Group or chose to force the Consistency Group to be stopped in case there are mappings within which have dependencies to other mappings outside the Consistency Group to be stopped.
Chapter 6. Implementing FlashCopy
139
Before reaching the Stopped state, the Consistency Group enters the Stopping state, as shown in Figure 6-41.
140
The next screen shows is where we can change the name of the Consistency Group, this can be done in the Copying state, as shown in Figure 6-43 on page 141.
141
Figure 6-44 Viewing FlashCopy Mappings, one Mapping in state: Stopped, the other in state: Stopping
The same applies to preparing and starting a FlashCopy Mapping. When we prepare or start a mapping which is a member of a Consistency Group, we get an additional confirmation screen which tells us that since the FlashCopy Mapping is a member of a Consistency Group, we will issue the command to all mappings which are members of the Consistency Group, as shown in Figure 6-45 on page 142.
Figure 6-46 Viewing FlashCopy Mappings - two mappings for backup in Consistency Group fcg-001
Clicking the name of the mapping gives us the properties of the mapping as shown in Figure 6-47.
143
Now we are going to establish two new mappings which use the same source VDisk but have a different target VDisk, shown in Figure 6-48 on page 144.
Figure 6-48 Viewing FlashCopy Mappings - two more Mappings using the same sources
144
The properties of the mapping FlashCopy fcm-test-001 are shown in Figure 6-49.
The background copy priority is 50% for these mappings. This tells the SVC to perform a background copy of the data of the source VDisk to the target VDisk with 2 MBps. As we do not need the mapping after the clone of the source VDisks is established, the option to delete the mapping when the background copy has finished is enabled. The mappings are not yet in a Consistency Group. As we want the timing of the FlashCopy to be independent from the Consistency Group we use for backup, we put the mappings in a new Consistency Group. We now create the Consistency Group and while doing so, put both new FlashCopy Mappings into the Consistency Group, as shown in Figure 6-50 on page 146.
145
Figure 6-50 Creating FlashCopy Consistency Groups - including both Mappings for test data
To check if all settings are correct, we look up the FlashCopy relationship details of the Consistency Group, as shown in Figure 6-51.
146
Now we start (and prepare in one step) the FlashCopy Mapping fcg-001 again for our backup purposes. Both of our Consistency Groups which have mappings which share the same source VDisks, are in the Copying state. Selecting a mapping in fcg-001 and choosing View FC Mappings in Dependency Order from the pull-down menu, shown in Figure 6-53 on page 147, lets us obtain information about the dependencies the mappings have.
The list of mappings which are dependent on the mapping fcm-001 are shown in Figure 6-54.
147
Figure 6-54 Viewing FlashCopy Mappings in Dependency Order for mapping FlashCopy fcm-001
The only mapping which depends on the chosen mapping is fcm-test-001. The mapping fcm-001 itself is not shown in the list. The mapping fcm-test-001 depends on the mapping fcm-001 because fcm-001 is newer (started later) than fcm-test-001. After the SVC finished copying the data of the source VDisks to the target VDisks for the mapping used to establish a clone of the production VDisks for test purposes, it deleted the related mapping as we specified. Now, we only have 2 mappings existing which are the ones we use for our backups,as shown in Figure 6-55.
Figure 6-55 Viewing FlashCopy Mappings - only the mappings in Consistency Group fcg-001 left
148
Goal 1: The first goal is to take a snapshot of a VDisk, which is already the target VDisk in a mapping. We create and start a FlashCopy Mapping and, additionally, want to establish a FlashCopy where the target VDisk of the first FlashCopy Mapping is the source of the second FlashCopy Mapping. The first copy we set up with background copy to get a fully copied clone of a production VDisk. This first copy is to be used for application testing. The application working with the first copy might change the data residing on the target VDisk of the first FlashCopy Mapping. We now want to have a copy of the target VDisk of the first FlashCopy Mapping. With a FlashCopy function where a VDisk can be a member of only one FlashCopy Mapping, we would have to wait until the first copy has finished to fully copy the data to the target VDisk. Then we would have to delete the mapping (or have the autodelete option enabled). This can be a time-consuming procedure. Solution1 : We use CFC to create a FlashCopy where a source VDisk of the second mapping is still the target VDisk in the first FlashCopy Mapping. This enables us to create the second copy before the first FlashCopy Mapping has finished copying all the data. Goal 2: The second goal is to refresh a FlashCopy target. We would like to have the first copy (the copy of the production VDisk) to be re-established within a short period of time and without much impact on the production VDisk. Solution 2: To re-establish the first copy in a short period of time and without much impact on the production volume, we use IFC for the first FlashCopy Mapping.
Figure 6-56 Viewing FlashCopy Consistency Groups - two empty Consistency Groups created
149
We now associate VDisks to be the source VDisk and the target VDisk with the mapping and finish the wizard. The properties of the mapping we created are shown in Figure 6-58 on page 151.
150
We set up the second mapping, for the second production VDisk the same way we did with the first. Both mappings are in the Idle_or_Copied state and are shown in Figure 6-59 on page 151.
Figure 6-59 Viewing FlashCopy Mappings - two mappings in the first Consistency Group
151
We can now switch to the Consistency Group screen and start the first Consistency Group, as shown in Figure 6-60 on page 152.
This puts the Consistency Group in the Copying state, as shown in Figure 6-61.
Now the target VDisks of the first mapping are ready to be used for our application testing. the application testing will need to be temporarily stopped (and any host caches flushed) before the cascaded mappings are started. While this is ongoing, we create the next two mappings, where the target VDisks of the now Copying first mapping are to be the source VDisks. We put the mappings in another Consistency Group and specify them to be incremental as well, as shown in the Verify FlashCopy Mapping screen at the final stage of creating the mapping, as shown in Figure 6-62 on page 153.
152
Now we have set up four mappings in two Consistency Groups, shown in Figure 6-63.
Figure 6-63 Viewing FlashCopy Mappings - 1 new Consistency Group in state: Idle_or_Copied
While the first Consistency Group and with it the mappings associated with it are still in the Copying state, we start the second Consistency Group, shown in Figure 6-64 on page 154.
153
We now have four mappings in two Consistency Groups in a Copying state, where VDisks act as both, as source VDisks and target VDisks, shown in Figure 6-65.
Figure 6-65 View FlashCopy Mappings - VDisks in the role of Source VDisk and Target VDisk
The mapping FlashCopy fcm-test-003 depends upon FlashCopy fcm-test-001, shown in Figure 6-66 on page 155. The same applies to the other two mappings.
154
Figure 6-66 Viewing FlashCopy Mappings in Dependency Order for mapping FlashCopy fcm-test-001
After some time, the progress indicates that the copy process for the first FlashCopy Mapping is almost complete, shown in Figure 6-67.
Figure 6-67 Viewing FlashCopy Mappings - first mapping copy process almost complete
We can see the progress using the Manage Progress screens, shown in Figure 6-68 on page 156, where we see that the first mapping successfully finished copying all the data to the target VDisk.
155
After both copies are copied fully, the state changes back to Idle_or_Copied for both Consistency Groups, shown in Figure 6-69 on page 156.
We now restart the first Consistency Group, which has the production VDisks as source VDisks, shown in Figure 6-70 on page 157.
156
The screenshot in Figure 6-71 was taken soon after we started the FlashCopy Mapping. Since the mapping is incremental, it just had to copy the grains which were changed, which was about 200 MB, instead of the whole 10 GB VDisk.
157
backup of our production data taken at the remote site. Also, we want to have a full copy (a clone) of our production VDisks on a daily basis, residing at the second location. This copy serves the purpose of providing a consistent point-in-time copy of the production data in case the data of both the primary and secondary of the Metro Mirror relationship get invalidated (for example, due to a logical error which affects both the primary and the secondary due to them being in a synchronized copy relationship). This clone is a building block for our Business Continuity strategy. Note: Even though Global Mirror is asynchronous, this use case applies to GM as well, because the data gets copied over to the secondary VDisk as soon as possible and thus is object to get invalidated by logical errors. Solution: The solution is to setup FlashCopy where the source VDisks for the mappings are the secondary VDisks of the one MetroMirror Relationship. The target VDisks are then used to take a backup from. We establish the clone of the Metro Mirror secondary using the background copy process and we use IFC to refresh this clone once created to minimize load on the system, and to establish the clone quickly. To have the clone established in a short time decreases the time where no full clone of the VDisks is available, thus enhancing our Recovery Time Objectives.
IBM_2145:ITSOCL3:admin>svcinfo lsvdisk -delim : id:name:IO_group_id:IO_group_name:status:mdisk_grp_id:mdisk_grp_name:capacity:type :FC_id:FC_name:RC_id:RC_name:vdisk_UID:fc_map_count 0:vd-prod-l2-0002:0:io_grp0:online:1:DS4700:25.0GB:striped:::0:MetroMirror Relationship-002:6005076801A100E90800000000000003:0 1:vd-prod-l2-0001:0:io_grp0:online:1:DS4700:25.0GB:striped:::1:MetroMirror Relationship-001:6005076801A100E90800000000000002:0 2:vd-back-l2-0001:0:io_grp0:online:1:DS4700:25.0GB:striped:::::6005076801A100E9080 0000000000004:0 3:vd-back-l2-0002:0:io_grp0:online:1:DS4700:25.0GB:striped:::::6005076801A100E9080 0000000000005:0 IBM_2145:ITSOCL3:admin> The VDisks which have the characters prod in the name we are going to use them as the source VDisk for the FlashCopy Mapping and the VDisks with the characters back in the name we will use as the target VDisks. As an example, we display the properties of the VDisk with the id 2, using the command svcinfo lsvdisk -delim : 2, shown in Example 6-2.
Example 6-2 svcinfo lsvdisk -delim : 2 - details of VDisk 2
status:online mdisk_grp_id:1 mdisk_grp_name:DS4700 capacity:25.0GB type:striped formatted:no mdisk_id: mdisk_name: FC_id: FC_name: RC_id: RC_name: vdisk_UID:6005076801A100E90800000000000004 throttling:0 preferred_node_id:2 fast_write_state:empty cache:readwrite udid:0 fc_map_count:0 IBM_2145:ITSOCL3:admin> To display the one MetroMirror Relationship we use the command svcinfo lsrcconsistgrp, as shown in Example 6-3, to display it.
Example 6-3 svcinfo lsrcconsistgrp -delim - existing remote copy consistency groups
IBM_2145:ITSOCL3:admin>svcinfo lsrcconsistgrp -delim : id:name:master_cluster_id:master_cluster_name:aux_cluster_id:aux_cluster_name:prim ary:state:relationship_count:copy_type 255:mmg-001:000002006B603A38:ITSOCL2:0000020068403A42:ITSOCL3:master:consistent_sy nchronized:2:metro IBM_2145:ITSOCL3:admin> As we can see, only one relationship exists. To show the properties of only this relationship, we specify the id with the command, shown in Example 6-4.
Example 6-4 svcinfo lsrcconsistgrp -delim : 255 - properties of the Consistency Group with id 255
IBM_2145:ITSOCL3:admin>svcinfo lsrcconsistgrp -delim : 255 id:255 name:mmg-001 master_cluster_id:000002006B603A38 master_cluster_name:ITSOCL2 aux_cluster_id:0000020068403A42 aux_cluster_name:ITSOCL3 primary:master state:consistent_synchronized relationship_count:2 freeze_time: status:online sync: copy_type:metro RC_rel_id:0 RC_rel_name:MetroMirror Relationship-002 RC_rel_id:1 RC_rel_name:MetroMirror Relationship-001
Chapter 6. Implementing FlashCopy
159
IBM_2145:ITSOCL3:admin> All important information is shown to verify that we have successfully set up the remote copy consistency group, which is associated with two Metro Mirror relationships. We can also verify the properties of the two Metro Mirror relationships, with one of the two shown in Example 6-5, using the command svcinfo lsrcrelationship -delim : 0.
Example 6-5 .svcinfo lsrcrelationship -delim : 0 - properties of the Relationship with id 0
IBM_2145:ITSOCL3:admin>svcinfo lsrcrelationship -delim : 0 id:0 name:MetroMirror Relationship-002 master_cluster_id:000002006B603A38 master_cluster_name:ITSOCL2 master_vdisk_id:1 master_vdisk_name:vd-prod-l1-0002 aux_cluster_id:0000020068403A42 aux_cluster_name:ITSOCL3 aux_vdisk_id:0 aux_vdisk_name:vd-prod-l2-0002 primary:master consistency_group_id:255 consistency_group_name:mmg-001 state:consistent_synchronized bg_copy_priority:50 progress: freeze_time: status:online sync: copy_type:metro IBM_2145:ITSOCL3:admin> The second relationship we use VDisks from for our FlashCopy Mapping is shown in Example 6-6.
Example 6-6 svcinfo lsrcrelationship -delim : 0 - properties of the Relationship with id 1
IBM_2145:ITSOCL3:admin>svcinfo lsrcrelationship -delim : 1 id:1 name:MetroMirror Relationship-001 master_cluster_id:000002006B603A38 master_cluster_name:ITSOCL2 master_vdisk_id:0 master_vdisk_name:vd-prod-l1-0001 aux_cluster_id:0000020068403A42 aux_cluster_name:ITSOCL3 aux_vdisk_id:1 aux_vdisk_name:vd-prod-l2-0001 primary:master consistency_group_id:255 consistency_group_name:mmg-001 state:consistent_synchronized bg_copy_priority:50 progress: freeze_time: 160
status:online sync: copy_type:metro IBM_2145:ITSOCL3:admin> The VDisks of our MetroMirror Relationship in location 1 (Production Location) are named: vd-prod-l1-0001 vd-prod-l1-0002 In location 2 (Business Continuity Location) they are named: vd-prod-l2-0001 vd-prod-l2-0002 The two VDisks which serve as the secondary VDisks for the MetroMirror Relationship in location 2 are the ones we use as the source for the FlashCopy Mapping.
>>- svctask -- -- mkfcmap -- -----------------------------------> >-- -source --+- src_vdisk_id ---+-- ---------------------------> '- src_vdisk_name -' >-- -target --+- target_vdisk_id ---+-- ------------------------> '- target_vdisk_name -' >--+-------------------------+-- -------------------------------> '- -name -- new_name_arg -' >--+-----------------------------------------+-- ---------------> '- -consistgrp --+- consist_group_id ---+-' '- consist_group_name -' >--+------------------------+-- --+---------------+-------------> '- -copyrate -- percent -' '- -autodelete -' >--+-------------------------+--+----------------+--------------> '- -grainsize --+- 64 --+-' '- -incremental -' '- 256 -' >--+-----------------------------+------------------------------>
Chapter 6. Implementing FlashCopy
161
'- -cleanrate ---- percent ---' >--+------------------------------+---------------------------->< '- -iogrp --+- iogroup_name -+-' '- iogroup_id --' We do not use all the optional parameters, for instance we leave the Grain Size to default at 256KB. In our example we create the first mapping as shown in Example 6-8.
Example 6-8 svctask mkfcmap - create first mapping
IBM_2145:ITSOCL3:admin>svctask mkfcmap -source vd-prod-l2-0001 -target vd-back-l2-0001 -name fcm-back-001 -copyrate 70 -incremental FlashCopy Mapping, id [0], successfully created IBM_2145:ITSOCL3:admin> We then create the second mapping, shown in Example 6-9.
Example 6-9 svctask mkfcmap - create second mapping
IBM_2145:ITSOCL3:admin>svctask mkfcmap -source vd-prod-l2-0002 -target vd-back-l2-0002 -name fcm-back-002 -copyrate 70 FlashCopy Mapping, id [1], successfully created IBM_2145:ITSOCL3:admin> We review the creation of both mappings using the command svcinfo lsfcmap -delim :, shown in Example 6-10.
Example 6-10 svcinfo lsfcmap -delim : - both mappings
IBM_2145:ITSOCL3:admin>svcinfo lsfcmap -delim : id:name:source_vdisk_id:source_vdisk_name:target_vdisk_id:target_vdisk_name:group_ id:group_name:status:progress:copy_rate:clean_progress:incremental 0:fcm-back-001:1:vd-prod-l2-0001:2:vd-back-l2-0001:::idle_or_copied:0:70:100:on 1:fcm-back-002:0:vd-prod-l2-0002:3:vd-back-l2-0002:::idle_or_copied:0:70:100:off IBM_2145:ITSOCL3:admin> Reviewing the mappings we realize that we forgot the -incremental parameter in our second mapping. We cannot modify this mapping to be incremental (modifying a mapping would be done using the command svctask chfcmap), so we have to delete the mapping and re-create it. We delete the mapping using the command svctask rmfcmap, shown in Example 6-11.
Example 6-11 svctask refcmap - syntax
>>- svctask -- -- rmfcmap -- --+----------+-- ------------------> '- -force -' >--+- fc_map_id ---+------------------------------------------->< '- fc_map_name -' After we recreated the second mapping, this time using the flag -incremental, we view the properties of that mapping using the command svcinfo lsfcmap 1, shown in Example 6-12.
Example 6-12 svcinfo lsfcmap 1 - properties of the mapping with id 1
name fcm-back-002 source_vdisk_id 0 source_vdisk_name vd-prod-l2-0002 target_vdisk_id 3 target_vdisk_name vd-back-l2-0002 group_id group_name status idle_or_copied progress 0 copy_rate 70 start_time dependent_mappings 0 autodelete off clean_progress 100 clean_rate 50 incremental on difference 100 grain_size 256 IO_group_id 0 IO_group_name io_grp0 IBM_2145:ITSOCL3:admin> Using svcinfo lsvdisk again, shown in Example 6-13, we see that all four VDisks are now part of FlashCopy Mappings.
Example 6-13 svcinfo lsvdisk -delim : - all four VDisks are now part of FlashCopy mappings
IBM_2145:ITSOCL3:admin>svcinfo lsvdisk -delim : id:name:IO_group_id:IO_group_name:status:mdisk_grp_id:mdisk_grp_name:capacity:type :FC_id:FC_name:RC_id:RC_name:vdisk_UID:fc_map_count 0:vd-prod-l2-0002:0:io_grp0:online:1:DS4700:25.0GB:striped:1:fcm-back-002:0:MetroM irror Relationship-002:6005076801A100E90800000000000003:1 1:vd-prod-l2-0001:0:io_grp0:online:1:DS4700:25.0GB:striped:0:fcm-back-001:1:MetroM irror Relationship-001:6005076801A100E90800000000000002:1 2:vd-back-l2-0001:0:io_grp0:online:1:DS4700:25.0GB:striped:0:fcm-back-001:::600507 6801A100E90800000000000004:1 3:vd-back-l2-0002:0:io_grp0:online:1:DS4700:25.0GB:striped:1:fcm-back-002:::600507 6801A100E90800000000000005:1 IBM_2145:ITSOCL3:admin>
>>- svctask -- -- mkfcconsistgrp -- ----------------------------> >--+-------------------------------+--------------------------->< '- -name -- consist_group_name -' The actual command we used to create our Consistency Group is shown in Example 6-15 on page 164.
163
IBM_2145:ITSOCL3:admin>svctask mkfcconsistgrp -name fcg-back-001 FlashCopy Consistency Group, id [1], successfully created IBM_2145:ITSOCL3:admin> Example 6-16 shows the syntax of the command svcinfo lsfcconsistgrp, which can be used to display the Consistency Groups which have been created.
Example 6-16 svcinfo lsfcconsistgrp - syntax
>>- svcinfo -- -- lsfcconsistgrp -- ----------------------------> >--+-----------------------------------+-- --+----------+-- ----> '- -filtervalue -- attribute=value -' '- -nohdr -' >--+-----------------------+-- --+---------------+-- -----------> '- -delim -- delimiter -' +- object_id ---+ '- object_name -' >--+-----------------+----------------------------------------->< '- -filtervalue? -' We use the command now to verify the creation of the Consistency Group, as shown in Example 6-17.
Example 6-17 svcinfo lsfcconsistgrp - empty Consistency Group
IBM_2145:ITSOCL3:admin>svcinfo lsfcconsistgrp id name status 1 fcg-back-001 empty IBM_2145:ITSOCL3:admin> For now, what we have is two FlashCopy mappings and one empty FlashCopy Consistency Group.
>>- svctask -- -- chfcmap -- --+-------------------------+-- ---> '- -name -- new_name_arg -' >--+----------+-- ----------------------------------------------> '- -force -' >--+-----------------------------------------+-- ---------------> '- -consistgrp --+- consist_group_id ---+-' '- consist_group_name -' >--+------------------------+-- --+-------------------------+---> '- -copyrate -- percent-' '- -autodelete --+-on--+-'
164
'-off-' >--+-----------------------------+--+- fc_map_id ---+---------->< '- -cleanrate ---- percent ---' '- fc_map_name -' The command we used to put the mappings into the Consistency Group is shown in Example 6-19.
Example 6-19 svctask chfcmap - associating both mappings with the same Consistency Group
IBM_2145:ITSOCL3:admin>svctask chfcmap -consistgrp fcg-back-001 fcm-back-001 IBM_2145:ITSOCL3:admin>svctask chfcmap -consistgrp fcg-back-001 fcm-back-002 IBM_2145:ITSOCL3:admin> To view the Consistency Group we use the command svcinfo lsfcconsistgrp again, shown in Example 6-20 on page 165.
Example 6-20 svcinfo lsfcconsistgrp - Consistency Group in state: Idle_or_Copied
IBM_2145:ITSOCL3:admin>svcinfo lsfcconsistgrp id name status 1 fcg-back-001 idle_or_copied IBM_2145:ITSOCL3:admin> The Consistency Group state changed from empty to idle_or_copied. The properties, including the FlashCopy mappings which are now associated with the Consistency group we get when specifying the id of the Group with the command, as shown in Example 6-21.
Example 6-21 svcinfo lsfcconsistgrp - properties of the Consistency Group with id 1
IBM_2145:ITSOCL3:admin>svcinfo lsfcconsistgrp 1 id 1 name fcg-back-001 status idle_or_copied FC_mapping_id 0 FC_mapping_name fcm-back-001 FC_mapping_id 1 FC_mapping_name fcm-back-002 IBM_2145:ITSOCL3:admin> Example 6-22 shows the two FlashCopy mappings, using the command svcinfo lsfcmap, which shows the fact that both mappings are now members of the same Consistency Group.
Example 6-22 svcinfo lsfcmap - both mappings associated with the same Consistency Group
IBM_2145:ITSOCL3:admin>svcinfo lsfcmap -delim : id:name:source_vdisk_id:source_vdisk_name:target_vdisk_id:target_vdisk_name:group_ id:group_name:status:progress:copy_rate:clean_progress:incremental 0:fcm-back-001:1:vd-prod-l2-0001:2:vd-back-l2-0001:1:fcg-back-001:idle_or_copied:0 :70:100:on 1:fcm-back-002:0:vd-prod-l2-0002:3:vd-back-l2-0002:1:fcg-back-001:idle_or_copied:0 :70:100:on IBM_2145:ITSOCL3:admin>
165
>>- svctask -- -- prestartfcconsistgrp -- ----------------------> >--+- fc_consist_group_id ---+--------------------------------->< '- fc_consist_group_name -' We prepare the Group and immediately afterwards we issue the command to see that the state of the Consistency Group is Prepared, which is shown in Example 6-24.
Example 6-24 svctask prestartfcconsistgrp, svcinfo lsfcconsistgrp - prepare and view Group
IBM_2145:ITSOCL3:admin>svctask prestartfcconsistgrp fcg-back-001 IBM_2145:ITSOCL3:admin>svcinfo lsfcconsistgrp id name status 1 fcg-back-001 prepared IBM_2145:ITSOCL3:admin> This time we have chosen the Consistency Group name to specify which Group to start, not the id. We can also use the command again, to see the state of the mappings, shown in Example 6-25.
Example 6-25 svcinfo lsfcmap - both mappings in state: Prepared
IBM_2145:ITSOCL3:admin>svcinfo lsfcmap -delim : id:name:source_vdisk_id:source_vdisk_name:target_vdisk_id:target_vdisk_name:group_ id:group_name:status:progress:copy_rate:clean_progress:incremental 0:fcm-back-001:1:vd-prod-l2-0001:2:vd-back-l2-0001:1:fcg-back-001:prepared:0:70:10 0:on 1:fcm-back-002:0:vd-prod-l2-0002:3:vd-back-l2-0002:1:fcg-back-001:prepared:0:70:10 0:on IBM_2145:ITSOCL3:admin>
>>- svctask -- -- startfcconsistgrp -- --+---------+-- ---------> '- -prep -' >--+- fc_consist_group_id ---+--------------------------------->< '- fc_consist_group_name -' We could prepare the Consistency Group first using the -prep option, but since we have already prepared the Group we do not need to do it now. Example 6-27 on page 167 shows how we start the Consistency Group (using the id to specify it) and immediately after we view the status of the Consistency Group. 166
SVC 4.2.1 Advanced Copy Services
Example 6-27 svctask startfcconsistgrp, svcinfo lsfcconsistgrp - start and view Group
IBM_2145:ITSOCL3:admin>svctask startfcconsistgrp 1 IBM_2145:ITSOCL3:admin>svcinfo lsfcconsistgrp id name status 1 fcg-back-001 copying IBM_2145:ITSOCL3:admin> The state of the Consistency Group is now Copying, as expected. In Example 6-28 we see the state of both of the mappings is Copying as well.
Example 6-28 svcinfo lsfcmap - both mappings in state: Copying
IBM_2145:ITSOCL3:admin>svcinfo lsfcmap -delim : id:name:source_vdisk_id:source_vdisk_name:target_vdisk_id:target_vdisk_name:group_ id:group_name:status:progress:copy_rate:clean_progress:incremental 0:fcm-back-001:1:vd-prod-l2-0001:2:vd-back-l2-0001:1:fcg-back-001:copying:34:70:10 0:on 1:fcm-back-002:0:vd-prod-l2-0002:3:vd-back-l2-0002:1:fcg-back-001:copying:34:70:10 0:on IBM_2145:ITSOCL3:admin> Example 6-29 shows the details of the FlashCopy mapping with the id 0.
Example 6-29 svcinfo lsfcmap -delim : 0
IBM_2145:ITSOCL3:admin>svcinfo lsfcmap -delim : 0 id:0 name:fcm-back-001 source_vdisk_id:1 source_vdisk_name:vd-prod-l2-0001 target_vdisk_id:2 target_vdisk_name:vd-back-l2-0001 group_id:1 group_name:fcg-back-001 status:copying progress:51 copy_rate:70 start_time:071107011320 dependent_mappings:0 autodelete:off clean_progress:100 clean_rate:50 incremental:on difference:48 grain_size:256 IO_group_id:0 IO_group_name:io_grp0 IBM_2145:ITSOCL3:admin> We see that the state of the mapping is Copying and that the progress is 51%, using a background copy priority of 70%. The last output we look at are the details of one of the VDisks involved, shown in Example 6-30 on page 168.
167
IBM_2145:ITSOCL3:admin>svcinfo lsvdisk -delim : 1 id:1 name:vd-prod-l2-0001 IO_group_id:0 IO_group_name:io_grp0 status:online mdisk_grp_id:1 mdisk_grp_name:DS4700 capacity:25.0GB type:striped formatted:no mdisk_id: mdisk_name: FC_id:0 FC_name:fcm-back-001 RC_id:1 RC_name:MetroMirror Relationship-001 vdisk_UID:6005076801A100E90800000000000002 throttling:0 preferred_node_id:2 fast_write_state:empty cache:readwrite udid: fc_map_count:1 IBM_2145:ITSOCL3:admin> The VDisk vd-prod-l2-0001 is a member of both a Remote Copy Relationship and a FlashCopy mapping. After the background copy process has finished copying all the data to the target VDisk, the state changes to Idle_or_Copied, as shown in Example 6-31.
Example 6-31 svcinfo lsfcconsistgrp 1 - state: Idle_or_Copied
IBM_2145:ITSOCL3:admin>svcinfo lsfcconsistgrp 1 id 1 name fcg-back-001 status idle_or_copied FC_mapping_id 0 FC_mapping_name fcm-back-001 FC_mapping_id 1 FC_mapping_name fcm-back-002 IBM_2145:ITSOCL3:admin> We can also look at the details of one of the mappings, shown in Example 6-32.
Example 6-32 svcinfo lsfcmap -delim : 0
IBM_2145:ITSOCL3:admin>svcinfo lsfcmap -delim : 0 id:0 name:fcm-back-001 source_vdisk_id:1 source_vdisk_name:vd-prod-l2-0001 target_vdisk_id:2 target_vdisk_name:vd-back-l2-0001 168
SVC 4.2.1 Advanced Copy Services
group_id:1 group_name:fcg-back-001 status:idle_or_copied progress:100 copy_rate:70 start_time:071107011320 dependent_mappings:0 autodelete:off clean_progress:100 clean_rate:50 incremental:on difference:0 grain_size:256 IO_group_id:0 IO_group_name:io_grp0 IBM_2145:ITSOCL3:admin> Since the mappings are set up to be incremental, we can prepare and start the Consistency Group again to refresh it, and it would only copy the grains which have changed since the last FlashCopy process. This puts less load on the SVC and makes the full clone of the VDisks available faster.
>>- svctask -- -- chfcmap -- --+-------------------------+-- ---> '- -name -- new_name_arg -' >--+----------+-- ----------------------------------------------> '- -force -' >--+-----------------------------------------+-- ---------------> '- -consistgrp --+- consist_group_id ---+-' '- consist_group_name -' >--+------------------------+-- --+-------------------------+---> '- -copyrate -- percent-' '- -autodelete --+-on--+-' '-off-' >--+-----------------------------+--+- fc_map_id ---+---------->< '- -cleanrate ---- percent ---' '- fc_map_name -' We want to change both mappings to a lower background copy priority. Example 6-34 shows how we change the background copy priority to 50% and verify the settings for the mapping with the id 0. We do the same with the second mapping.
Example 6-34 svctask chfcmap -copyrate 50 0 - changing the copy priority to 50%
169
name fcm-back-001 source_vdisk_id 1 source_vdisk_name vd-prod-l2-0001 target_vdisk_id 2 target_vdisk_name vd-back-l2-0001 group_id 1 group_name fcg-back-001 status idle_or_copied progress 100 copy_rate 50 start_time 071107021634 dependent_mappings 0 autodelete off clean_progress 100 clean_rate 50 incremental on difference 0 grain_size 256 IO_group_id 0 IO_group_name io_grp0 IBM_2145:ITSOCL3:admin>
>>- svctask -- -- stopfcmap -- --+---------+-- -----------------> '- -force-' >--+- fc_map_id ---+------------------------------------------->< '- fc_map_name -' The Consistency Group can be stopped with the command svctask stopfcconsistgrp for which the syntax shown in Example 6-36.
Example 6-36 svctask stopfcconsistgrp - syntax
>>- svctask -- -- stopfcconsistgrp -- --+---------+-- ----------> '- -force-' >--+- fc_consist_group_id --+--------------------------------->< '- fc_consist_group_name -'
>--+- fc_map_id ---+------------------------------------------->< '- fc_map_name -' Example 6-38 shows the syntax of the command svctask rmfcconsistgrp, used to delete a FlashCopy Consistency Group.
Example 6-38 svctask rmfcconsistgrp - syntax
>>- svctask -- -- rmfcconsistgrp -- --+----------+-- -----------> '- -force -' >--+- fc_consist_group_id ---+--------------------------------->< '- fc_consist_group_name -'
171
172
Chapter 7.
Server integration
In this chapter, we discuss the steps that need to be taken to access copied VDisks from servers running various Operating Systems. In addition, we discuss some of the steps that need to be taken on the server to ensure that the copies that are generated will be easily accessed when needed. As far as servers are concerned, there is no difference between a VDisk which was copied using FlashCopy and one that was copied using Metro/Global Mirror. As a result, this chapter will focus on accessing the VDisks with no concern as to how they were created.
173
174
Some things are not copied. Persistent Reserves are made against a specific Logical Unit and are not copied with FlashCopy or Metro/Global Mirror.
#umount <source filesystem> If unmounting filesystems is not an option, an alternative is to force an update of the node table and a flush of buffered files. The AIX freeze/thaw functionality does precisely this. This is only available on JFS2 filesystems. Freezing a file system writes all dirty file system metadata and user data to the disk. While frozen, the file system is read-only, and anything that attempts to modify the file system or its contents must wait for the freeze to end. At this point, the break can be made and the resulting copy can be easily picked up by another server. Example 7-2 shows how this is done
Example 7-2 Showing a simple freeze/thaw process
#chfs -a freeze=60 <source filesystem> <freeze the VDisk(s)> #chfs -a freeze=0 <source filesystem> Of course, sometimes the freeze point occurs in an unplanned way, such as a data center outage. So long as the mapping/relationships are consistent, your filesystems should be recoverable and, in the case of a journalled filesystem, this recovery should not result in any data loss. Example 7-3 shows the initial configuration of the SVC cluster presenting VDisks to this AIX server. The two VDisks represent a data drive and a log drive.
Example 7-3 Cluster configuration prior to FlashCopying two VDisks
175
5:kanagaFS:0:io_grp0:online:1:DS4700:36.0GB:striped:::::6005076801AD80E8E000000000 000005:0 6:kanagaLog:0:io_grp0:online:0:DS4500:512.0MB:striped:::::6005076801AD80E8E0000000 00000006:0 IBM_2145:ITSOCL2:admin>svcinfo lshost KANAGA id 2 name KANAGA port_count 2 type generic mask 1111 iogrp_count 4 WWPN 10000000C932A7FB node_logged_in_count 2 state active WWPN 10000000C932A800 node_logged_in_count 0 state active Example 7-4 shows how these VDisks have been configured on an AIX server to hold a JFS2 filesystem. The vdisk_UID property of a VDisk matches the SERIAL property of a vpath. Thus you can use these two properties to determine which vpath represents which VDisk.
Example 7-4 AIX configuration prior to FlashCopying two VDisks
DEV#: 0 DEVICE NAME: vpath0 TYPE: 2145 POLICY: Optimized SERIAL: 6005076801AD80E8E000000000000005 ========================================================================== Path# Adapter/Hard Disk State Mode Select Errors 0 fscsi0/hdisk3 OPEN NORMAL 209 0 1 fscsi0/hdisk5 OPEN NORMAL 220 0 2 fscsi0/hdisk7 OPEN NORMAL 0 0 3 fscsi0/hdisk9 OPEN NORMAL 0 0 DEV#: 1 DEVICE NAME: vpath1 TYPE: 2145 POLICY: Optimized SERIAL: 6005076801AD80E8E000000000000006 ========================================================================== Path# Adapter/Hard Disk State Mode Select Errors 0 fscsi0/hdisk4 OPEN NORMAL 0 0 1 fscsi0/hdisk6 OPEN NORMAL 0 0 2 fscsi0/hdisk8 OPEN NORMAL 74 0 3 fscsi0/hdisk10 OPEN NORMAL 79 0 #lspv hdisk0 hdisk1 hdisk2 hdisk3 hdisk4 hdisk5 hdisk6 176
hdisk7 hdisk8 hdisk9 hdisk10 vpath0 vpath1 #lsvg -l st7s99 st7s99: LV NAME itsoLV itsoLog #lsfs Name Accounting /dev/hd4 /dev/hd1 /dev/hd2 /dev/hd9var /dev/hd3 /proc /dev/hd10opt /dev/itsoLV
active active
LPs 32 4
PPs 32 4
PVs 1 1
Nodename ---------
VFS
Size
Options
jfs2 196608 -jfs2 65536 -jfs2 19005440 -jfs2 65536 -jfs2 393216 -procfs --jfs2 2031616 -jfs2 4194304 rw
#mount node mounted -------- --------------/dev/hd4 /dev/hd2 /dev/hd9var /dev/hd3 /dev/hd1 /proc /dev/hd10opt /dev/itsoLV
mounted over --------------/ /usr /var /tmp /home /proc /opt /itsoFS
date -----------Nov 07 09:55 Nov 07 09:55 Nov 07 09:55 Nov 07 09:55 Nov 07 09:56 Nov 07 09:56 Nov 07 09:56 Nov 07 11:17
The Volume Group (VG) which is being copied is st7s99, containing vpath0 and vpath1. Is this is a JFS2 filesystem, we can freeze the filesystem prior to starting the FlashCopy. The applications that access this filesystem will see write requests delayed until the filesystem is thawed. With appropriate planning and scripting, this freeze can be kept to a few seconds at most. 1. Create the FlashCopy target VDisks IBM_2145:ITSOCL2:admin>svctask mkvdisk -vtype striped -size 36 -unit gb -mdiskgrp 1 -iogrp 0 -name kanagaFS-FC Virtual Disk, id [4], successfully created IBM_2145:ITSOCL2:admin>svctask mkvdisk -vtype striped -size 512 -unit mb -mdiskgrp 0 -iogrp 0 -name kanagaLog-FC Virtual Disk, id [3], successfully created 2. Create a FlashCopy consistency group IBM_2145:ITSOCL2:admin>svctask mkfcconsistgrp -name kanagaFC
177
FlashCopy Consistency Group, id [2], successfully created 3. Create FlashCopy mappings for the VDisks and add them to the new FlashCopy consistency group IBM_2145:ITSOCL2:admin>svctask mkfcmap -source kanagaFS -target kanagaFS-FC -consistgrp kanagaFC FlashCopy Mapping, id [0], successfully created IBM_2145:ITSOCL2:admin>svctask mkfcmap -source kanagaLog -target kanagaLog-FC -consistgrp kanagaFC FlashCopy Mapping, id [1], successfully created 4. Prepare the FlashCopy consistency group. IBM_2145:ITSOCL2:admin>svctask prestartfcconsistgrp kanagaFC 5. Wait until the consistency group is in the prepared state. IBM_2145:ITSOCL2:admin>svcinfo lsfcconsistgrp id name status 2 kanagaFC preparing . . . IBM_2145:ITSOCL2:admin>svcinfo lsfcconsistgrp id name status 2 kanagaFC prepared 6. Freeze the filesystem on the AIX server. #chfs -a freeze=60 /itsoFS 7. Start the FlashCopy consistency group. This is the freeze point. IBM_2145:ITSOCL2:admin>svctask startfcconsistgrp kanagaFC 8. Thaw the filesystem on the AIX server. #chfs -a freeze=0 /itsoFS At this point, the FlashCopy operation has been started and VDisks 3 and 4 are exact copies of VDisks 5 and 6 at the time of the filesystem freeze.
Therefore, it is necessary to redefine the volume group information on the FlashCopy target VDisk using special procedures or the recreatevg command. This will alter the PVIDs and 178
SVC 4.2.1 Advanced Copy Services
VGIDs in all the VGDAs of the FlashCopy target VDisks, so that there are no conflicts with existing PVIDs and VGIDs on existing volume groups that reside on the source VDisks. If you do not redefine the volume group information prior to importing the volume group, then the importvg command will fail.
179
Total Devices : 4
DEV#: 0 DEVICE NAME: vpath0 TYPE: 2145 POLICY: Optimized SERIAL: 6005076801AD80E8E000000000000005 ========================================================================== Path# Adapter/Hard Disk State Mode Select Errors 0 fscsi0/hdisk3 OPEN NORMAL 214 0 1 fscsi0/hdisk5 OPEN NORMAL 232 0 2 fscsi0/hdisk7 OPEN NORMAL 0 0 3 fscsi0/hdisk9 OPEN NORMAL 0 0 DEV#: 1 DEVICE NAME: vpath1 TYPE: 2145 POLICY: Optimized SERIAL: 6005076801AD80E8E000000000000006 ========================================================================== Path# Adapter/Hard Disk State Mode Select Errors 0 fscsi0/hdisk4 OPEN NORMAL 0 0 1 fscsi0/hdisk6 OPEN NORMAL 0 0 2 fscsi0/hdisk8 OPEN NORMAL 91 0 3 fscsi0/hdisk10 OPEN NORMAL 102 0 DEV#: 2 DEVICE NAME: vpath2 TYPE: 2145 POLICY: Optimized SERIAL: 6005076801AD80E8E000000000000007 ========================================================================== Path# Adapter/Hard Disk State Mode Select Errors 0 fscsi0/hdisk11 CLOSE NORMAL 0 0 1 fscsi0/hdisk13 CLOSE NORMAL 0 0 2 fscsi0/hdisk15 CLOSE NORMAL 0 0 3 fscsi0/hdisk17 CLOSE NORMAL 0 0 DEV#: 3 DEVICE NAME: vpath3 TYPE: 2145 POLICY: Optimized SERIAL: 6005076801AD80E8E000000000000009 ========================================================================== Path# Adapter/Hard Disk State Mode Select Errors 0 fscsi0/hdisk12 CLOSE NORMAL 0 0 1 fscsi0/hdisk14 CLOSE NORMAL 0 0 2 fscsi0/hdisk16 CLOSE NORMAL 0 0 3 fscsi0/hdisk18 CLOSE NORMAL 0 0 #lspv hdisk0 hdisk1 hdisk2 hdisk3 hdisk4 hdisk5 hdisk6 hdisk7 hdisk8 hdisk9 hdisk10 vpath0 vpath1 hdisk11
0009cddaea97bf61 0009cdda43c9dfd5 0009cddabaef1d99 none none none none none none none none 0009cdda1b5058e4 0009cdda1b55c48c 0009cdda1b5058e4
rootvg rootvg rootvg None None None None None None None None st7s99 st7s99 st7s99
180
The new vpaths, vpath2 and vpath3 appear with no PVID whereas the hdisks that make up those vpaths do. This is as expected. Note also that vpath2 and vpath3 are in a CLOSE state, because nothing is currently accessing them. The following steps will recreate the VG with a new name and recover the Logical Volumes (LV) 1. Create the new VG and prefix all file system path names with /fc and prefix all AIX LVs with fc:
#recreatevg -y st7s99fc -L /fc -Y FC vpath2 vpath3 st7s99fc
Restriction: The LV prefix that is given via the -Y parameter cannot be fc. The reason for this is that fc is already defined as a prefix in the PdDv class of the Device Configuration Database and so is not a valid LV prefix. 2. Run fsck on the new filesystem. Strictly speaking this is not necessary as the steps taken while creating the copy ensure that the filesystem is client, but it is a prudent defensive step. #fsck -y /fc/itsoFS
The current volume is: /dev/FCitsoLV Primary superblock is valid. J2_LOGREDO:log redo processing for /dev/FCitsoLV Primary superblock is valid. *** Phase 1 - Initial inode scan *** Phase 2 - Process remaining directories *** Phase 3 - Process remaining files *** Phase 4 - Check and repair inode allocation map *** Phase 5 - Check and repair block allocation map File system is clean. 3. Mount the new filesystem #mount /fc/itsoFS Replaying log for /dev/FCitsoLV. At this point, the FlashCopy target VDisks are ready for access. Example 7-7 shows the final server state. This new filesystem contains all of the files that were in the original filesystem at the time of the freeze.
Example 7-7 AIX configuration after recreating the VG
181
Total Devices : 4
DEV#: 0 DEVICE NAME: vpath0 TYPE: 2145 POLICY: Optimized SERIAL: 6005076801AD80E8E000000000000005 ========================================================================== Path# Adapter/Hard Disk State Mode Select Errors 0 fscsi0/hdisk3 OPEN NORMAL 217 0 1 fscsi0/hdisk5 OPEN NORMAL 237 0 2 fscsi0/hdisk7 OPEN NORMAL 0 0 3 fscsi0/hdisk9 OPEN NORMAL 0 0 DEV#: 1 DEVICE NAME: vpath1 TYPE: 2145 POLICY: Optimized SERIAL: 6005076801AD80E8E000000000000006 ========================================================================== Path# Adapter/Hard Disk State Mode Select Errors 0 fscsi0/hdisk4 OPEN NORMAL 0 0 1 fscsi0/hdisk6 OPEN NORMAL 0 0 2 fscsi0/hdisk8 OPEN NORMAL 98 0 3 fscsi0/hdisk10 OPEN NORMAL 109 0 DEV#: 2 DEVICE NAME: vpath2 TYPE: 2145 POLICY: Optimized SERIAL: 6005076801AD80E8E000000000000007 ========================================================================== Path# Adapter/Hard Disk State Mode Select Errors 0 fscsi0/hdisk11 OPEN NORMAL 202 0 1 fscsi0/hdisk13 OPEN NORMAL 206 0 2 fscsi0/hdisk15 OPEN NORMAL 0 0 3 fscsi0/hdisk17 OPEN NORMAL 0 0 DEV#: 3 DEVICE NAME: vpath3 TYPE: 2145 POLICY: Optimized SERIAL: 6005076801AD80E8E000000000000009 ========================================================================== Path# Adapter/Hard Disk State Mode Select Errors 0 fscsi0/hdisk12 OPEN NORMAL 0 0 1 fscsi0/hdisk14 OPEN NORMAL 0 0 2 fscsi0/hdisk16 OPEN NORMAL 61 0 3 fscsi0/hdisk18 OPEN NORMAL 57 0 #lspv hdisk0 hdisk1 hdisk2 hdisk3 hdisk4 hdisk5 hdisk6 hdisk7 hdisk8 hdisk9 hdisk10 vpath0 vpath1 hdisk11
0009cddaea97bf61 0009cdda43c9dfd5 0009cddabaef1d99 none none none none none none none none 0009cdda1b5058e4 0009cdda1b55c48c none
rootvg rootvg rootvg None None None None None None None None st7s99 st7s99 None
active active
182
hdisk12 hdisk13 hdisk14 hdisk15 hdisk16 hdisk17 hdisk18 vpath2 vpath3 #lsvg rootvg st7s99 st7s99fc #lsvg -l st7s99 st7s99: LV NAME itsoLV itsoLog
active active
LPs 32 4
PPs 32 4
PVs 1 1
#lsvg -l st7s99fc st7299fc: LV NAME FCitsoLV FCitsoLog #lsfs Name Accounting /dev/hd4 /dev/hd1 /dev/hd2 /dev/hd9var /dev/hd3 /proc /dev/hd10opt /dev/itsoLV /dev/FCitsoLV
LPs 32 4
PPs 32 4
PVs 1 1
Nodename ----------
VFS
Size
Options
jfs2 196608 -jfs2 65536 -jfs2 19005440 -jfs2 65536 -jfs2 393216 -procfs --jfs2 2031616 -jfs2 4194304 rw jfs2 4194304 rw
#mount node mounted ------ --------------/dev/hd4 /dev/hd2 /dev/hd9var /dev/hd3 /dev/hd1 /proc /dev/hd10opt /dev/itsoLV /dev/FCitsoLV
mounted over --------------/ /usr /var /tmp /home /proc /opt /itsoFS /fc/itsoFS
vfs -----jfs2 jfs2 jfs2 jfs2 jfs2 procfs jfs2 jfs2 jfs2
date -----------Nov 07 09:55 Nov 07 09:55 Nov 07 09:55 Nov 07 09:55 Nov 07 09:56 Nov 07 09:56 Nov 07 09:56 Nov 07 11:17 Nov 07 13:15
183
#datapath query device No device file found #lsvg rootvg #lspv hdisk0 hdisk1 hdisk2 #lsfs Name Accounting /dev/hd4 /dev/hd1 /dev/hd2 /dev/hd9var /dev/hd3 /proc /dev/hd10opt
Nodename --------
VFS
Size
Options
jfs2 196608 -jfs2 65536 -jfs2 19005440 -jfs2 65536 -jfs2 393216 -procfs --jfs2 2031616 --
The initial process for accessing the VDisks is as before. 1. Map the FlashCopy target VDisks to the host IBM_2145:ITSOCL2:admin>svctask mkvdiskhostmap -host UMNAK kanagaFS-FC Virtual Disk to Host map, id [2], successfully created IBM_2145:ITSOCL2:admin>svctask mkvdiskhostmap -host UMNAK kanagaLog-FC Virtual Disk to Host map, id [3], successfully created 2. Run Configuration Manager to pick up the new devices on the AIX server #cfgmgr -vl fscsi0 (skipped the debug output from this command) 3. Run Configuration Manager to create vpaths with the new hdisks #cfgmgr -vl dpo At this point, the configuration of the AIX server has been changed. Example 7-9 shows the new status.
Example 7-9 AIX configuration after presenting FlashCopy target VDisks
184
Total Devices : 2
DEV#: 0 DEVICE NAME: vpath2 TYPE: 2145 POLICY: Optimized SERIAL: 6005076801AD80E8E000000000000007 ========================================================================== Path# Adapter/Hard Disk State Mode Select Errors 0 fscsi0/hdisk3 CLOSE NORMAL 0 0 1 fscsi0/hdisk5 CLOSE NORMAL 0 0 2 fscsi0/hdisk7 CLOSE NORMAL 0 0 3 fscsi0/hdisk9 CLOSE NORMAL 0 0 DEV#: 1 DEVICE NAME: vpath3 TYPE: 2145 POLICY: Optimized SERIAL: 6005076801AD80E8E000000000000009 ========================================================================== Path# Adapter/Hard Disk State Mode Select Errors 0 fscsi0/hdisk4 CLOSE NORMAL 0 0 1 fscsi0/hdisk6 CLOSE NORMAL 0 0 2 fscsi0/hdisk8 CLOSE NORMAL 0 0 3 fscsi0/hdisk10 CLOSE NORMAL 0 0 #lspv hdisk0 hdisk1 hdisk2 hdisk3 hdisk4 hdisk5 hdisk6 hdisk7 hdisk8 hdisk9 hdisk10 vpath2 vpath3
0009cddaea97bf61 0009cdda43c9dfd5 0009cddabaef1d99 none none none none none none none none 0009cdda1b5058e4 0009cdda1b55c48c
rootvg rootvg rootvg None None None None None None None None st7s99 st7s99
Note that, this time, its the new vpaths that have PVIDs and the hdisks have none. We use the importvg command to import the information about the VG into this servers ODM: 1. Import the target volume group:
#importvg -y st7s99 vpath2 st7s99
2. Vary on the Volume Group (the importvg command should varyon the volume group):
#varyonvg st7s99
The current volume is: /dev/itsoLV Primary superblock is valid. J2_LOGREDO:log redo processing for /dev/itsoLV Primary superblock is valid. *** Phase 1 - Initial inode scan
185
*** Phase 2 *** Phase 3 *** Phase 4 *** Phase 5 File system
- Process remaining directories - Process remaining files - Check and repair inode allocation map - Check and repair block allocation map is clean.
At this point, the FlashCopy target VDisks are ready for access. Example 7-10 shows the final server state. This new filesystem contains all of the files that were in the original filesystem at the time of the freeze.
Example 7-10 AIX configuration after importing the VG
DEV#: 0 DEVICE NAME: vpath2 TYPE: 2145 POLICY: Optimized SERIAL: 6005076801AD80E8E000000000000007 ========================================================================== Path# Adapter/Hard Disk State Mode Select Errors 0 fscsi0/hdisk3 OPEN NORMAL 150 0 1 fscsi0/hdisk5 OPEN NORMAL 161 0 2 fscsi0/hdisk7 OPEN NORMAL 0 0 3 fscsi0/hdisk9 OPEN NORMAL 0 0 DEV#: 1 DEVICE NAME: vpath3 TYPE: 2145 POLICY: Optimized SERIAL: 6005076801AD80E8E000000000000009 ========================================================================== Path# Adapter/Hard Disk State Mode Select Errors 0 fscsi0/hdisk4 OPEN NORMAL 0 0 1 fscsi0/hdisk6 OPEN NORMAL 0 0 2 fscsi0/hdisk8 OPEN NORMAL 40 0 3 fscsi0/hdisk10 OPEN NORMAL 44 0 #lspv hdisk0 hdisk1 hdisk2 hdisk3 hdisk4 hdisk5 hdisk6 hdisk7 hdisk8 hdisk9 hdisk10 vpath2 vpath3 #lsvg rootvg st7s99
0009cddaea97bf61 0009cdda43c9dfd5 0009cddabaef1d99 none none none none none none none none 0009cdda1b5058e4 0009cdda1b55c48c
rootvg rootvg rootvg None None None None None None None None st7s99 st7s99
active active
186
#lsvg -l st7s99 st7s99: LV NAME itsoLV itsoLog #lsfs Name Accounting /dev/hd4 /dev/hd1 /dev/hd2 /dev/hd9var /dev/hd3 /proc /dev/hd10opt /dev/itsoLV
LPs 32 4
PPs 32 4
PVs 1 1
Nodename ---------
VFS
Size
Options
jfs2 196608 -jfs2 65536 -jfs2 19005440 -jfs2 65536 -jfs2 393216 -procfs --jfs2 2031616 -jfs2 4194304 rw
#mount node mounted -------- --------------/dev/hd4 /dev/hd2 /dev/hd9var /dev/hd3 /dev/hd1 /proc /dev/hd10opt /dev/itsoLV
mounted over --------------/ /usr /var /tmp /home /proc /opt /itsoFS
date -----------Nov 07 14:04 Nov 07 14:04 Nov 07 14:04 Nov 07 14:04 Nov 07 14:05 Nov 07 14:05 Nov 07 14:05 Nov 07 14:36
187
188
An alternative method is to disable the write cache for the disk in question. Figure 7-3 shows how to access the Properties of a Windows Disk. This will bring up a dialog box shown in Figure 7-4 on page 190.
189
By selecting Optimize for quick removal, the write cache is disabled, so you can make the break and be sure that the VDisk contents matches the image that the host has.
190
Example 7-11 shows the initial configuration of the SVC cluster presenting VDisks to this Windows server. The two VDisks represent a data drive and a log drive.
Example 7-11 Cluster configuration prior to FlashCopying two VDisks
IBM_2145:ITSOCL2:admin>svcinfo lsvdisk -delim : id:name:IO_group_id:IO_group_name:status:mdisk_grp_id:mdisk_grp_name:capacity:type :FC_id:FC_name:RC_id:RC_name:vdisk_UID:fc_map_count 4:senegalDynamic2:0:io_grp0:online:1:DS4700:36.0GB:striped:2:fcmap2:::6005076801AD 80E8E00000000000000C:1 5:senegalDynamic1:0:io_grp0:online:1:DS4700:36.0GB:striped:1:fcmap1:::6005076801AD 80E8E00000000000000B:1 6:senegalBasic:0:io_grp0:online:1:DS4700:36.0GB:striped:0:fcmap0:::6005076801AD80E 8E00000000000000A:1 IBM_2145:ITSOCL2:admin>svcinfo lshost SENEGAL id 1 name SENEGAL port_count 2 type generic mask 1111 iogrp_count 4 WWPN 210000E08B89B9C0 node_logged_in_count 2 state active WWPN 210000E08B89CCC2 node_logged_in_count 0 state active Example 7-12 shows the SDD configuration of the Windows 2003 server to which these VDisks are mapped. Figure 7-5 shows how these VDisks have been configured on a Windows 2003 server.
Example 7-12 SDD Configuration of Windows 2003 server
DEV#: 0 DEVICE NAME: Disk1 Part0 TYPE: 2145 POLICY: OPTIMIZED SERIAL: 6005076801AD80E8E00000000000000C ============================================================================ Path# Adapter/Hard Disk State Mode Select Errors 0 Scsi Port3 Bus0/Disk1 Part0 OPEN NORMAL 8 0 1 Scsi Port3 Bus0/Disk1 Part0 OPEN NORMAL 10 0 2 Scsi Port3 Bus0/Disk1 Part0 OPEN NORMAL 0 0 3 Scsi Port3 Bus0/Disk1 Part0 OPEN NORMAL 0 0 4 Scsi Port3 Bus0/Disk1 Part0 OPEN NORMAL 0 0 5 Scsi Port3 Bus0/Disk1 Part0 OPEN NORMAL 0 0 DEV#: 1 DEVICE NAME: Disk2 Part0 TYPE: 2145 POLICY: OPTIMIZED SERIAL: 6005076801AD80E8E00000000000000B ============================================================================ Path# Adapter/Hard Disk State Mode Select Errors 0 Scsi Port3 Bus0/Disk2 Part0 OPEN NORMAL 0 0
191
1 2 3 4 5
0 3 5 5 5
0 0 0 0 0
DEV#: 2 DEVICE NAME: Disk3 Part0 TYPE: 2145 POLICY: OPTIMIZED SERIAL: 6005076801AD80E8E00000000000000A ============================================================================ Path# Adapter/Hard Disk State Mode Select Errors 0 Scsi Port3 Bus0/Disk3 Part0 OPEN NORMAL 11 0 1 Scsi Port3 Bus0/Disk3 Part0 OPEN NORMAL 9 0 2 Scsi Port3 Bus0/Disk3 Part0 OPEN NORMAL 0 0 3 Scsi Port3 Bus0/Disk3 Part0 OPEN NORMAL 0 0 4 Scsi Port3 Bus0/Disk3 Part0 OPEN NORMAL 0 0 5 Scsi Port3 Bus0/Disk3 Part0 OPEN NORMAL 0 0
Figure 7-5 Showing how VDisks appear on a Windows 2003 host, prior to mapping target/secondary VDisks
192
The vdisk_UID property of a VDisk matches the SERIAL property of a vpath. Thus you can use these two properties to determine which vpath represents which VDisk. The Device Name of the vpath matches the Disk property shown under the Volumes tab as shown in Figure 7-6. Thus you can use these two properties to determine which Windows Disk represents which vpath. Subsequently, you can match a Windows Disk to a VDisk. The process below shows how to make sure that the FlashCopy target VDisks contain useful copies 1. Create the FlashCopy target VDisks IBM_2145:ITSOCL2:admin>svctask mkvdisk -vtype striped -unit gb -size 36 -iogrp 0 -mdiskgrp DS4700 -name senegalBasic-FC Virtual Disk, id [3], successfully created IBM_2145:ITSOCL2:admin>svctask mkvdisk -vtype striped -unit gb -size 36 -iogrp 0 -mdiskgrp DS4700 -name senegalDyn1-FC Virtual Disk, id [8], successfully created IBM_2145:ITSOCL2:admin>svctask mkvdisk -vtype striped -unit gb -size 36 -iogrp 0 -mdiskgrp DS4700 -name senegalDyn2-FC Virtual Disk, id [7], successfully created 2. Create a FlashCopy consistency group IBM_2145:ITSOCL2:admin>svctask mkfcconsistgrp -name senegalFC FlashCopy Consistency Group, id [1], successfully created 3. Create FlashCopy mappings for the VDisks and add them to the new FlashCopy consistency group IBM_2145:ITSOCL2:admin>svctask mkfcmap -source senegalBasic -target senegalBasic-FC -consistgrp senegalFC FlashCopy Mapping, id [0], successfully created
193
IBM_2145:ITSOCL2:admin>svctask mkfcmap -source senegalDynamic1 -target senegalDyn1-FC -consistgrp senegalFC FlashCopy Mapping, id [1], successfully created IBM_2145:ITSOCL2:admin>svctask mkfcmap -source senegalDynamic2 -target senegalDyn2-FC -consistgrp senegalFC FlashCopy Mapping, id [2], successfully created 4. Prepare the FlashCopy consistency group IBM_2145:ITSOCL2:admin>svctask prestartfcconsistgrp senegalFC 5. Wait until the consistency group is in the prepared state IBM_2145:ITSOCL2:admin>svcinfo lsfcconsistgrp id name status 1 senegalFC preparing . . . IBM_2145:ITSOCL2:admin>svcinfo lsfcconsistgrp id name status 1 senegalFC prepared 6. Disable the write cache for the Windows Disks as shown in Figure 7-4 on page 190 7. Start the FlashCopy consistency group. This is the freeze point. IBM_2145:ITSOCL2:admin>svctask startfcconsistgrp senegalFC 8. Re-enable the write cache for the Windows Disks At this point, the FlashCopy operation has been started and VDisks 3, 8 and 7 are exact copies of VDisks 6, 5 and 4 at the time of the FlashCopy consistency group being started.
194
At this point, the configuration of the Windows host has been changed. Figure 7-8 on page 196 shows the new status. The new Disks, Disk 4 and Disk 6 appear as unallocated. These are the Dynamic Disks (as is reported by the LDM). Disk 5, the Basic Disk has already been recognized as one. All that needs to be done is to assign it a drive letter as show in Appendix 7-1, Choosing to change the Drive Letter of a Windows Disk on page 189. Clicking on Add brings up the dialog box as shown in Figure 7-9 on page 197 Once a drive letter has been assigned to your Basic Drives, you should run chkdsk to ensure filesystem consistency as shown in Example 7-13. This is particularly important if the break was made due to an unplanned Metro/Global Mirror stoppage.
Example 7-13 Running chkdsk on a newly mapped target/secondary VDisk
C:\Program Files\IBM\Subsystem Device Driver>chkdsk /f e: The type of the file system is NTFS. Volume label is basicVol. CHKDSK is verifying files (stage 1 of 3)... File verification completed. CHKDSK is verifying indexes (stage 2 of 3)... Index verification completed. CHKDSK is verifying security descriptors (stage 3 of 3)... Security descriptor verification completed. Windows has checked the file system and found no problems.
195
KB KB KB KB KB KB KB
total disk space. in 2 files. in 9 indexes. in bad sectors. in use by the system. occupied by the log file. available on disk.
4096 bytes in each allocation unit. 9436171 total allocation units on disk. 9419381 allocation units available on disk. Target/secondary VDisks which are Dynamic Disks should never be presented to a host which has visibility of the source/primary VDisk as there is a risk of data loss.
196
IBM_2145:ITSOCL2:admin>svctask mkvdiskhostmap -host SIAM senegalBasic-FC Virtual Disk to Host map, id [2], successfully created IBM_2145:ITSOCL2:admin>svctask mkvdiskhostmap -host SIAM senegalDyn1-FC Virtual Disk to Host map, id [3], successfully created IBM_2145:ITSOCL2:admin>svctask mkvdiskhostmap -host SIAM senegalDyn2-FC Virtual Disk to Host map, id [4], successfully created As in Figure 7-7 on page 195, the next step is to scan for hardware changes. The result of this is shown in Figure 7-10. As is shown, the Basic Disk is picked up normally and just needs a Drive Letter assigned to it. Figure 7-10 on page 198 also shows the state of the Dynamic Disks. They register as Foreign. By selecting Import Foreign Disks..., you will see the dialog box shown in Figure 7-11 on page 198. This is followed by Figure 7-12 on page 199 which lists the drives that you will import. At this point, all of the drives letter have been assigned to your VDisks; you should run chkdsk to ensure filesystem consistency as shown in Example 7-13. This is particularly important if the freezing was due to an unplanned Metro/Global Mirror stoppage.
197
198
199
IBM_2145:ITSOCL2:admin>svcinfo lsvdisk -delim : id:name:IO_group_id:IO_group_name:status:mdisk_grp_id:mdisk_grp_name:capacity:type :FC_id:FC_name:RC_id:RC_name:vdisk_UID:fc_map_count 8:diomede-1ary:0:io_grp0:online:0:DS4500:36.0GB:striped:::::6005076801AD80E8E00000 0000000014:0 IBM_2145:ITSOCL2:admin>svcinfo lshost DIOMEDE id 0 name DIOMEDE port_count 2 type generic mask 1111 iogrp_count 4 WWPN 210000E08B0548BC node_logged_in_count 2 state active WWPN 210000E08B0541BC node_logged_in_count 2 state active
IBM_2145:ITSOCL3:admin>svcinfo lsvdisk -delim : id:name:IO_group_id:IO_group_name:status:mdisk_grp_id:mdisk_grp_name:capacity:type :FC_id:FC_name:RC_id:RC_name:vdisk_UID:fc_map_count 6:diomede-2dary:0:io_grp0:online:0:DS4500:36.0GB:striped:::::6005076801A100E908000 00000000008:0 Example 7-16 on page 201 shows the configuration of an Linux server prior to copying a VDisk with Metro Mirror.
200
Example 7-16 Linux host configuration prior to copying 2 VDisks with Metro Mirror
DEV#: 0 DEVICE NAME: vpatha TYPE: 2145 POLICY: Optimized Sequential SERIAL: 6005076801ad80e8e000000000000014 ============================================================================ Path# Adapter/Hard Disk State Mode Select Errors 0 Host0Channel0/sda OPEN NORMAL 1 0 1 Host0Channel0/sdb OPEN NORMAL 41815 0 2 Host1Channel0/sdc OPEN NORMAL 0 0 3 Host1Channel0/sdd OPEN NORMAL 41679 0
[root@diomede ~]# pvdisplay --- Physical volume --PV Name /dev/hda2 VG Name VolGroup00 PV Size 74.41 GB / not usable 0 Allocatable yes PE Size (KByte) 32768 Total PE 2381 Free PE 3 Allocated PE 2378 PV UUID Xq0UQs-94ID-tCq7-4jK2-KRt7-4iYF-lCf9wf --- Physical volume --PV Name /dev/vpatha VG Name itso PV Size 36.00 GB / not usable 0 Allocatable yes PE Size (KByte) 4096 Total PE 9215 Free PE 4607 Allocated PE 4608 PV UUID dAZQYq-VsI1-n2xp-vp0c-hfSE-glCx-MjnPV3
[root@diomede ~]# vgdisplay itso --- Volume group --VG Name itso System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 2 VG Access read/write VG Status resizable MAX LV 0 Cur LV 1 Open LV 1 Max PV 0 Cur PV 1 Act PV 1
Chapter 7. Server integration
201
[root@diomede /]# mount /dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw) none on /proc type proc (rw) none on /sys type sysfs (rw) none on /dev/pts type devpts (rw,gid=5,mode=620) usbfs on /proc/bus/usb type usbfs (rw) /dev/hda1 on /boot type ext3 (rw) none on /dev/shm type tmpfs (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) /dev/mapper/itso-mmPrimary on /mmSource type ext3 (rw) The VG which is being copied is itso which contains a single vpath, vpatha. This is an ext3 filesystem, There are no user commands for freezing this filesystem, so the only way to freeze the VDisk cleanly is to unmount the filesystem and deactivate the LV. However, with appropriate planning and scripting, the disruption can be minimized. 1. Create the Metro Mirror consistency group IBM_2145:ITSOCL2:admin>svctask mkrcconsistgrp -name diomedeMM -cluster ITSOCL3 RC Consistency Group, id [253], successfully created 2. Create the Metro Mirror relationship connecting the two VDisks and add it to the consistency group IBM_2145:ITSOCL2:admin>svctask mkrcrelationship -master diomede-1ary -aux diomede-2dary -cluster ITSOCL3 -name diomedeMM1 -consistgrp diomedeMM RC Relationship, id [8], successfully created 3. Start the consistency group IBM_2145:ITSOCL2:admin>svctask startrcconsistgrp diomedeMM 4. Monitor the consistency group and wait until it attains consistency and synchronization IBM_2145:ITSOCL2:admin>svcinfo lsrcconsistgrp diomedeMM id 253 name diomedeMM master_cluster_id 000002006B603A38 master_cluster_name ITSOCL2 aux_cluster_id 0000020068403A42 aux_cluster_name ITSOCL3 primary master 202
SVC 4.2.1 Advanced Copy Services
state consistent_synchronized relationship_count 1 freeze_time status online sync copy_type metro RC_rel_id 8 RC_rel_name diomedeMM1 5. Unmount the filesystem to flush all the data to the primary VDisk [root@diomede ~]# umount /mmSource 6. Stop the Metro Mirror consistency group. This is the freeze point. IBM_2145:ITSOCL3:admin>svctask stoprcconsistgrp -access diomedeMM IBM_2145:ITSOCL3:admin>svcinfo lsrcconsistgrp diomedeMM id 253 name diomedeMM master_cluster_id 000002006B603A38 master_cluster_name ITSOCL2 aux_cluster_id 0000020068403A42 aux_cluster_name ITSOCL3 primary state idling relationship_count 1 freeze_time status sync in_sync copy_type metro RC_rel_id 6 RC_rel_name diomedeMM1 7. Remount the filesystem [root@diomede ~]# mount /dev/itso/mmPrimary /mmSource At this point the Metro Mirror relationship has been stopped and diomede-2ary is an exact copy of diomede-1ary.
203
you do not present copied VDisks back to their original servers. If you determine that this is a necessary process, you should consult with LVM experts to determine a suitable process.
204
205
206
7574 Automation.fm
Chapter 8.
Automation
In this chapter, we discuss methods for automating your Copy Services solution. There are a number of methods open to you, including SVC Command Line Scripting Server side scripting SVC CIMOM Programming Automation is the removal of human decision making from system operating processes. As a general rule, system designs will require a human operator to be involved at some stage, for instance: Deciding when to stop and start FlashCopy mappings or Remote Copy relationships Deciding when to failover Remote Copy relationships (or fail back). This chapter will also discuss the importance of logging as part of automation.
207
7574 Automation.fm
8.1.1 Connection
Commands are submitted to the cluster during a connection session to the cluster. User agents make connections via the SSH protocol. SVC has a number of security features that affect how often you can attempt connections. These are to prevent attacks (malicious or accidental) from bringing an SVC node down. Although. at first glance, these features seem restrictive, they are relatively simple to work around in order to attain a valid connection. Any automation system should ensure that it behaves responsibly and does not attempt to breach the connection rules. At the very least, any automation system should ensure that it can gracefully handle rejected connection attempts. Figure 8-1 on page 209 shows how SVCs connection restrictions work. There are 2 queues in action: pending connections and active connections. The connection process follows this process: 1. Connection request comes into the SVC. If the Pending Connections queue has a free position, the request is added to it. Otherwise there are two possibilities; prior to version 4.2.1.0, the connection request times out; as of version 4.2.1.0, the connection is explicitly rejected. 2. Pending connections are handled in one of 2 ways: a. If any of the following are true, the connection request is rejected: No key is provided or the provided key is incorrect The provided username is not admin or service The Active Connections queue is full In this case, a warning is returned to the SSH client as shown in Example 8-1 on page 209 b. If none of the above are true, then the connection request is accepted and is moved from the Pending Connections queue to the Active connections queue 3. Active connections are ended after any of the following events User logs off manually SVCs SSH daemon recognizes that the connection has grown idle Network connectivity fails
208
7574 Automation.fm
The configuration node fails over In this case, both queues will be cleared as the SHH daemon will stop and restart on a different node.
Figure 8-1 SVCs SSH restrictions Example 8-1 SVC command line warning due to too many logins
Using username "admin". Authenticating with public key "rsa-key-20071010" Too many logins for 'admin'. Last login: Thu Oct 25 14:15:30 2007 from 9.67.163.247
8.1.2 Authentication
This stage is represented by step 2 of the Connection process (8.1.1, Connection). The only authentication process available is public-private key authentication. IBM System Storage SAN Volume Controller, SG24-6423 provides detailed instructions on creating keys and uploading them to the SVC. There are a few points that we strengthen here to help make automation simpler to implement
Chapter 8. Automation
209
7574 Automation.fm
service Any attempt to log on as a different user will result in a rejection, regardless of whether a valid key is provided. In this way, keys and usernames are wholly independent. The SVC GUI can have multiple usernames defined: the default username, superuser, and any others that are created. The usernames have no connection to the SVC cluster. They are, in fact, usernames for logging in to the CIMOM which runs on the Master Console. When the CIMOM logs into the SVC cluster, it will still use the admin username and the icat.ppk private key. The SVC cluster allows you to store up to 100 keys. Any of these can be used to authenticate with the cluster, regardless of which username you use on the command line. Once the user agent provide a valid username, the cluster receives the private key. If this matches with one of the clusters public keys then that keys label is remembered and used for auditing purposes. If the connection is made via that CIMOM, then the key label will always be the same (that being the public key to match the icat.ppk file). However, the username that was used to log on to the CIMOM is sent to the SVC cluster and is also remember for auditing purposes. Auditing on page 234 discusses the auditing of commands on the SVC cluster.
8.1.3 Submission
Once connected to a cluster, the user agent may start submitting commands. The syntax is checked first of all. If this fails, an appropriate error message is returned. Any automation implementation must ensure that all commands that are submitted have correct syntax. If they do not, they must be designed to handle syntax errors. Its much easier to design a solution that does not generate invalid syntax than one to handle all potential syntax errors.
8.1.4 Authorization
Commands that have valid syntax are next checked to see if the user agent has the authority to submit this command. Section 2.8.3, Authorization Roles on page 21 outlines the Authorization Roles that SVC supports. The key that was used to authenticate the connection has a role associated with it. SVC will check the submitted command against the authorization role. If the user agent is not authorized to execute this command, the following error will be returned: CMMVC6253E The command failed authorization because the session ssh key does not have the requisite role. If the user agent is authorized, the command is sent of execution.
8.1.5 Execution
When a command is executed, one of the following will occur The command will fail and an error message will be written to STDERR The command will succeed and a warning will be written to STDERR The command will succeed and a warning will be written to STDERR and information will be sent to STDOUT The command will succeed and information will be written to STDOUT The command will succeed and nothing will be written.
210
7574 Automation.fm
Data written to STDOUT and STDERR by the cluster should be written to STDOUT and STDERR by your SSH client, but you will need to check this yourself.
[root@heket]/ >ssh -i privateKey -l admin rc-cluster-13 svcinfo lscluster -delim : id:name:location:partnership:bandwidth:cluster_IP_address:cluster_service_IP_addre ss:id_alias 00000200694052D0:rc-cluster-13:local:::9.71.42.19:9.71.42.75:00000200694052D0 [root@heket]/ >
Example 8-3 Transient connection to an SVC cluster from a Windows server
C:\Documents and Settings\Administrator>plink -i "C:\Documents and Settings\Administrator\My Documents\ITSO\private.ppk" -l admin 9.43.86.117 svcinfo lscluster -delim : id:name:location:partnership:bandwidth:cluster_IP_address:cluster_service_IP_addre ss:id_alias 0000020060406FCA:ITSOCL1:local:::9.43.86.117:9.43.86.118:0000020060406FCA C:\Documents and Settings\Administrator> These transient connections go through all 5 stages of running a command and return to the command line. You can redirect the two output streams (STDOUT and STDERR) using the operating systems standard redirection operators to capture the responses. These lengthy invocations can be shorted in client specific ways. The AIX SSH client allows for the use of user configuration files. The configuration file in Example 8-4 would allow you to create a transient connection as shown in Example 8-5.
Chapter 8. Automation
211
7574 Automation.fm
Host rc13 HostName rc-cluster-13 IdentityFile /privateKey User admin Host someOtherCluster IdentityFile /someOtherKey User admin
Example 8-5 Transient connection to an SVC cluster using ssh using a configuration file
[root@heket]/ >ssh -F sampleCfg rc13 svcinfo lscluster -delim : id:name:location:partnership:bandwidth:cluster_IP_address:cluster_service_IP_addre ss:id_alias 00000200694052D0:rc-cluster-13:local:::9.71.42.19:9.71.42.75:00000200694052D0 [root@heket]/ > Shortening the plink invocation requires the creation of a PuTTY session. In order to do this, open up the PuTTY application and enter admin@<cluster IP address> in the Host Name textbox as in Figure 8-2
The next step is to configure the private key for this session. Select the Connection SSH Auth category as in Figure 8-3 on page 213
212
7574 Automation.fm
Figure 8-3 Setting the private key for a PuTTY SSH session
Select the appropriate private key using the Browse... button and locating it in your filesystem. The final step is to save the session for future use. A descriptive session name is advised as shown in Figure 8-4 on page 213
Chapter 8. Automation
213
7574 Automation.fm
Once a session has been saved, it can be used for making transient connections via the command line as in Example 8-6
Example 8-6 Transient connection to an SVC cluster using plink with a PuTTY session
C:\Documents and Settings\Administrator>plink -load ITSOCL1 svcinfo lscluster -delim : id:name:location:partnership:bandwidth:cluster_IP_address:cluster_service_IP_addre ss:id_alias 0000020060406FCA:ITSOCL1:local:::9.43.86.117:9.43.86.118:0000020060406FCA C:\Documents and Settings\Administrator>
001. svcinfo lsvdisk -nohdr | while read id name IOGid IOGname status rest
214
7574 Automation.fm
002. do 003. if [ "$status" != "online" ] 004. then 005. echo "VDisk '$name' \($id\) is $status" 006. fi 007. done
Line 1 is of particular note. This line submits the svcinfo lsvdisk command and pipes the output to the read command, combined with a while command. This creates a loop which executes once per line of output from the svcinfo command. The read command is followed by a list of variables. A line is read from the svcinfo command and the first word in that line is assigned to the first variable, the second word is assigned to the second variable and so on, with any left over words assigned to the final variable (with intervening spaces included). We use the -nohdr parameter because were not interested in this information. Lines 3 to 6 simply check the status variable. If it is not equal to online, then the information is printed to STDOUT.
svcinfo lsmdisk -nohdr | while read id name rest do svcinfo lsmdisk $id | while read key value do if [ "$key" == "quorum_index" ] then if [ "$value" != "" ] then echo "MDisk $id ($name) is quorum disk $value" fi fi done done
Example 8-9 Submission of a batch file to SVC via ssh
[root@heket]/ >ssh -F sampleCfg rc13 -T < batchFile.sh MDisk 0 (mdisk0) is quorum disk 0 MDisk 1 (mdisk1) is quorum disk 1 MDisk 2 (mdisk2) is quorum disk 2
Chapter 8. Automation
215
7574 Automation.fm
Settings\Administrator\My Documents\SVC>plink -load ITSOCL1 -m is quorum disk 0 is quorum disk 1 is quorum disk 2
001. echo vDisk,mDisk,Controller,mDisk Group,Extents; 002. 003. vdiskIds=(`svcinfo lsvdisk -nohdr | while read id rest; do echo -n "$id "; done`) 004. vdiskNames=(`svcinfo lsvdisk -nohdr | while read id name rest; do echo -n "$name "; done`) 005. vdiskNameMap=() 006. for (( i = 0 ; i < ${#vdiskNames[@]} ; i++ )) 007. do 008. vdiskNameMap[${vdiskIds[$i]}]=${vdiskNames[$i]} 009. done 010. 011. svcinfo lsmdisk -nohdr | while read mdiskId mDiskName status mode mdgId mdgName capacity LUN controllerName UniqueID; 012. do 013. svcinfo lsmdiskextent -nohdr $mdiskId | while read vdiskId extents; 014. do 015. echo ${vdiskNameMap[$vdiskId]},$mDiskName,$controllerName,$mdgName, $extents; 016. done 017. done Line 1 simply generates the table header row Lines 3 and 4 work around a limitation of the bash shell. If you assign a value to a variable while inside a loop that is running from a pipe, that value is not available to you when outside the loop. A way to get around this is command substitution. Line 3 creates an array of VDisk ids by looping through all of the vdisks and printing the id. This output is captured using backticks. The parentheses turn this list of ids into an array. Line 4 does the same with VDisk names Lines 5 to 9 create an associative array that maps a VDisk id to a VDisk name. The loop this time does not involve a pipe, so the changes to the vdiskNameMap array are available after line 9. Line 11 begins a loop over all MDisks.
216
7574 Automation.fm
Line 13 loops over all of the MDisk Extent records for the current MDisk. A line is printed for each VDisk that uses extents from the current MDisk.
001. 002. 003. 004. 005. 006. 007. 008. 009. 010. 011. 012. 013. 014. 015. 016. 017. 018. 019. 020. 021. 022. 023. 024. 025.
#!/bin/ksh # # # # # # # # # # # # # # # # # # # #
SVC Command Queue This script implements a queue that any number of clients can write to. The clients provide SVC commands and the name of a file to where the output should be written Commands should be written to the queue thus: <command><delimiter><outFile> command: SVC command to be submitted to the cluster delimiter: User definable character (defined in this script) outFile: File to which the output of the SVC command should be written e.g.: echo svcinfo lscluster -delim :+/tmp/output This would send the 'svcinfo lscluster -delim :' command to the cluster and place the output in the file '/tmp/output' The '+' character delimits the command and the outpue file
Chapter 8. Automation
217
7574 Automation.fm
026. 027. 028. 029. 030. 031. 032. 033. 034. 035. 036. 037. 038. 039. 040. 041. 042. 043. 044. 045. 046. 047. 048. 049. 050. 051. 052. 053. 054. 055. 056. 057. 058. 059. 060. 061. 062. 063. 064. 065. 066. 067. 068. 069. 070. 071. 072. 073. 074. 075. 076. 077. 078. 079. 080.
########################################################### # # Opens an SSH pipe and purges any extraneous data from the buffer # SSHPID gets set to the PID of the SSH process # # This function assumes that the connection will work # open_SSH_pipe() { echo "Opening SSH pipe to $CL..." ssh -p 22 -q admin@$CL 2>&1 |& SSHPID=$! echo "Started SSH process: $SSHPID" # # Purge any data from the connection # echo "Purging connection buffer..." svc_transaction "svcinfo lscluster" "/dev/null" echo "Connection buffer purged" } # # Opens the command FIFO and connects it to file descriptor 4 # open_command_FIFO() { # if the FIFO doesn't exists, create it if [ ! -a $FIFO ] then echo "Cannot find $FIFO so creating it" mkfifo $FIFO fi exec 4<$FIFO } # # svc_transaction(command,outputfile) # # Submits the supplied command to the SVC cluster # Send the output to the outputfile # svc_transaction() { # # First, submit the command to the cluster # followed by a command to print the return code # and then a command to print the End Of Output string # print -p "$1" print -p "echo \$?" print -p "echo $COMMAND_ENDER" #
218
7574 Automation.fm
081. 082. 083. 084. 085. 086. 087. 088. 089. 090. 091. 092. 093. 094. 095. 096. 097. 098. 099. 100. 101. 102. 103. 104. 105. 106. 107. 108. 109. 110. 111. 112. 113. 114. 115. 116. 117. 118. 119. 120. 121. 122. 123. 124. 125. 126. 127. 128. 129. 130. 131. 132. 133. 134. 135.
# Now, read back from the SVC cluster # read -p prevLine while true do read -p currLine if [ "${currLine}" == "$COMMAND_ENDER" ] then # # Append the SVC Return Code to the output file # echo $RC_PREPEND$prevLine$RC_APPEND >> $2 echo $COMMAND_ENDER >> $2 return else echo "${prevLine}" >> $2 prevLine=$currLine fi done } ########################################################### # Functions end ###########################################################
# # CL: cluster name - to be provided on the command line # FIFO: FIFO name # DELIM: Delimiter separating commands from their output files # COMMAND_ENDER: String that signifies that the SVC command output has ended # RC_PREPEND: # : Strings that wrap round the return code from the SVC cluster # RC_APPEND : # if [ "$1" == "" ] then echo "Please provide a cluster name" return 0 fi CL=$1 FIFO=/tmp/FIFO.$CL DELIM=+ COMMAND_ENDER="+++COMPLETE+++" RC_PREPEND="+++RC:" RC_APPEND="+++"
open_SSH_pipe open_command_FIFO echo "Queue is ready..." while true do while read CMD <&4
Chapter 8. Automation
219
7574 Automation.fm
136. 137. 138. 139. 140. 141. 142. 143. 144. 145. 146. 147. 148. 149. 150. 151. 152. 153. 154. 155. 156. 157. 158. 159. 160. 161. 162.
do OUTFILE=`echo $CMD | cut -d $DELIM -f 2` echo "Outfile: $OUTFILE" SVCCMD=`echo $CMD | cut -d $DELIM -f 1` echo "SVC Command: $SVCCMD" # # Probably a good idea to check that the SSH process is still running and # handle it if it is not. # ps -p $SSHPID | grep -q ssh if [ $? = 0 ] then svc_transaction "$SVCCMD" $OUTFILE else # # Handle the fact that SSH is no longer running # echo "SSH pipe seems to have died" return 0 fi done done # # Closes FIFO, although we will never get here. # exec 4<&-
open_SSH_pipe
This function runs from lines 33 to 47 and has the job of opening up the connection to the SVC cluster. The only input is a global variable called $CL which holds the name of the cluster. The function is quite simple, only 3 functional lines (36, 37 and 45). The first line opens up the connection, redirects STDERR to STDOUT and makes this connection a coprocess. A coprocess is a Korn shell term which means a process that is running in the background to the main process. STDIN and STDOUT of a coprocess are available to the main process for reading and writing. Line 37 saves the process id into $SSHPID for future reference. Line 45 runs a subroutine called svc_transaction to clear the IO buffer between the main process and the coprocess. This subroutine is described in , svc_transaction.
open_command_FIFO
This function runs from lines 52 to 61 and has the job of opening up a First In First Out (FIFO) file. The FIFO file acts as a queue of commands that this script must handle. External scripts add commands to this queue and this script takes them off the queue in the order that they came in and submits them to the cluster. A FIFO file is a Unix construct. It is essentially a named pipe. Lines 55 to 59 look to see if the FIFO file has been created (and create it if it hasnt been). Line 60 opens up the FIFO file with file descriptor 4 for reading. A file descriptor is simply a handle to this file; Unix shells can read and write from these file descriptors. 220
SVC 4.2.1 Advanced Copy Services
7574 Automation.fm
svc_transaction
This function runs from lines 69 to 100 and has the job of submitting a command to the SVC cluster and writing the output to a file. It takes two parameters; the first is the full command to submit to the cluster and the second is a local file, to which the output of the command should be written. Lines 76 to 78 send information to the coprocess, i.e. the persistent connection. This is done with the print -p command.First, the command is sent. Then, a request to echo the return code of the command. Finally, a request to echo a known string. This is used to detect the end of output from the submitted command. Lines 83 to 99 handle the gathering of the clusters response. The read -p reads from the coprocess and puts the information into the supplied variable. The loop is fairly simple: Read one line from the coprocess and save as prevLine Start Of Loop Read next line from coprocess as currLine If currLine matches the end of command string a. Write prevLine to output file with a wrapper indicating that it is the return code b. Write the end of command string to the output file c. End subroutine 5. If not: a. Write prevLine to output file b. Save currLine as prevLine 6. Goto step 2 Once this subroutine is complete, the IO buffer to the coprocess will be clear 1. 2. 3. 4.
Main Script
The main script runs from line 116 to 162 and sets up the FIFO and persistent connection and then sits waiting for commands to be added to the queue, before submitting them to the cluster. Lines 116 to 126 set up various variables required for execution. A more mature implementation would allow these to be set via a configuration file, but this method suffices for a demonstration. The script requires that a cluster name be provided as a command line parameter. Lines 129 and 130 open up the connection to the SVC cluster and open up a connection to the command queue (the FIFO file) Lines 133 to 157 are the main loop. This loop monitors the command queue and handles incoming commands. The following process is followed 1. Read a line from the FIFO. This is a blocking call and will wait here until a line is available 2. Split this line on a predefined delimiter. The first field is the command destined for the cluster. The second field is the file to which all output should be directed 3. Check that the connection to the cluster is still running. In this example, the script ends if the connection ends. A more sophisticated response would be to re-attempt connection. 4. If the connection is still running, the command is passed to the svc_transaction subroutine The final line should never be reached due to the constant loop, but its action is to close the file descriptor to the FIFO queue.
Chapter 8. Automation
221
7574 Automation.fm
Command submission
If multiple scripts are trying to write to the command queue that was created above, steps must be taken to ensure that the writes are atomic. That means that if two scripts attempt to write to the command queue at overlapping times, the commands written do not interleave. Example 8-13 shows a simple C program which performs an atomic append to a file. This is a perfect utility for writing to the FIFO file, when multiple scripts are accessing at the same time. It will block on the write function on line 59 until it is free to write. All other scripts attempting to write will be blocked at the same time.
Example 8-13 Code listing for a utility that performs atomic appends to a file
001. 002. 003. 004. 005. 006. 007. 008. 009. 010. 011. 012. 013. 014. 015. 016. 017. 018. 019. 020. 021. 022. 023. 024. 025. 026. 027. 028. 029. 030. 031. 032. 033. 034. 035. 036. 037. 038. 039. 040. 041. 042. 043. 044. 222
int main(int argc, char *argv[]) { /* * First parameter is the file * Second parameter is the text */ char *filename; int fileD; char *text; int textLen; // // // // Name of file to append to File descriptor (for file access) Text to append to the file in question Length of the text that is appended to the file
/* * Ensure that we have the required parameters */ if (argc != 3) { printf("Usage: append <file> <text>\n"); return -1; } filename = argv[1]; /* * The text appended to the file will have a "newline" appended to it * We also need to include space in the buffer for the null-terminator */ textLen = strlen(argv[2]) + 2; text = (char *) malloc((textLen)*sizeof(char)); if(text == NULL) { printf("Could not allocate memory\n"); return -2; } strcpy(text,argv[2]); strcat(text,"\n"); /*
7574 Automation.fm
045. 046. 047. 048. 049. 050. 051. 052. 053. 054. 055. 056. 057. 058. 059. 060. 061. 062. 063. 064. }
* Open the file that we are appending to * NB: We do not attempt to create this file if it does not exist */ fileD = open(filename, O_WRONLY | O_APPEND, 0); if(fileD < 0) { perror("Cannot open append file for writing"); return -2; } /* * Write to append file and then close the file */ write(fileD,text,textLen); close(fileD); return 0;
Handling errors
The SVC Command Line Interface Guide provides a list of the possible errors that an SVC command can result in. Its important to be able to recognize and handle these commands. Every SVC Cluster error has a unique code of the following format: CMMVCxxxxE for an error, or CMMVCxxxxW for a warning. These codes map to a single outcome, although different commands may result in identical errors. For example, the CMMVC5786E code maps on to the The action failed because the cluster is not in a stable state error, which may be returned for any command that seeks to change the cluster configuration by adding or removing an object. Its important that any automation solution at the very least reports these errors accurately, as they will be needed for troubleshooting. At the next level, an automation solution should be able to handle errors automatically. A large proportion of the errors are to do with invalid requests such as trying to use objects that do not exist, or trying to change the state of an object to an invalid state. These can be avoided by ensuring that your scripts check object states before changing them. They can also be used as sanity checks: if you hit one of these errors, something is obviously wrong and the user should be alerted.
svcinfo commands
These are critical to automation as they tell you the current state of the cluster. It is important to ascertain object states before changing them if you are to implement an enterprise level automation solution. If you use the SVCTools Perl module, then you will be able to access cluster object properties as a result of executing the functions that this module provides. In this section we discuss how to access these properties via the Korn Shell.
Chapter 8. Automation
223
7574 Automation.fm
We strongly recommend that commands submitted to the SVC cluster by an automation solution are submitted using the -delim parameter; in general, we use the colon character (:) as the delimiter. This is just a convention and you can use any character that you would not otherwise expect in the output. Once the output has been captured, each line represents an object. This line can then be split into words, separated by the chose delimiter. Each of these words represents a property At this point, you have access to the information you need; write your scripts to perform the processes according to your business logic.
svctask commands
When these commands succeed, the feedback is minimal. For svctask commands that create objects, they will return with the id of the created object. The format of the response will be <object type>, id [<new objects id>], successfully created. Thus, the newly created objects id can be captured from this line. Example 8-14 shows how this might be done in a Perl program
Example 8-14 Method for capturing a newly created SVC objects id in Perl
# # $line is a SCALAR containing the response line from SVC # if ($line =~ /(.*), id \[(\d*)\], successfully created/) { $objectType = $1; $newId = $2; } This id is important as it allows you to execute further commands against the newly created object. Other commands complete successfully with no feedback other than a return code of zero. For instance, commands that change an object will return no feedback if they are successful. It may be prudent to request their details before proceeding, to ensure that any data structures that you have created are in sync with the cluster objects states.
224
7574 Automation.fm
http://wbemservices.sourceforge.net/. There are implementations in other languages, including C++ and Python, but our experience with Java directed us to this one. Example 8-15 shows a simple Java program that connects to an SVC CIMOM. It does nothing more than connect, but this is the first step in automating with the CIMOM.
Example 8-15 Java program for connecting to an SVC CIMOM
import java.util.*; import javax.wbem.cim.*; import javax.wbem.client.*; public class ITSOClient { public static void main(String[] args) { String username = args[0]; String password = args[1]; String masterConsoleIP = args[2]; String masterConsoleSecurePort = args[3]; UserPrincipal user = new UserPrincipal(username); PasswordCredential pwd = new PasswordCredential(password); CIMNameSpace ns = new CIMNameSpace("https://+ masterConsoleIP+:+ masterConsoleSecurePort+/root/ibm"); CIMClient client = null; try { System.out.println("Connecting to CIMOM"); client = new CIMClient(ns,user,pwd); } catch (CIMException e) { // Handle the CIM Exception e.printStackTrace(); } }
Once connected to the CIMOM, the next step is to identify the cluster that you wish to work with. Before we discuss that, we will discuss some CIM Agent concepts.
Class
Chapter 8. Automation
225
7574 Automation.fm
Instance
An instance of an object that is a member of a CIM class. It is directly equivalent to an OOP object and contains all the properties of an object in the SVC configuration A way to implement a function on a class An attribute used to characterize the instance of a class A value that defines the behavior of a property, classes and methods A pointer to a CIM instance. This is a typed string that is identified as being a reference to the instance in question A formatted string that is used to access namespaces, classes and instances A class with two references which defines a relationship between the two referenced classes
The CIM classes are part of a broader, cross-vendor specification and so do not always map exactly onto SVC object types. CIM Agents Developer Reference, SC26-7904 shows all of the relevant classes.
226
7574 Automation.fm
/* * FC Mapping states */ private static UnsignedInt16 INITIALIZED = new UnsignedInt16(2); private static UnsignedInt16 PREPARING = new UnsignedInt16(3); private static UnsignedInt16 PREPARED = new UnsignedInt16(4); public static void main(String[] args) throws CIMException { /* * First step is to connect to the CIMOM */ UserPrincipal user = new UserPrincipal("superuser"); PasswordCredential pwd = new PasswordCredential("itso13sj"); CIMNameSpace ns = new CIMNameSpace("https://9.43.86.115:5989/root/ibm"); CIMClient client = null; client = new CIMClient(ns,user,pwd); /* * Next, select the cluster that we're interested in */ CIMInstance chosenCluster = getCluster("ITSOCL1",client); /* * At this point, the relevant cluster has been selected * and 'chosenCluster' is a CIMInstance of this cluster * * Get the Config Service of this cluster */ CIMObjectPath cService = getConfigService(chosenCluster, client); /* * Now, get all of the VDisks in this cluster */ Map<Integer,CIMObjectPath> vdisksById = getVDisks(chosenCluster,client); /* * Select the FlashCopy Source * * In this case, VDisk 10 is our source * VDisk 11 is our target */ CIMObjectPath fcSrc = vdisksById.get(new Integer(10)); CIMObjectPath fcTgt = vdisksById.get(new Integer(11));
Chapter 8. Automation
227
7574 Automation.fm
/* * Now, create FC Mapping */ CIMValue rc = makeFlashCopyMapping("CIMOMTestMap", fcSrc, fcTgt, cService, client,false); /* * Now that this has been created, we need to get an * Object Path to the newly created Association */ List<CIMObjectPath> fcMaps = getFCMappings(fcSrc, client); CIMObjectPath fcMapping = fcMaps.get(0); /* * Now, we prepare the FC Mapping */ CIMArgument[] outArgs = new CIMArgument[2]; rc = prepareFCMapping(cService, fcMapping, client, outArgs); System.out.println("Got value:"+ Integer.toHexString(Integer.parseInt(rc.toString()))); /* * Loop until it is prepared */ CIMValue fcMapState = new CIMValue(PREPARING); while(fcMapState.equals(new CIMValue(PREPARING))) { CIMInstance fcMapInfo = client.getInstance(fcMapping); fcMapState = fcMapInfo.getProperty("SyncState").getValue(); } /* * Now start the FC Mapping */ rc = startFCMapping(cService, fcMapping, client, outArgs); System.out.println("Got value:"+ Integer.toHexString(Integer.parseInt(rc.toString()))); } The assumption in this example is that your Java program is designed to control the same cluster every time. It is a relatively simple process to make it more flexible, but that is left to you.
getCluster method
Example 8-17 shows the getCluster method. This method returns the CIM Instance which corresponds to the cluster with the supplied name. It does this by enumerating all of the instances of the class IBMTSSVC_Cluster and then checking the name of each one. When one is found which matches the supplied name, an object path to that instance is returned.
Example 8-17 getCluster method
228
7574 Automation.fm
{ CIMInstance chosenCluster = null; Enumeration<CIMInstance> clusters = client.enumerateInstances(new CIMObjectPath("/root/ibm:IBMTSSVC_Cluster")); while(clusters.hasMoreElements()) { CIMInstance possibleCluster = clusters.nextElement(); String possibleName = possibleCluster.getProperty("ElementName").getValue().toString(); if(possibleName.equals("\""+clusterName+"\"")) { chosenCluster = possibleCluster; } } return chosenCluster; }
getConfigService method
Example 8-18 shows the getConfigService method. The CIM_StorageConfigurationService class has no direct equivalent in an SVC, but an Instance of this Class is required for invoking Methods against. In this method, we request all of the Instances that are associated with the supplied cluster. The Association that connects a cluster to its configuration service is CIM_HostedService. A cluster will only have configuration service associated with it, so we can select the first Object Path in the enumeration.
Example 8-18 getConfigService method
static private CIMObjectPath getConfigService(CIMInstance cluster, CIMClient client) throws CIMException { Enumeration<CIMObjectPath> configServices = null; configServices = client.associatorNames( cluster.getObjectPath(), "CIM_HostedService", "CIM_StorageConfigurationService", null, null); return configServices.nextElement(); }
getVDisks method
Example 8-19 shows the getVDisks method. This returns a Map, relating VDisk ids (as Integers) to IBMTSSVC_StorageVolume Object Paths. The method requests all of the IBMTSSVC_StorageVolume Instances that are associated with the provided cluster Instance.
Chapter 8. Automation
229
7574 Automation.fm
static private Map<Integer,CIMObjectPath> getVDisks(CIMInstance cluster, CIMClient client) throws CIMException { Enumeration<CIMObjectPath> vdisks = client.associatorNames( cluster.getObjectPath(), null, "IBMTSSVC_StorageVolume", null, null); Map<Integer,CIMObjectPath> vdisksById = new HashMap<Integer, CIMObjectPath>(); while(vdisks.hasMoreElements()) { CIMObjectPath vdiskOP = vdisks.nextElement(); CIMValue vdiskId = vdiskOP.getKey("DeviceID").getValue(); String idAsString = vdiskId.toString(); String idNoQuotes = idAsString.substring(1, idAsString.length()-1); vdisksById.put(Integer.parseInt(idNoQuotes), vdiskOP); } return vdisksById; }
makeFlashCopyMapping method
Example 8-20 shows the makeFlashCopyMapping method. It does this by invoking the AttachReplica against the cluster configuration service. CIM Methods take typed parameters. In this method, you can see the use of the argRef, argString and argUint16 methods. These are defined later in this section, but they act as shortcuts to generating the required arguments for the CIM Method. Note the use of CopyType. The AttachReplica method is used for FlashCopy, Metro Mirror and Global Mirror and its the CopyType argument which indicates which type is required.
Example 8-20 makeFlashCopyMapping
static private CIMValue makeFlashCopyMapping( String name, CIMObjectPath source, CIMObjectPath target, CIMObjectPath configService, CIMClient client, boolean autodelete) throws CIMException { CIMArgument src = argRef("SourceElement", source, "IBMTSSVC_StorageVolume"); CIMArgument tgt = argRef("TargetElement", target, "IBMTSSVC_StorageVolume"); CIMArgument fcName = argString("ElementName",name); CIMArgument type = argUint16("CopyType",autodelete?5:4); CIMArgument[] inArgs = {src,tgt,fcName,type}; CIMArgument[] outArgs = new CIMArgument[1]; CIMValue rc = client.invokeMethod(configService, 230
SVC 4.2.1 Advanced Copy Services
7574 Automation.fm
getFCMappings
Example 8-21 shows the getFCMappings method. This method returns a List of all the FCMappings associated with the provided vdisk. It requests a list of all of the Associations which reference the provided IBMTSSVC_StorageVolume. Currently, all of the Java WBEM Services methods of this type return Enumerations. This method converts this to a List for ease of use.
Example 8-21 getFCMappings method
static private List<CIMObjectPath> getFCMappings(CIMObjectPath vdisk, CIMClient client) throws CIMException { Enumeration<CIMObjectPath> assocs = client.referenceNames( vdisk, "IBMTSSVC_LocalStorageSynchronized", null); return Collections.list(assocs); }
prepareFCMapping method
Example 8-22 shows the prepareFCMapping method. This method prepares a FlashCopy Mapping. Much like the AttachReplica Method, the ModifySynchronization Method is used to control FlashCopy, Metro Mirror and Global Mirror; its the Operation parameter which indicates what you actually want to do.
Example 8-22 prepareFCMapping
private static CIMValue prepareFCMapping( CIMObjectPath configService, CIMObjectPath fcMapping, CIMClient client, CIMArgument[] outArgs) throws CIMException { CIMArgument operation = argUint16("Operation", 6); CIMArgument synch = argRef("Synchronization", fcMapping,"IBMTSSVC_FlashCopyStorageSynchronized"); CIMArgument[] inArgs = new CIMArgument[]{operation,synch}; outArgs = new CIMArgument[2]; return client.invokeMethod(configService, "ModifySynchronization", inArgs, outArgs);
Chapter 8. Automation
231
7574 Automation.fm
startFCMapping method
Example 8-23 shows the startFCMapping method. This method starts a FlashCopy Mapping. As in Example 8-22, this invokes the ModifySynchronization Method. Other than using a different Operation parameter, this method is identical.
Example 8-23 startFCMapping method
private static CIMValue startFCMapping( CIMObjectPath configService, CIMObjectPath fcMapping, CIMClient client, CIMArgument[] outArgs) throws CIMException { CIMArgument operation = argUint16("Operation", 4); CIMArgument synch = argRef("Synchronization", fcMapping,"IBMTSSVC_FlashCopyStorageSynchronized"); CIMArgument[] inArgs = new CIMArgument[]{operation,synch}; outArgs = new CIMArgument[2]; return client.invokeMethod(configService, "ModifySynchronization", inArgs, outArgs); }
Argument generators
This class uses 3 argument generators: argUint16 - Example 8-24 argString - Example 8-25 argRef - Example 8-26
argUint16 method
This method returns an unsigned 16-bit integer typed argument
Example 8-24 argUint16 method
static private CIMArgument argUint16(String name, int arg) { return new CIMArgument( name, new CIMValue( new UnsignedInt16(arg), new CIMDataType(CIMDataType.UINT16) ) ); }
argString method
This method returns a string typed argument 232
SVC 4.2.1 Advanced Copy Services
7574 Automation.fm
static private CIMArgument argString(String name, String str ) { return new CIMArgument( name, new CIMValue( str, new CIMDataType(CIMDataType.STRING) ) ); }
argRef method
This method returns a Reference typed argument. It is a Reference to the Instance that the provided Object Path indicates.
Example 8-26 argRef method
static private CIMArgument argRef( String name, CIMObjectPath path, String className ) { return new CIMArgument( name, new CIMValue( path, new CIMDataType(className) ) ); }
8.6 Logging
The object of automation is to remove the human factor from performing systems operations. Many steps in a process follow directly from their previous step with little or no decision making. When performed by a human operator, these processes have a natural logging. A user will recall which steps were taken and the outcome of each step. When the human operator is removed from a process, it is important to log each step to aid in auditing and troubleshooting. The SVC audit log will register whenever an svctask command is successfully executed. The SVC error log will also register when configuration events complete. These are useful, but it is important to generate your own logging as part of your automation solution. You should log the following actions with a time and date stamp: Submission of any command to the SVC, including the full SVC CLI command or CIM Method invocation Completion of any command sent to the SVC (return code and any message) ID of any generated SVC objects
Chapter 8. Automation
233
7574 Automation.fm
If the automation solution gives up, then full explanation of why. In order to tally server, SVC and automation log, its important that all systems have a correctly set clock. The SVC cluster does not support the NTP protocol, so the only way to synchronize it with an NTP server is to use a proxy. On a Unix server, with access to a cluster, you can use the commands in Example 8-27 on page 234 to synchronize the SVC clock with your local clock. This is a script which requires user interaction, because the local servers timezone may map on to multiple possible cluster time zones. This script can be altered to be fully automatic by hard-coding the timezone code.
Example 8-27 Simple script for setting the SVC cluster clock to the local time
#!/usr/bin/ksh sshInvocation="ssh -F sampleCfg rc13" possTZs=`$sshInvocation svcinfo lstimezones -delim : | grep :\`date +%Z\`` echo "Please select a timezone" for TZ in $possTZs do echo $TZ done echo "Selection (numerical code): \c" read choice echo You chose: $choice $sshInvocation svctask settimezone -timezone $choice $sshInvocation svctask setclustertime -time `date +%m%d%H%M%Y`
8.7 Auditing
When commands are successfully executed on the SVC cluster an entry is made in the SVC audit log. Example 8-28 shows a sample audit log entry. The audit log steadily fills up with entries until it is dumped manually with the svctask dumpauditlog command, or it gets too full and dumps automatically. The entries are dumped to an audit log dumpfile.
Example 8-28 Sample audit log entry
Auditlog Entry 1086 Sequence Num: 1086 Timestamp: Thu Apr 5 08:49:13 2007 : Epoch + 1175780953 Cluster User: admin SSH Label: Administrator ICAT User: admin Result Code: 0 Result Obj ID: Action Cmd: svctask chcluster -icatip 10.2.10.96:9080
The Auditlog Entry number indicates the position of the entry in the audit log dumpfile. It is unique within that file. The Sequence Num is a unique number which continually increments. If
234
7574 Automation.fm
the entry given in Example 8-28 is the last in a dumpfile, then the first entry in the next dumpfile will have an Auditlog Entry number of 1 and a Sequence Num of 1087. The Timestamp is the time that the command was run. Epoch refers to a standard method of measuring time in a Unix environment. It is the number of seconds since midnight UTC of January 1st, 1970, not counting leap seconds. The Cluster user is the username used to access the cluster CLI. This will either be service or admin. This will exist, even if the GUI or CIMOM was used, because, ultimately, the CIMOM accesses the cluster via the CLI. The SSH Label refers to the id given to the public key that authenticated the connection. Its a useful way to track who submitted a command. If private keys are truly kept private, then this can be an effective audit policy. The ICAT User is populated when the connection to the cluster is made via the CIMOM. The username that is used to connect to the CIMOM is the one that is logged. The Result Code is either 0 or 1, depending on whether the command is successful. If the command is a mkxxx command, then Result Obj ID will hold the ID of the object that was created. The final line, Action Cmd, lists the actual command that was submitted. All of this information is sufficient to audit exactly who submitted which commands, and when. The audit log is only as useful as policies put in place to control access. If private keys and usernames are closely controlled, then the audit log give a precise history of who contacted the cluster.
Chapter 8. Automation
235
7574 Automation.fm
236
7574bibl.fm
Related publications
The publications listed in this section are considered particularly suitable for a more detailed discussion of the topics covered in this book.
IBM Redbooks
For information about ordering these publications, see How to get Redbooks on page 238. Note that some of the documents referenced here may be available in softcopy only. IBM System Storage SAN Volume Controller, SG24-6423-05 Get More Out of Your SAN with IBM Tivoli Storage Manager, SG24-6687 IBM Tivoli Storage Area Network Manager: A Practical Introduction, SG24-6848 IBM System Storage: Implementing an IBM SAN, SG24-6116 Introduction to Storage Area Networks, SG24-5470 SAN Volume Controller: Best Practices and Performance Guidelines, SG24-7521 Using the SVC for Business Continuity, SG24-7371 IBM System Storage Business Continuity: Part 1 Planning Guide, SG24-6547 IBM System Storage Business Continuity: Part 2 Solutions Guide, SG24-6548
Other resources
These publications are also relevant as further information sources: IBM System Storage Open Software Family SAN Volume Controller: Planning Guide, GA22-1052 IBM System Storage Master Console: Installation and Users Guide, GC30-4090 IBM System Storage Open Software Family SAN Volume Controller: Installation Guide, SC26-7541 IBM System Storage Open Software Family SAN Volume Controller: Service Guide, SC26-7542 IBM System Storage Open Software Family SAN Volume Controller: Configuration Guide, SC26-7543 IBM System Storage Open Software Family SAN Volume Controller: Command-Line Interface User's Guide, SC26-7544 IBM System Storage Open Software Family SAN Volume Controller: CIM Agent Developers Reference, SC26-7545 IBM TotalStorage Multipath Subsystem Device Driver User's Guide, SC30-4096 IBM System Storage Open Software Family SAN Volume Controller: Host Attachment Guide, SC26-7563
237
7574bibl.fm
7574bibl.fm
ibm.com/services
Related publications
239
7574bibl.fm
240
7574IX.fm
Index
A
AIX 175176, 178, 211 importvg 179 LVM 178 recreatevg 178179 application testing 100, 142, 149, 152 asynchronous 15, 2324, 158 attributes 101 authenticate 210 authentication 209, 224 automation 35, 84, 207209 auxiliary 2830, 55, 6768, 93 auxiliary VDisk 28, 55, 93 availability 42 consistency freeze 34 consistency group 1516, 3031, 33, 5657, 59, 9495, 97, 160, 178, 193194 consistency groups 16, 31, 33, 38, 61, 6364, 9798, 105 consistent 1213, 15, 2526, 28, 34, 5759, 9293, 95, 118, 127, 142, 175 ConsistentDisconnected 37, 89 ConsistentStopped 35, 40, 4243, 73, 8889 ConsistentSynchronized 35, 43, 73, 89 constrained link 30 copy bandwidth 2728 copy process 26, 3536, 4748, 56, 92, 94, 105, 120, 127, 142 copy rate 3, 49, 96, 120 copy service 17, 102 Copy Services 1, 57, 39, 61, 174, 188, 205, 207208, 226 Windows 2000 188 Windows 2000 limitations 188 copying state 3, 36, 108 corruption 33, 39 create a FlashCopy 149, 163
B
background copy 3, 20, 2628, 48, 70, 92, 9495, 120, 126127 background copy rate 96 backup 12, 22, 87, 93, 118, 142, 145 balance 7 bandwidth 7, 20, 2628, 48, 6970, 96, 211212, 214 bitmaps 17, 92, 102, 104 boot 202
D
data consistency 30 data flow 10 data mining 93, 100 delete a FlashCopy 149 a VDisk 149 dependent writes 30, 39, 95 detected 26, 39 disconnected 3133, 7475, 88 disk 2, 4, 8, 12, 20, 24, 28, 30, 59, 77, 82, 175, 179, 188, 215216 distance 3, 2425, 54, 68 documentation 17 dual site 84 dynamic volumes 188
C
cache 2, 4, 79, 101102, 106, 134, 159, 168, 175, 188189 caching 78, 10, 106 capacity 17, 21, 27, 102, 158159, 163, 175, 191, 200, 216 channels 26 chpartnership 22, 70, 90 chrcconsistgrp 22, 79, 90 chrcrelationship 22, 7476 CIMOM 207208, 210 CLI 68, 72, 84, 104, 117, 157, 233, 235 commands 87, 89 cluster 34, 16, 2021, 2426, 4749, 103, 105, 175, 179, 191, 208, 210211 creation 25, 50 IP address 212 cluster partnership 25, 29, 47, 5051 clusters 2426, 4648, 200, 229 command line interface 4546 concepts 225226 configuration 3, 6, 18, 21, 27, 3132, 62, 104105, 174176, 209, 211212 connected 3133, 75, 83, 210, 214, 225 connected state 3436 connectivity 27, 40, 208 consistency 7, 1213, 3031, 33, 46, 53, 56, 92, 9495, 124, 128, 159, 177178, 185
E
e-mail xv empty state 38 error 2526, 33, 77, 93, 108, 111, 129, 138, 158, 210, 223, 233 error log 37 errors 26, 3536, 87, 158, 174, 210, 223 event 27, 32, 34, 108, 135 events 106108, 208, 233 excludes 27 extent 3, 103, 216 extents 216217
241
7574IX.fm
F
failed node 42 failover 8284, 207 file system 175, 181, 195 FlashCopy 2, 6, 1112, 9193, 117119, 177179, 207, 226227 bitmap 1718, 101102, 104, 120 commands 22, 94, 106 create 9192, 118, 130 Delete 108 indirection layer 101 mapping 15, 17, 20, 92, 94, 118120, 174 Modify 130 prepare 106107, 124, 137 source 16, 18, 20, 92, 94, 97, 117, 120, 179, 188 Start 124, 137, 178, 194 target 18, 92, 94, 122, 142, 148, 178179, 184 FlashCopy mapping 2, 15, 1718, 97, 118120, 227 FlashCopy mappings 15, 18, 103, 118, 123, 161 flexibility 22, 93, 103 fmtdisk 30 focal point 26 focal point node 26 foreground I/O latency 27 format 40, 223224
InconsistentStopped 35, 73, 8889 indirection 101 indirection layer 101 install 46 integrity 30 intercluster 2021, 2426, 4648, 157 intercluster link 2628 interval 8 intracluster 24, 27, 6162 iogrp 104, 162, 177, 193 IP address 212
L
latency 3, 16, 1819, 27, 39, 96, 101 LBA 27, 42, 101 LDM 188, 195 LDM database 188 limiting factor 8 Linux 200, 203204 local cluster 2627, 75 log 2122, 35, 37, 85, 95, 174175, 177, 210, 233234 logged 21, 25, 70, 235 Logical Block Address 101 Logical Disk Manager 188 Logical Volume Manager see LVM logins 26, 209 logs 21, 95, 208, 210 LU 204 LUN 1112, 216 LUNs 11, 8384 LVM 178 LVM data structures 179
G
Global xiv, 23, 6, 12, 15, 2325, 46, 4849, 93, 102, 105, 158, 174, 230231 Global Mirror 1517, 2324, 28, 46, 4849, 102 Global Mirror relationship 22 Globally Unique Identifier see GUID GM 158 grain 2, 17, 20, 4143, 100102, 120, 126 grain size 2, 17, 100101, 120 grains 23, 17, 41, 43, 96, 100, 102, 157, 169 granularity 101 GUI 21, 4547, 117118, 142, 208, 210, 235 GUID 188
M
management xiv, 3, 7, 41, 95, 217 mapping 23, 15, 1718, 87, 92, 94, 96, 118, 120121, 174175, 192, 227 maps 4142, 111, 216, 223 master 2830, 67, 7172, 159160, 202 master VDisk 28, 77 MDisk 34, 215217 showing 216 memory 2, 8, 17, 102, 104, 222 Metro 23, 6, 12, 15, 2324, 28, 46, 48, 54, 102, 105, 117, 157158, 200202, 230231 Metro Mirror 3, 17, 20, 2324, 30, 46, 48, 75, 102, 157158, 160, 200, 202203 Metro Mirror consistency group 85 Metro Mirror relationship 24, 83, 158, 203204 mirrored 28, 39, 188 mkpartnership 6970, 90 mkrcconsistgrp 7576, 90, 202 mkrcrelationship 2930, 7172, 90, 202, 226 mount 24, 177, 179, 181 MPIO 175
H
help xv, 82, 209 host configuration 184, 195 creating 55 definitions 184
I
I/O group 3, 24, 28, 38, 96, 102, 104, 126 ICAT 21, 234235 identical data 30 idling 28, 3536, 78, 89, 203 IdlingDisconnected 36, 89 importvg 179, 185 inconsistent 1415, 31, 3334, 93, 95 inconsistent stopped state 36 InconsistentCopying 36, 73, 88 InconsistentDisconnected 37, 89
N
new mapping 107, 118, 130, 132
242
7574IX.fm
NOCOPY 120, 139 node 3, 2627, 42, 175, 177, 183, 208209 failure 42 nodes 3, 2527, 96, 103, 204 non-redundant 26
S
sample script 214 SAN xiiixiv, 1, 78, 10, 25, 46, 48, 68, 174 SAN Volume Controller xiv, 1, 72, 90 scripting 177, 202, 207, 214, 217 scripts 1, 96, 214215, 217 SDD 87, 89, 175, 191, 200 secondary 20, 2425, 27, 4849, 56, 93, 117, 157158, 174, 178179 secondary site 27 security 195, 208, 224 sequential 19, 121 serialization 20 shared 1617, 94, 102, 214 shells 220 site 20, 27, 33, 46, 8283, 157 SNIA xiv SNMP 35 Software 1 software upgrade 43 solution 67, 9, 142, 158, 207, 210211 sorting 54 source 23, 20, 84, 92, 9495, 118, 120121, 174175, 178, 227, 230 space 24, 78, 16, 41, 101102, 104, 120, 158, 196, 222 split 96, 101102, 224 SSH 21, 208209, 211 SSH client 208, 211 SSH keys 21 startrcrelationship 22, 2930, 7273, 90, 226 state 3, 1213, 24, 26, 28, 52, 5758, 96, 101102, 123125, 176, 178179, 223, 226 consistent 30, 34, 57 ConsistentDisconnected 37 ConsistentStopped 35 ConsistentSynchronized 35 empty 30, 38, 76, 79, 129, 165 idling 3637, 78 IdlingDisconnected 36 inconsistent 3536 InconsistentCopying 36 InconsistentDisconnected 37 InconsistentStopped 35 synchronized 24, 34, 5758, 107 state fragments 32 State overview 31 state transitions 109 states 25, 31, 34, 73, 75, 77, 106, 109, 134, 223224, 227 statistics 19 stoprcconsistgrp 22, 78, 8889, 203 stoprcrelationship 22, 30, 35, 74, 78, 90 storage virtualization xiv striped 121, 158159, 176177, 188 superuser 210, 227 SVC xiii, 13, 79, 2426, 4648, 91, 93, 96, 117, 120, Index
O
offline 40, 42, 8485, 104, 106107, 121 online xv, 4042, 7273, 76, 104, 107, 121, 125, 158, 174, 176, 191, 214215 ordering 12, 20, 33, 39, 111 overwritten 14, 33, 127
P
partnership 25, 29, 4749, 211212, 214 path offline 40 paths 43, 175 peak 21, 28 per cluster 16, 103, 105 performance 3, 7, 15, 19 Physical Volume Identifier see PVID planning 56, 9, 177, 202 plink 211213 point-in-time copy 34, 93, 158 policy 235 PPRC configuration limits 38 prepared state 178, 194 primary 20, 2425, 27, 56, 58, 64, 158160, 174, 178179 priority 37, 97, 120, 126, 145 private key 21, 209210, 212 production VDisk 28, 149, 151 productivity xv public key 21, 209210, 235 PuTTY 212214 PuTTY application 212 PuTTY session 212213 PVID 178 PVIDs 178179, 185
Q
quickly 8, 158 quorum disk 215216
R
recreatevg 178179 AIX 179 recreatevg command 179 Redbooks Web site 238 Contact us xv redundant 9, 26 registry 188 relationship 1214, 24, 26, 28, 4647, 52, 92, 96, 102, 130, 139, 146, 174, 179, 202, 226 remote cluster 20, 26, 50, 52, 55 removed 38, 75, 92, 233 restarting 120
243
7574IX.fm
145, 174175, 179, 207209 SVC cluster 26, 30, 35, 50, 52, 55, 103, 194, 200, 210212 SVC configuration 226 svcinfo 22, 40, 6970, 72, 104, 116, 158160, 175176, 178, 211212, 214 svcinfo lsmdiskextent 216 svctask 22, 6971, 104, 161163, 177179, 224, 233234 svctask mkfcmap 162, 178, 193194 switchrcconsistgrp 22, 81, 90 switchrcrelationship 22, 90 synchronization 15, 2930, 35, 93, 179, 202 Synchronized 3435 synchronized 15, 3031, 34, 5556, 66, 93, 158 synchronizing 29, 77
T
target 23, 20, 34, 8284, 9294, 118, 120, 122, 174, 177178, 227, 230 tasks 1, 61, 82, 94, 179, 194 time 2, 89, 11, 31, 3334, 56, 61, 75, 9294, 118, 120, 122, 174, 178, 181, 216, 222, 228 transitions 3537, 109
U
upgrade 43
V
VDisk 23, 7, 1011, 2425, 28, 52, 5455, 9294, 118, 120121, 173175, 215217 assigning 107 creating 28, 99, 121 information 7, 101, 178 working with 149 VGDA 178 VGID 178 virtualization xiv volume group 178179, 185 Volume Group Descriptor Area see VGDA Volume Group Identifier see VGID
W
Windows dynamic volumes 188 Windows 2000 Copy Services 188 limitations 188 Windows 2003 188, 191192 Write ordering 12, 33 write ordering 12, 39 write through mode 106 writes 89, 11, 25, 2728, 4849, 95, 107, 115, 175, 188, 222 write-through mode 12 WWPN 176, 191, 200
244
To determine the spine width of a book, you divide the paper PPI into the number of pages in the book. An example is a 250 page book using Plainfield opaque 50# smooth which has a PPI of 526. Divided 250 by 526 which equals a spine width of .4752". In this case, you would use the .5 spine. Now select the Spine width for the book and hide the others: Special>Conditional Text>Show/Hide>SpineSize(-->Hide:)>Set . Move the changed Conditional text settings to all files in your book by opening the book file with the spine.fm still open and File>Import>Formats the
7574spine.fm
245
To determine the spine width of a book, you divide the paper PPI into the number of pages in the book. An example is a 250 page book using Plainfield opaque 50# smooth which has a PPI of 526. Divided 250 by 526 which equals a spine width of .4752". In this case, you would use the .5 spine. Now select the Spine width for the book and hide the others: Special>Conditional Text>Show/Hide>SpineSize(-->Hide:)>Set . Move the changed Conditional text settings to all files in your book by opening the book file with the spine.fm still open and File>Import>Formats the
7574spine.fm
246
Back cover
Learn about the new Advanced Copy Services functionality Server integration examples Scripting examples
This book describes the new features that have been added with the release of the IBM System Storage SAN Volume Controller 4.2.1 code. Readers are expected to have an advanced knowledge of the SVC and SAN environment, and we recommend these books as background reading: IBM System Storage SAN Volume Controller, SG24-6423 Introduction to Storage Area Networks, SG24-5470 SAN Volume Controller: Best Practices and Performance Guidelines, SG24-7521 Using the SVC for Business Continuity, SG24-7371