GBase 8c
其他
文章

GBase 8c教程(六)数据库集群卸载——UNINSTALL指令

发表于2023-12-06 17:58:49171次浏览1个评论

一、语法规则

使用UNINSTALL指令可以实现数据库集群的卸载,语法如下:

gha_ctl UNINSTALL [-f] [-c cluster] -l dcslist

参数说明:

  • [-c cluster]表示集群名称,为可选字段,缺省默认值gbase8c;

  • [-f]表示清理安装目录,为可选字段,缺省保留目录文件夹;

  • dcslist为DCS地址,一般情况下可以只列出一个节点地址,其他节点会自动同步消息。为了保证高可用,也可以列出所有节点地址;

二、操作示例

1、卸载集群:

[gbase@localhost 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、查询数据库集群状态:

[gbase@localhost 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
操作指令:

[gbase@localhost 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"

}

数据库集群删除完成!

评论

登录后才可以发表评论
用户头像
levvel发表于 4个月前
值得一读!