Replacing a member of replica set with same host name

73 views
Skip to first unread message

Virendra Agarwal

unread,
Jun 9, 2016, 6:49:25 AM6/9/16
to mongodb-user
HI All,

I am replacing a member of replica set (new member have different IP address).
What i am looking to do is as follows:

  1. RSYNC data directory of existing secondary node to new Node.
  2. Stop existing node.
  3. Map existing hostname to this IP of new Node.
  4. Start mongoD  on this new node with replica set

I am hoping these  steps will work. Could you please confirm the same.

Thanks
Virendra Agarwal

Virendra Agarwal

unread,
Jun 10, 2016, 12:26:16 AM6/10/16
to mongodb-user
My Mongo version is 3.2 and it is 3 member replica set.


  1. Primary
  2. Secondary
  3. Arbiter
My plan is to first replace arbiter with a new secondary node then. Do the procedure with on existing secondary node to replace this also.

Thanks
Viren

Asya Kamsky

unread,
Jun 10, 2016, 11:57:04 AM6/10/16
to mongodb-user
Should work fine, as long as you originally configured replica set
using these host names and not IP addresses.

Asya
> --
> You received this message because you are subscribed to the Google Groups
> "mongodb-user"
> group.
>
> For other MongoDB technical support options, see:
> https://docs.mongodb.org/manual/support/
> ---
> You received this message because you are subscribed to the Google Groups
> "mongodb-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mongodb-user...@googlegroups.com.
> To post to this group, send email to mongod...@googlegroups.com.
> Visit this group at https://groups.google.com/group/mongodb-user.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mongodb-user/ff064c6f-9266-4d86-953a-971670902524%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



--
Asya Kamsky
Lead Product Manager
MongoDB
Download MongoDB - mongodb.org/downloads
Free MongoDB Monitoring - cloud.mongodb.com
Free Online Education - university.mongodb.com
Get Involved - mongodb.org/community
We're Hiring! - https://www.mongodb.com/careers

Virendra Agarwal

unread,
Jun 13, 2016, 1:47:30 AM6/13/16
to mongodb-user
Thanks Asya for confirmation.
Yup our original configuration is based on Host name only.

Thanks
Virendra Agarwal
Reply all
Reply to author
Forward
0 new messages