2

I'm handling a MongoDB (2.4.10) sharded cluster that has only 1 replica set till now. I ran db.repairDatabase() on a mongos.

With that, I could reclaim free space on the primary node. But not on the secondaries. Do I have to run it on every member of the replica set?

Thanks,

Greg.

1 Answer 1

2

Yes. You will want to stop the secondary mongo process, comment out the replica configuration parameters ( replSet, keyFile, etc ), start the mongo process then login and perform the repair. Once it completes, stop the mongod process, change the config back to original settings and start mongod. This assumes you have a three member deployment with correct voting, etc.

Another option is to simply resync the secondary ( pending your oplog is long enough ):

http://docs.mongodb.org/manual/tutorial/resync-replica-set-member/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .