TDSQL 之 OSS 扩容
主控机:
在主控机上将OSS包传至新OSS机器
# cd /data/tdsql_full_install_ansible/roles/oss/files
# scp -rp OSS.tgz 172.16.1.93:/data/application/
新OSS机器:
# cd /data/application/
# tar -xf OSS.tgz
将conf目录下的scheduler.xml文件备份
# cd /data/application/OSS/conf
# mv scheduler.xml scheduler.xml.bak
OSS1机器:
OSS1机器上将conf目录下的scheduler.xml文件传到新OSS机器conf目录下
# cd /data/application/OSS/conf
# scp -rp scheduler.xml 172.16.2.69:/data/application/OSS/conf/
新OSS机器:
修改 scheduler.xml文件内容,具体修改内容如下:
将localip和oss_server ip修改为新OSS机器的IP
![](https://img2022.cnblogs.com/blog/1402942/202202/1402942-20220224164623819-518990015.jpg)
启动OSS
# cd /data/application/OSS/boot/
# ./start.sh
新OSS机器:
新OSS机器上,添加crontab,如果已有/server/scripts/,可忽略该步骤
# mkdir -p /server/scripts/
OSS1机器上:
# cd /server/scripts/
# scp -rp check_oss_alive.sh 172.16.2.69:/server/scripts/
新OSS机器上:
# touch /var/spool/cron/root && grep 'check_oss_alive' /var/spool/cron/root || echo '*/3 * * * * /bin/bash
/server/scripts/check_oss_alive.sh' >> /var/spool/cron/root
如果已有 /var/spool/cron/root文件,则
# echo '*/3 * * * * /bin/bash /server/scripts/check_oss_alive.sh' >> /var/spool/cron/root
集群配置中加入:
![](https://img2022.cnblogs.com/blog/1402942/202202/1402942-20220224164624255-574593509.jpg)
赤兔前台查看:
![](https://img2022.cnblogs.com/blog/1402942/202202/1402942-20220224164624542-783406186.jpg)