暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

GBase 8c数据库集群卸载

原创 一车鸡蛋 2021-12-08
501

集群卸载

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

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

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

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

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

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"

}

数据库集群删除完成。

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论