Activating the Mirror Grid as the Primary Grid

Consider that there are two data grids:

grid1

Primary realm service running at 192.0.2.1:8080.

Backup for primary realm service running at 192.0.2.3:8080.

grid2

Satellite realm service running at 192.0.2.2:8080.

Backup for satellite realm service running at 192.0.2.4:8080.

Currently, the primary grid is grid1. The objective is to make grid2 the primary grid.
Note: grid1 and grid2 consists of a cluster of at least three realm services.

Settings to be Included in the YAML File

In grids configured for disaster recovery, the setting disable.default.routing: true must be included in the TIBCO FTL YAML file that is used for tibftlserver processes. In the YAML file, place the following code at the same level as core.servers:

SRV1: host:port
SRV2: host:port
SRV3: host:port
disable.default.routing: true

Warning: Exercise caution when making the mirror grid the primary grid because this might result in a data loss if the mirror grid is not in sync with the current primary.

    Procedure
  1. If you are taking periodic checkpoints on the primary grid, use the following commands to disable periodic checkpoint creation:
    tibdg –r http://192.0.2.1:8080 –g grid1 status - identify the node with a role of primary
    tibdg –r http://192.0.2.1:8080 –g grid1 grid modify checkpoint_interval=0.0
  2. To switch the primary grid to maintenance mode and prevent new writes to the primary grid, use the following command:
    tibdg -r http://192.0.2.1:8080 -g grid1 grid mode maintenance
  3. To create a manual checkpoint on the primary grid, use the following command:
    tibdg -r http://192.0.2.1:8080 -g grid1 checkpoint create changePrimaryCheckpoint
  4. On the mirror grid, to verify that the checkpoint has been successfully mirrored, use the following command:
    tibdg -r http://192.0.2.2:8080 -g grid2 checkpoint list
    Repeat the command until you see the checkpoint listed in the command's output.
  5. On the primary grid site, stop all grid processes and the tibftlserver processes (these are the primary realm services). On the mirror grid site, stop and restart the satellite realm service as the new primary realm service, which requires removing the satellite-of configuration option before restarting:
    tibftladmin --ftlserver http://192.0.2.2:8080 --shutdown
    tibftlserver -c <config file> -n <name>
    

    As a result of these commands, the ActiveSpaces mirror grid processes become the new primary grid and clients reconnect to the new primary realm service.

  6. On the mirror grid site, use the following command to change the primary grid of the gridset:
    tibdg -r http://192.0.2.2:8080 gridset setPrimary gridset1 grid2
    When prompted, confirm the change.
    As a result of these commands, the ActiveSpaces mirror grid processes become the new primary grid and clients that connect to this realm service are now connected to the new primary realm service.
  7. On the previous primary grid site (where all processes must already have been stopped), back up and then remove all files in the ftlserver's data directory.

  8. Restart the primary realm service as a satellite realm service, which requires adding the satellite-of configuration option to the configuration before restarting:
    tibftladmin --ftlserver http://192.0.2.1:8080 --shutdown
    tibftlserver -c <config file> -n <name>
    If running multiple tibftlservers, all must have their data directory wiped and configured with the satellite-of configuration option prior to restarting.
  9. After the satellite TIBCO FTL servers are running, start the grid processes, which must come up as the new mirror grid. To set the new mirror grid back to normal mode, use the following command:
    tibdg –r http://192.0.2.2:8080 -g grid1 grid mode normal

    Notice that tibdg configuration commands are being sent to the primary realm service for the new primary grid site at http://192.0.2.2:8080.

    1. If you must mirror periodic checkpoints from the new primary grid to the mirror grids, use the following commands:
      tibdg -r http://192.0.2.2:8080 -g grid2 status  - identify the node with a role of primary
      tibdg -r http://192.0.2.2:8080 -g grid2 grid modify checkpoint_interval=120
    2. On the new primary grid site, start a tibdgadmind process.
      tibdgadmind -r http://192.0.2.2:8080 -l 192.0.2.2:7171
  10. Stop any existing clients that write to the data grid. Restart the clients so that they use one or more URLs of the new primary realm service.