GBase 8c教程(六)数据库集群卸载——UNINSTALL指令
程序员文章站
2022-03-04 22:24:37
...
一、语法规则
使用UNINSTALL指令可以实现数据库集群的卸载,语法如下:
参数说明:
- [-c cluster]表示集群名称,为可选字段,缺省默认值gbase8c;
- [-f]表示清理安装目录,为可选字段,缺省保留目录文件夹;
- dcslist为DCS地址,一般情况下可以只列出一个节点地址,其他节点会自动同步消息。为了保证高可用,也可以列出所有节点地址;
二、操作示例
1、卸载集群:
[[email protected] deploy]$ /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"
}
2、查询数据库集群状态:
[[email protected] deploy]$ /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
}
]
}
}
3、删除DCS工具:
语法:gha_ctl DESTROY dcs -l dcslist
操作指令:
[[email protected] deploy]$ /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"
}
数据库集群删除完成!