Failover to standby coordinator for VMware Tanzu Greenplum
search cancel

Failover to standby coordinator for VMware Tanzu Greenplum

book

Article ID: 296354

calendar_today

Updated On:

Products

VMware Tanzu Greenplum VMware Tanzu Greenplum / Gemfire

Issue/Introduction

Planned maintenance/upgrade requires a role swap between the primary coordinator and standby coordinator.

Environment

Tanzu Greenplum

Resolution

Switchover to standby coordinator

  1. Ensure standby coordinator is configured and is in sync with the current master with gpstate -f
  2. If status is not "Synchronized", run gpinitstandby -n.
  3. Stop the current coordinator: gpstop -m
  4. Login to the standby coordinator with ssh.
  5. Set the environment variables:
    bash
    export COORDINATOR_DATA_DIRECTORY="<path_to_coordinator_data_directory>"
    export PGPORT=<Greenplum_port>
  6. Activate the standby: gpactivatestandby -d $COORDINATOR_DATA_DIRECTORY
  7. Verify activation: gpstate -e


Add original coordinator as standby coordinator

  1. Ensure the original coordinator host is online
  2. Login to the original coordinator with ssh
  3. Delete or rename the data directory, that is the $COORDINATOR_DATA_DIRECTORY:  mv $COORDINATOR_DATA_DIRECTORY ${COORDINATOR_DATA_DIRECTORY}.$(date %Y%m%d)
    The backup directory can be removed once the standby is successfully configured and verified.
  4. Login to the current coordinator (that is the host currently running the coordinator) with ssh
  5. Initialize the standby coordinator: gpinitstandby -s <original_coordinator_hostname>
  6. Verify the status: gpstate -f

 

Additional Information

Further details can be found in Recovering a Failed Coordinator