事情起因:运维说,周末我要给虚拟机加硬盘,虚拟机会全部关机,有问题你自己去搞吧!
PS:关机虽然是比较好的保障机制,但是只是加硬盘,不用吧!自信点,遇见百分百会有问题!
遇到部门的变动,今年日子确实不怎么好过,测试不仅得会测试,还的会运维,会部署,会安装,会定位问题,主要还是得学会解决问题!然后总结教程,贡献大家!
第二步,基础扫盲,快速掌握:
虽然一次都没接触过,但是相信花三分钟扫盲还是可以的!由于前面已经有小白安装完成,我们这边只需要定位报错问题,解决问题,重启就可以。
启动数据库实例
gs_om -t start
或者是
gs_ctl start -D /opt/dashi/install/data/dn
停止数据库实例
gs_om -t stop
或者是
gs_ctl stop -D /opt/dashi/install/data/dn
重启数据库实例
gs_om -t restart
或者是
gs_om -t stop && gs_om -t start
查看数据库实例状态
gs_om -t status
或者是
gs_ctl status -D /opt/huawei/install/data/dn
第三步,二话不说,直接开干;
# 直接重启呗,看看报错再说
gs_om -t restart
# 不得不说,start,restart,stop都是一样的套路
第四步,果不其然,抛出异常;
[omm@172 dn]$ gs_om -t restart
Stopping cluster.
=========================================
[GAUSS-53606]: Can not stop the database, the cmd is source /home/omm/.bashrc; python3 '/opt/huawei/install/om/script/local/StopInstance.py' -U omm -R /opt/huawei/install/app -t 300 -m fast, Error:
[GAUSS-51400] : Failed to execute the command: source /home/omm/.bashrc; python3 '/opt/huawei/install/om/script/local/StopInstance.py' -U omm -R /opt/huawei/install/app -t 300 -m fast. Error:
[FAILURE] 192.100.200.130:
# 好家伙,只能看懂failed,其他的内容也不知道什么意思,那就按照报错的建议处理
[omm@172 dn]$ source /home/omm/.bashrc
# 成功,没问题这个
[omm@172 dn]$ python3 '/opt/huawei/install/om/script/local/StopInstance.py' -U omm -R /opt/huawei/install/app -t 300 -m fast
[GAUSS-51619] : The hos