After upgrading MongoDB, migrate MongoDB from RHEL 7.9 to RHEL 8.
Make sure to configure the primary and secondary as a replica set in RHEL 7.9 and that the version is 5.0.18.
To migrate MongoDB from RHEL 7.9 to RHEL 8:
-
Install the MongoDB replica set on RHEL 8 instances.
-
Add the newly created RHEL 8 mongo instances to the
existing RHEL 7.9 mongo replica set.
-
Remove the RHEL 7.9 mongo members from the replica
set.
Complete the steps in Migrating Elasticsearch from RHEL 7.9 to 8.