升级步骤
1. 关闭balancer
登陆mongos,执行sh.stopBalancer(),或者

连接到mongos
>use config
>db.settings.update( { _id: "balancer" }, { $set : { stopped: true } } , true );

关闭balancer后,需检查是否还有migretion:If a migration is in progress, the system will complete the in-progress migration. After disabling, you can use the following operation in the mongo shell to determine if there are no migrations in progress:

}

2. 升级mongos,逐个升级
关闭服务后,用高版本启动

3. 升级config
升级时,至少保持一个config在线。
关闭服务后(db.shutdownServer),用高版本启动。

4. 升级mongod
首先升级secondry:关闭服务后(db.shutdownServer),使用高版本启动secondry节点,直到该节点recovery完毕(使用rs.stats()查看状态)。

升级其他secondry节点。
然后step down primary节点(rs.stepDown()),再升级primary节点。

最后升级仲裁节点。

5. 启动balancer
登陆mongos,执行sh.startBalancer(),或者

连接到mongos
>use config
>db.settings.update( { _id: "balancer" }, { $set : { stopped: false } } , true );

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-05
  • 2021-11-28
  • 2021-10-30
  • 2022-03-02
  • 2021-07-12
猜你喜欢
  • 2021-11-16
  • 2021-10-02
  • 2022-03-06
  • 2021-04-30
  • 2022-02-02
  • 2022-12-23
  • 2021-10-31
相关资源
相似解决方案