db.runCommand( { addshard : "replicaSetA/A1:27017,A2:27017" } );
Now I want to replace A2 with a different replica that has a different
host name, A3. What command do I run to take A2 out of the host list
for the shard and replace it with A3 (assuming I've already added it
to the replica set)?
If it helps, A1 is the current replica set master and I'm running 1.6.5.
> --
> You received this message because you are subscribed to the Google Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com.
> To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
>
>
This doesn't quite answer my question.
I know mongos will pick up the new replica (and all others) so long as
one replica node is listed as a seed for the shard. But what if the
hostname of the seeds change? So for example, to make my question even
more direct, what if I need to change the hostname of A1 and A2?
To be explicit, suppose my list shards says:
http://pastie.org/private/njv5rpwdpaiwa2rl6la4g
but I want to change the shard1 entry and replace the hosts with
different nodes so that it looks like this:
http://pastie.org/private/xosjjt96hk4wn0hddcauq
Can this be accomplished?
- Andrew
Thanks for the heads up about 1.8.
In the mean time for 1.6.5, can I just change the relevant doc in the
shards collection in the config db? In local testing this seems to
work.
What's the reason for restarting the shard? Isn't the shard oblivious
of the higher level cluster config?