Failover when primary system crashes

A long time system outage might cause the crash of the primary system. The primary system is disconnected. The failover process applies an active primary role in the secondary system.

Procedure

  1. To determine the good recovery point on the secondary system, run the following on the primary system:
    apdr status --secondary
    Example output:
    ========================Snapshot Recovery Point Details=========================
    Availability Status:                                AVAILABLE
    Recovery Point (UTC):                     2018-09-05 18:20:05
    The good recovery point means that the availability status is AVAILABLE and there’s a valid time stamp displayed.
  2. Ensure the primary system is offline and its database is stopped.
  3. Convert the role of the secondary system into an active primary role by logging in as apuser or equivalent and using:
    apdr failover
  4. To monitor the status of the failover process on the secondary system, run the following command:
    apdr failover --status
  5. Start the secondary system by running:
    apstart
  6. Once the original primary system has been recovered, initiate a role reversal on the active primary system by running:
    apdr changeRole

    This will convert the secondary system's role into the primary system, and the old primary system into the secondary system.

  7. Monitor the role reversal status by running:
    apdr changeRole --status
    Example status output of a successful role reversal
    
    Checking status of role reversal. 
    Role reverse status is: SUCCEEDED
    
    
    Original Primary Fileset            Status
    
    
    local db2inst1                      SUCCEEDED
    scratch db2archive                  SUCCEEDED
    data db2inst1                       SUCCEEDED
    head keystore                       SUCCEEDED
    
    
    
    
    Original Secondary Fileset          Status
    
    
    local db2inst1                      SUCCEEDED
    scratch db2archive                  SUCCEEDED
    data db2inst1                       SUCCEEDED
    head keystore                       SUCCEEDED
    

Results

After a successful failover and role reversal, the original secondary system has a primary role and the database on it is started. The old primary system now has a standby secondary role.