Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Currently I manually execute the rs.initiate() in the shell after starting a mongo primary or secondary machine to join the replica-set "farm". Doesn't the /etc/mongodb.conf allow me to define the initiate command to do this automatically when starting the service after re-booting? - Thanks for help

share|improve this question
up vote 3 down vote accepted

I don't think so. But you shouldn't need to initiate every time you reboot. Are you shutting down all of your nodes at the same time? If you leave one up, and the replSet is set in the config file, others should rejoin automatically:

share|improve this answer
You are right, it's rejoined :-) – ledy Jun 28 '12 at 15:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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