In a two-system HA environment, one system acts as the production system and the other acts as the backup system. Users only interact with the production system, and replication keeps the backup system synchronized with the production system. Any changes made to the production system are automatically replicated on the backup, provided you've defined rules for replication and the data has been frequently synchronized.

A role swap (which can be planned or unplanned) switches the perspective and flow of data. For example, let's say A is the production system and B is the backup system. If a role swap is triggered, B then acts as the production system and A (when available) acts as the backup system.

A swap-while-active role swap has all the benefits of a compare or read-only planned swap. In addition, it allows you to perform a test swap during working hours and continue to update files on the production system. Important: We recommend you use the Swap-While-Active method first when testing a role swap. It's the least invasive way to perform a role swap. Your production system can still run during the swap, and there's no disruption to any users on the system.

Before you begin:

Do the following before you perform a swap-while-active role swap.

  • Read Preparing for a Role Swap in the Role Swap User Guide. There are several steps you must take to ensure your data is replicated and up-to-date.

  • Run a Swap Audit to ensure that you are prepared for a successful role swap.

  • Contact Technical Support to ensure everything is ready on both systems. They'll guide you through the process and make sure the role swap completes successfully.

  • The role swap must be run with a QSECOFR-like profile.

  • Decide whether you want to run the role swap interactively or in batch:

    • If running interactively, you must be signed on to the system console.

    • If running in batch, the role swap should be running on a job queue in the controlling subsystem (QBASE or QCTL, for example).

  • We recommend you sync library RBTHALIB before attempting a swap-while-active role swap.

  • Check the Initialize Robot HA (INZRSFHA) command before you attempt this role swap. If *SWAPIP is listed as the role swap type, specify *NOSWAPIP instead. You can change the type back to *SWAPIP once the swap completes.

    *SWAPIP changes the backup system's IP address and system name to match the production system's IP address and system name. This is useful when the production system goes down during a full role swap, but in a swap-while-active role swap, the production system is not "down," only invisible. Because of this, *SWAPIP will attempt to have two systems running with the same IP address and won't allow TCP/IP to start on the backup system.

Note: Users can continue working and making changes to the production system throughout all of the following steps.

To perform the role swap:

Make sure all sync jobs have ended, then continue with the following steps:

On the production system:

  1. Sign on as QSECOFR or equivalent.

  2. From the Robot HA Main Menu, select option 2, Control Menu.

  3. Select option 6 to end audit monitor.

  4. Select option 4 to end all sychronization jobs.

  5. Select option 2 to end the Robot HA servers.

The production system should now be invisible to the backup system because the communication link has been ended (Step 5 above).

On the backup system:

  1. Sign off the system prior to running the role swap. This releases any locks you might have from working in the product.

  2. Execute the following commands to check RBTHALIB and RSFUSER for object locks:

    WRKOBJLCK OBJ(RBTHALIB) OBJTYPE(*LIB)

    WRKOBJLCK OBJ(RSFUSER) OBJTYPE(*LIB)

    If there are locks, take option 4 to remove them.

  3. Select option 7, Role Swap Menu from the Robot HA Main Menu. Then, select 10, Role Swap.

  4. Do the following on the Role Swap to Production panel:

    1. Choose whether you want to run the role swap from the system console, or specify *YES for Run in batch to submit the job to a job queue.

      Either choice will bring your system down into restricted state.
    2. If you want to flag the role swap as a test run, change Set test flag to *YES. Otherwise, leave the default as *NO. The option *NOCHG uses the value specified during the last role swap (this is helpful if your role swap needs to be restarted).

      Specifying *YES allows you to run different system startup programs, since it's flagged as a test role swap instead of a real one.
    3. Specify *YES for Are you sure?, otherwise the role swap won't proceed.

    4. Press Enter. This swaps the backup system to the production role.

  5. After submitting the role swap, watch for messages in the following places:

    • If running interactively, the messages will show up on the screen or in your interactive joblog.

    • If running in batch, watch for messages in QSYSOPR until the swap completes successfully.

      Because running the role swap in batch sends you into restricted state, you will lose your interactive session and need to wait until the system comes out of restricted state to see the current progress of the role swap.
  6. Then, ensure the server has started and subsystem RSFUSER/RSFHA is active. You may need to start them manually.

    • To check the server, navigate to the Control Menu and view the "Robot HA is" status.

    • To check the subsystem, execute the WRKSBS command and look for RSFHA in the list of subsystems.

