0

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?

Thanks!

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 at 14:30
  • Only CRU, no deletes. – DavidL Jan 27 at 15:23
  • "but the average size for the other nodes is ~3.7GB" What do you mean by this... – Yogesh J Jan 27 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 at 20:05
  • 1
    Perhaps when you compact your data then size of data folder becomes even. – Wernfried Domscheit Jan 28 at 13:27
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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