Removing a host from the database cluster for maintnenace
search cancel

Removing a host from the database cluster for maintnenace

book

Article ID: 411520

calendar_today

Updated On:

Products

VMware Tanzu Data Suite VMware Tanzu Greenplum

Issue/Introduction

There may be a need to remove a host from the cluster for maintenance such as hardware repair or replacement.

This article describes how to remove a host from the cluster and put it back into operation once the maintenance is complete.

Resolution

Ensure all segments are in sync and are in their preferred roles, this will reduce the workload on the cluster and help to avoid the buildup of WAL files.

This may not be pssible in all situations, depending on the issues with the host in question.

To stop the server with the fault use the following command:

gpstop --host <host_name>

The gpstop command will shut down the Greenplum Database segment instances on the specified host to allow maintenance on the host.

Each primary segment instance on the host is shut down and the associated mirror segment instance is promoted to a primary segment.

Each mirror segment instance on the host are shut down and the associated primary instances will go to "change tracking" state.

Further details on recovering the repaired host can be found in Recovering from Segment Failures.

Once the host has been repaired:

  1. Bring up the new host
  2. Run the following command to recover all segments to the new host:
    gprecoverseg
  3. Validate segments status and preferred roles: 
    select * from gp_segment_configuration;
  4. Monitor mirror synchronisation progress: 
    gpstate -e
  5. If necessary, run the following command to return segments to their preferred roles: 
    gprecoverseg -r