Steps for migrating data with XRC

Before you begin, you need to be familiar with the commands used in the following steps. For additional information about XRC commands, refer to Extended remote copy command descriptions.

The steps for data migration with XRC are as follows:

  1. Initiate a migration session by specifying SESSIONTYPE(MIGRATE) on the XSTART command. The XSTART command directs the system data mover to start a migration session. (XRC uses the system data mover for disaster recovery purposes and for migration.)

    In migration mode, data consistency across all volumes is only important when migration is complete. Therefore, it is best to specify ERRORLEVEL(VOLUME) on the XSTART command for a migration session. If an error occurs, XRC suspends the volume pair that incurred the error. After you correct the error, issue an XADDPAIR SUSPENDED command to add back the volume pair into the XRC session. Meanwhile, XRC continues to copy other volume pairs.

    To start a session called, for example, MIGRATE, you must already have allocated the state data set with the session ID of MIGRATE. See Specifying XRC journal, control, and state data sets for more information.

    Example: The following example starts a session named MIGRATE:
     XSTART MIGRATE SESSIONTYPE(MIGRATE) ERRORLEVEL(VOLUME)
  2. Establish an XRC pair with an XADDPAIR command. Use the default ERRORLEVEL(VOLUME) option, and do not specify NOCOPY. XRC issues an ANTI8024I message when the volume or volumes are in the duplex state. This message means that the initial copy is complete and that XRC has updated the secondary volumes with all of the changes that have occurred during the copy operation.
  3. Monitor the initial copy process by issuing XQUERY TSO commands. The XQUERY command returns the percentage of the initial copy that has completed. During the initial copy, XRC also copies all primary volume updates to the secondary (target) volume.
  4. Verify that the XRC volumes are in duplex state with an XQUERY command. When the volume pair attains duplex state, XRC has copied all of the primary volume contents and all subsequent updates to the XRC secondary volume. XRC continues to update the secondary volume as changes occur to the primary.
  5. Switch to the secondary (target) volume when the copy operation is complete. To switch your application from the primary volume to the secondary volume, do the following:
    1. Stop all applications that are using the primary volume.
    2. To complete the migration at a known point in time, issue the XEND command with the ATTIME keyword or the DRAIN keyword. Specify ATTIME to ensure that XRC does not copy any updates to secondary volumes beyond the specified timestamp. Specify DRAIN when you have quiesced primary application activity and want to ensure that all application I/O has been applied to the secondary volumes before ending the session. Issue the XEND(DRAIN) command to secure all updates onto the XRC secondary volume. When all application updates have stopped, no further updates occur on the primary volumes.
    3. Issue an XRECOVER command to change the secondary volume serial number to be the same as the primary volume serial number.
    4. Vary the original primary device offline. If the secondary volume contains more cylinders than the primary volume, you must run ICKDSF Release 17 (or above) with the REFORMAT REFVTOC command against the secondary volume. This action refreshes the VTOC to reflect the additional space. The ICKDSF function should be run from a system in the production SMSPlex to ensure that DFSMS space statistics accurately reflect the larger secondary volume. If you do not run ICKDSF with REFORMAT REFVTOC, the system cannot recognize or use the extra space on the secondary volume.
    5. Restart all applications, which will now use the new disk volumes.