GBase 8c
其他
文章

GBase 8c数据库集群卸载

发表于2023-12-07 14:50:1717次浏览2个评论

集群卸载

使用UNINSTALL可以卸载集群。语法为:

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

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

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

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

具体操作命令为:

[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"

}

此时查询数据库集群状态:

[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

            }

        ]

    }

}

操作成功。

DCS删除

使用DESTROY命令删除DCS,语法:

gha_ctl DESTROY dcs -l dcslist

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

具体操作命令为:

[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发表于 9个月前
评论是对发帖人的一种尊重
用户头像
levvel发表于 8个月前
进来看看,应该有收获