首页 > 数据库 > > 替换故障主机-替换故障实例
当主机上的某些实例出现故障后,可以使用替换实例功能,快速的将故障的实例修复到正常状态,无需替换主机。
以替换主机plat1、plat2上的实例为例。
omm@plat1:~> gs_replace -t config -h plat1,plat2配置操作会清理替换实例的空间,初始化替换实例,配置替换实例。
如果收到提示:“GAUSS_50201: The XXX does not exist.”,则请检查对应的实例数据目录是否存在。如果不存在,请重新创建目录后再次执行上述命令。
omm@plat1:~> gs_replace -t start -h plat1,plat2启动操作会启动集群替换实例的主机。
omm@plat1:~> gs_om -t status示例
示例1:替换故障实例。
omm@plat1:/opt/software/gaussdb/script> gs_replace -t config -h plat1
Check cluster status for replace.
Check the status of ETCD cluster.
Successfully check the status of ETCD cluster.
Successfully check cluster status.
Filter out all valid hosts for replacing.
Distributing configuration to remote host.
Successfully distributed configuration to remote host.
Configuring
Stopping replace instances.
Successfully stopped replace instances.
Configuring replacement instances.
Config replace instances.
Successfully config replace instances.
Config standby DN of new instances.
.......67s
Config standby DN of new instances successfully.
Successfully configured replacement instances.
Configuration succeeded.
==============================
Time statistics:
Config replacement nodes: 95s
total: 95s
omm@plat1:/opt/software/gaussdb/script> gs_replace -t start -h plat1
Starting.
==============================
..
Start cm agent on new nodes.
Successfully start cm agent for new nodes.
Starting the cluster.
.
Successfully started instance process. Waiting to become Normal.
==============================
Successfully started cluster.
==============================
Time statistics:
Start replacement nodes: 27s
total: 27s
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69959250/viewspace-3133279/ ,如需转载,请注明出处,否则将追究法律责任。