栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

TiDB5.4扩缩容

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

TiDB5.4扩缩容

现有环境

参考

TiDB5.4分布式安装部署(一)_小青蛙呱呱跳的博客-CSDN博客

一、扩容

增加192.168.31.27服务器,部署tikb,tidb,pd

1、准备配置文件
vim scale-out.yaml

内容如下:

tidb_servers:
  - host: 192.168.31.27
    ssh_port: 22
    port: 4000
    status_port: 10080
    deploy_dir: /data/deploy/install/deploy/tidb-4000
    log_dir: /data/deploy/install/log/tidb-4000
tikv_servers:
  - host: 192.168.31.27
    ssh_port: 22
    port: 20160
    status_port: 20180
    deploy_dir: /data/deploy/install/deploy/tikv-20160
    data_dir: /data/deploy/install/data/tikv-20160
    log_dir: /data/deploy/install/log/tikv-20160
pd_servers:
  - host: 192.168.31.27
    ssh_port: 22
    name: pd-1
    client_port: 2379
    peer_port: 2380
    deploy_dir: /data/deploy/install/deploy/pd-2379
    data_dir: /data/deploy/install/data/pd-2379
    log_dir: /data/deploy/install/log/pd-2379
 2、检测27服务器环境
tiup cluster check tidb-test scale-out.yaml --cluster --user root

 不能出现fail

参考:TiDB常见的问题_小青蛙呱呱跳的博客-CSDN博客

3、执行扩容
tiup cluster scale-out tidb-test scale-out.yaml

 4、检查集群状态

1、通过 TiUP

tiup cluster display tidb-test

  

2、通过 TiDB Dashboard  

通过 {pd-ip}:{pd-port}/dashboard 登录 TiDB Dashboard,登录用户和口令为 TiDB 数据库 root 用户和口令

例如:http://192.168.31.112:2379/dashboard

二、缩容

缩容 TiDB/PD/TiKV 节点

#缩容tikv
tiup cluster scale-in tidb-test --node 192.168.31.196:20160
#缩容tidb
tiup cluster scale-in tidb-test --node 192.168.31.196:4000
#缩容pd
tiup cluster scale-in tidb-test --node 192.168.31.196:2379

 结果

tiup cluster display tidb-test

 

 执行,彻底删除

tiup cluster prune tidb-test

 

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/827357.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号