大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。
Jetbrains全系列IDE稳定放心使用
TiDB是无状态的,所以各节点可以水平扩缩容;扩容期间不会影响集群的读写,整个过程在线; Tidb、tikv、pd扩容方式都是一致的; tiflash有所区别
开始前准备一台服务器,这里以TiKV为例,配置好免密;
一、编辑配置文件
tikv_servers:
- host: x.x.x.x
ssh_port: 22
port: 20160
status_port: 20180
deploy_dir: /export/servers/TiDB/soft/tikv-20160
data_dir: /export/servers/TiDB/data/tikv-20160
log_dir: /export/servers/TiDB/soft/tikv-20160/log
二、开始扩容:
tiup cluster scale-out cluster-default scale-out-tikv.yaml
tikv-20160/log
[root@A02-R05-I45-170-J33FE0D TiDB]# tiup cluster scale-out cluster-default scale-out-tikv.yaml
Starting component `cluster`: /root/.tiup/components/cluster/v1.7.0/tiup-cluster scale-out cluster-default scale-out-tikv.yaml
+ Detect CPU Arch
- Detecting node 11.127.32.8 ... Done
Please confirm your topology:
Cluster type: tidb
Cluster name: cluster-default
Cluster version: v5.3.0
Role Host Ports OS/Arch Directories
---- ---- ----- ------- -----------
tikv 11.127.32.8 20160/20180 linux/x86_64 /export/servers/TiDB/soft/tikv-20160,/export/servers/TiDB/data/tikv-20160
Attention:
1. If the topology is not what you expected, check your yaml file.
2. Please confirm there is no port/directory conflicts in same host.
Do you want to continue? [y/N]: (default=N) y
+ [ Serial ] - SSHKeySet: privateKey=/root/.tiup/storage/cluster/clusters/cluster-default/ssh/id_rsa, publicKey=/root/.tiup/storage/cluster/clusters/cluster-default/ssh/id_rsa.pub
...
Scaled cluster `cluster-default` out successfully
扩容成功后,日志最后会显示: Scaled cluster `cluster-default` out successfully
三、 查看集群,确认节点是否加入
tiup cluster display cluster-default
发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/190082.html原文链接:https://javaforall.cn
【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛
【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...