3

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

Tom O'Connor
  • 27,440
  • 10
  • 72
  • 148
ledy
  • 515
  • 1
  • 6
  • 15

1 Answers1

3

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: http://mongodb.org/display/DOCS/File+Based+Configuration

Eve Freeman
  • 228
  • 1
  • 2
  • 9