MongoDB migration from VMs to physical servers

Hi Team,

For example : I have a 5 node cluster, we are planning to migrate our virtual machines to Physical serves

Our plan is to add the new physical servers one by one to the existing cluster and make sure initial sync is completed on all physical servers.

Once the sync completed on all physical servers, we are going to remove old servers one at a time and we will make new physical machines as Primary and secondary.

Is this a good approach ? is there any issues we will face ?

And we have observed local database having huge difference in size between old VMs and new physical servers - is this expected ?

and also we have seen “me” collection in local database in vms, but in physical we did not see, do you know why this collection is missed in Physical and existed in old vms ?

The “me” collection consists the respected server name .


Hi @Mamatha_M,

Yep, The presented approach is the preferred way.

Please note that we recommend adding the new servers with 0 votes and 0 priority. This is since having 10 servers with 1 vote will make your voting number to 10 which is not odd as recommended.

Once you want to promote new servers reconfigure the set with bumping new servers vote and priority and moving old to 0.

What we recommend to do also is when you are ready to decommision the old servers consider first promoting one of the new servers to a primary (by raising temporary its priority) to check how well it behaves as Primary. Once you are confident in new servers remove the old ones.

The local database is initially small as it mainly consists of the oplog which write replica set operations over time, therefore its initial size is small for new nodes.

I think the me collection is historically there and its not used anymore, new nodes will not have it.



Thanks for the information Pavel, It was very useful.


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