数据库集群卸载
gha_ctl UNINSTALL [-f] [-c cluster] -l dcslist
l [-c cluster]表示集群名称,为可选字段,缺省默认值gbase8c;
l [-f]表示清理安装目录,为可选字段,缺省保留目录文件夹。
l dcslist为DCS地址,一般情况下可以只列出一个节点地址,其他节点会自动同步消息。为了保证高可用,也可以列出所有节点地址;
具体操作命令为:
$ /home/gbase/deploy/bin/gha_ctl uninstall -f -l http://192.168.142.211:2379,http://192.168.142.212:2379,http://192.168.142.213:2379
返回操作成功信息:
{
"ret":0,
"msg":"Success"
}
此时查询数据库集群状态:
$ /home/gbase/deploy/bin/gha_ctl monitor all -l http://192.168.142.211:2379,http://192.168.142.212:2379,http://192.168.142.213:2379
返回没有集群信息:
{
"cluster":"gbase8c",
"gtm":[],
"coordinator":[],
"datanode":{},
"dcs":{
"cluster_state":"healthy",
"members":[
{
"url":"http://192.168.142.213:2379",
"id":"62f9a805ba818264",
"name":"node_2",
"state":"healthy",
"isLeader":true
},
{
"url":"http://192.168.142.211:2379",
"id":"8ea592db62fb7d92",
"name":"node_0",
"state":"healthy",
"isLeader":false
},
{
"url":"http://192.168.142.212:2379",
"id":"fbc0fc018ba512fa",
"name":"node_1",
"state":"healthy",
"isLeader":false
}
]
}
}
操作成功。
最后删除DCS工具,语法:
gha_ctl DESTROY dcs -l dcslist
l dcslist为DCS地址,一般情况下可以只列出一个节点地址,其他节点会自动同步消息。为了保证高可用,也可以列出所有节点地址;
具体操作命令为:
$ /home/gbase/deploy/bin/gha_ctl destroy dcs -l http://192.168.142.211:2379,http://192.168.142.212:2379,http://192.168.142.213:2379
返回操作成功信息:
{
"ret":0,
"msg":"Success"
}
数据库集群删除完成。