I have a 3 node replica set that's been online since mid december. Last Friday (Jan 24), we added a 4th node in our disaster recovery data center.

We used the automatic initial sync procedure as our data set is relatively small. No problems here, after a while it's status switched to secondary and rs.printSlaveReplicationInfo() tells me everyone is in sync with little lag.

A coworker asked me to confirm that the new node was up to date and my instinct was to compare the size of the data folders (dbPath).

The new node's dbPath is ~1.88GB, but the average size for the other nodes is ~3.7GB. Why is the new node's dbPath smaller?


Update: The real question is, how do I figure out if a new node of the Replica Set is fully synced?

  • It might happen that if you are continuously updating,removing the data and then it got replicate so it will get replicate in reduced size. Can you tell what operations are going on your primary from CRUD.
    – Yogesh J
    Jan 27, 2020 at 14:30
  • Only CRU, no deletes.
    – DavidL
    Jan 27, 2020 at 15:23
  • "but the average size for the other nodes is ~3.7GB" What do you mean by this...
    – Yogesh J
    Jan 27, 2020 at 15:57
  • Each dbPath for the other replica set nodes is roughly 3.7GB in size while the new node's is quite smaller (roughly 1.88GB). How can I tell that the new node contains the same data despite the dbPaths size difference?
    – DavidL
    Jan 27, 2020 at 20:05
  • 1
    Perhaps when you compact your data then size of data folder becomes even. Jan 28, 2020 at 13:27

2 Answers 2


Running rs.printSlaveReplicationInfo() on the Primary is not helping me figure whether the new node contains a full copy of the replica set.

Running rs.printReplicationInfo() is not giving me what I'm looking for either.

The answer lies in db.stats(); by comparing the number of objects and dataSize, of the primary and the new node, the new node is smaller.

However, when comparing the new node with another secondary, the values very closely match! Real question answered! Except for that dbPath size difference.


Every update of a document is actually creates a new copy of the document with an higher version. Because of that, I do think Compact, as mentioned above, will help. You can try it on one collection and check the impact (before and after) with db.colName.stats()

In addition, there are other stuff in the /data directory like jurnaling and diagnostics data.

I suggest run and examine the output of linux shell command "du -h" in each node. This might help understand the difference.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.