Reputation: 10539
I have a mongodb replica set (which is part of a shard) where I want to migrate the arbiter to a new host. I didn't found any instructions for this case, so I'm not sure how to do this.
My current approach would be to start an arbiter on the new host, add him to the replica set, and then remove the old one. Any suggestions? Thanks.
Upvotes: 0
Views: 1168
Reputation: 3393
There is a command much more easier:
rs.addArb("[hostname]:[port]")
http://docs.mongodb.org/manual/administration/replication-architectures/#replica-set-arbiter-nodes
Upvotes: 1
Reputation: 10539
In fact it is much simpler:
Execute
cfg = rs.conf()
cfg.members[0].host = newhost
rs.reconfig(cfg)
Don't forget to change your options (--replSet) in /etc/sysconfig/mongod
, if set.
Reference: http://www.mongodb.org/display/DOCS/Adding+an+Arbiter
Upvotes: 4