[关闭]
@zhangyy 2020-10-26T14:51:17.000000Z 字数 931 阅读 109

GP重新平衡primary和mirror

greenplum系列


  1. GP集群中的某segmentprimary失效的时候,会发生主备切换,mirror来接管。那么,怎样恢复发生的role切换呢?
  2. 大致步骤如下:
  3. 1Recover any failed segment instances in place:
  4. $ gprecoverseg
  5. 注意:A segment instance can fail for several reasons, such as a host failure, network failure, or disk failure. When a segment instance fails, its status is marked as down in the Greenplum Database system catalog,and its mirror is activated in change tracking mode. In order to bring the failed segment instance back into operation again, you must first correct the problem that made it fail in the first place, and then recover the segment instance in Greenplum Database using gprecoverseg.

  1. 2)确保所有的同步都已完成:
  2. Show detailed status information of a Greenplum Database system:
  3. $ gpstate -s
  4. Show information about mirror segment instances:
  5. $ gpstate -m
  6. 3rebalance segment by resetting all segments to their preferred role
  7. $ gprecoverseg -r
  8. 注意:All segments must be valid and synchronized before running gprecoverseg -r. If there are any in progress queries, they will be cancelled and rolled back.
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注