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.
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:
gprecoverseg
select * from gp_segment_configuration;
gpstate -e
gprecoverseg -r