When the role swap completes, users can sign on. The production system should be hidden (the communication link was ended), and the backup system is in the production role.

Verify your data is correct. It is recommended that you do not allow changes to the backup system (currently in the production role) during the test.

Note: We recommend you do not attempt to run any synchronization or audit jobs during the test.

To end the role swap:

Note: Make sure all users are signed off the backup system (currently in the production role).

On the system in the production role:

  1. Sign off the system prior to running the role swap. This releases any locks you might have from working in the product.

  2. On the system in the production role, execute the following command to clear the RSFUSER job queue and remove any synchronization jobs that might not have been submitted in a previous step:

    CLRJOBQ JOBQ(RSFUSER/RSFHA) LOG(*NONE)

    This ensures that any journal changes made on the backup system during the swap-while-active role swap aren't applied to the production system.

  3. Select option 7, Role Swap Menu from the Robot HA Main Menu. Then, select 10, Role Swap.

  4. Do the following on the Role Swap to Backup panel:
    1. Choose whether you want to run the role swap from the system console, or specify *YES for Run in batch to submit the job to a job queue.

      If you choose to run in batch, the system will be brought down into restricted state.
    2. Specify *YES for Are you sure?, otherwise the role swap won't proceed.

    3. Press Enter. This swaps the system back to the backup role.

  5. After submitting the role swap, watch for messages in the following places:

    • If running interactively, the messages will show up on the screen or in your interactive joblog.

    • If running in batch, watch for messages in QSYSOPR until the swap completes successfully.

      Because running the role swap in batch sends you into restricted state, you will lose your interactive session and need to wait until the system comes out of restricted state to see the current progress of the role swap.
  6. Then, ensure the server has started and subsystem RSFUSER/RSFHA is active. You may need to start them manually.

    • To check the server, navigate to the Control Menu and view the "Robot HA is" status.

    • To check the subsystem, execute the WRKSBS command and look for RSFHA in the list of subsystems.

  7. Job queue RSFUSER/RSFHA is automatically placed on hold after a role swap. To resume synchronization, release the job queue by executing the RLSJOBQ RSFUSER/RSFHA command.

  8. After you release the job queue, sign off the system.

On the production system:

Return to the hidden production system and restart it using the following steps:

    1. Sign on to the system.

    2. From the Robot HA Main Menu, select option 2, Control Menu.

    3. Select option 1 to start the Robot HA server.

    4. Select option 3 to start all synchronization jobs.

    5. Select option 5 to start the audit monitor.

If you allowed changes to be made to the backup system during the test, enter the following command on the production system to identify objects that were changed during the swap-while-active role swap:

CHKATTRSF SERVER(my_server) IFS(*YES) CMPACTWAIT(500) ALWDIF(*RLS) JOBD(RSFUSER/RSFHAC) REFRESH(*YES)

Then, replace my_server in the CHKATTRSF command with the Robot HA server ID used to access the backup system from the production system and press Enter. The Check Defined Items (CHKATTRSF) command will refresh any changed objects on the backup system during the next instance of replication.

    -->

On the backup system:

  1. Sign on and open . You should be in the Target Menu.
  2. From the Main Menu, select option 2, Control Menu.
  3. Select option 1 to start the server, option 3 to restart all synchronization jobs, and option 5 to restart the audit monitor.

When you're finished, the systems should be in their normal roles again.


Still have questions? We can help. Submit a case to Technical Support.

Last Modified On: March 08, 2018