Upgrade os from centos 7 to rhel8 with mongodb 5.0 replicaset

Hi there! I have this replicaset:
node 1 -CentOS Linux release 7.9.2009 (Core)
-mongodb-linux-x86_64-rhel70-5.0.28
-mongodb-database-tools-rhel70-x86_64-100.10.0
-mongosh-2.3.1-linux-x64.tgz

node 2 -CentOS Linux release 7.9.2009 (Core)
-mongodb-linux-x86_64-rhel70-5.0.28
-mongodb-database-tools-rhel70-x86_64-100.10.0
-mongosh-2.3.1-linux-x64.tgz

node 3 -Red Hat Enterprise Linux release 8.10 (Ootpa)
-mongodb-linux-x86_64-rhel70-5.0.28
-mongodb-database-tools-rhel70-x86_64-100.10.0
-mongosh-2.3.1-linux-x64.tgz

the os team wants to upgrade the os , and already did the upgrade on the node 3.
Now I have to change the mongodb binaries, because they don’t match anymore with the os. What is the best procedure to follow? I see this article: Cloud: MongoDB Cloud
It seems that I can change the binaries on node 3, installing the right ones (mongodb-linux-x86_64-rhel80-5.0.28.tgz) in place of the actuals. Then I restart mongodb. And then I do the same on the other nodes, by having the operating system upgraded one server at a time, like the node 3. It’s the right procedure? I have to check something in particular? Thanx!

Yes, you can replace it by using a binary package. In the process, just make a backup in advance and switch the master node.

Ok thanks, I did it on the secondary node where the os was already upgraded. It seems ok. When the os team will upgrade the other nodes I’ll do the same. When it will be the primary’s turn, I’ll do a stepdown before.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.