Activating the Mirror Grid as the Primary Grid

Consider that there are two 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.
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 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, to change the primary grid of the gridset, use the following command:
    tibdg -r http://192.0.2.2:8080 gridset setPrimary gridset1 grid2
    When prompted, confirm the change.
  7. On the primary grid site, stop and 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 a backup realm service to the primary realm service, all primary grid processes and client connect to the primary realm service's backup realm service when the primary realm service is shut down.
    1. If you are running a backup realm service on the primary grid site, use the following commands to stop and restart the backup realm service for the site:
      tibrealmadmin -rs http://192.0.2.3:8080 --shutdown
      tibrealmserver --http 192.0.2.3:8080 --data $HOME/rs-db --backupfor 192.0.2.1:8080
  8. 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 need to 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
  9. 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.