mongodb - Adding a node to a running replicaset on an existing shard -
mongodb shard needs know members of replicaset. member list discovery dynamic? mean if add node existing replicaset configured shard on config servers, shard automatically update or have manually update shard configuration new member added replica?
in older versions of mongo, prior 2.0.3 of replica set members needed specified when adding shard. seems fair conclude when shard added , needs know 1 of members of replica set, activity between replica set members delegated replica set.
probably optimal way sure fire test scenario on own machine. there nothing suggest there additional configuration sharding should required.
and bit of update had nothing on having lunch :) spun load of instances mapped out in listed tutorial:
http://docs.mongodb.org/manual/tutorial/add-shards-to-shard-cluster/
a few differences being use of sh.addshard in first member of replica set added only, rather members syntax shown in docs.
once shards up. added 2 more replica set nodes firstset
.
http://docs.mongodb.org/manual/tutorial/expand-replica-set/
without else let's see status mongos
mongos> db.printshardingstatus() --- sharding status --- sharding version: { "_id" : 1, "version" : 4, "mincompatibleversion" : 4, "currentversion" : 5, "clusterid" : objectid("52f2f77a538f784f4413e6b9") } shards: { "_id" : "firstset", "host" :"firstset/localhost:10001,localhost:10002,localhost:10003,localhost:10004,localhost:10005" } { "_id" : "secondset", "host" : "secondset/localhost:20001,localhost:20002,localhost:20003" } databases: { "_id" : "admin", "partitioned" : false, "primary" : "config" } { "_id" : "test", "partitioned" : true, "primary" : "firstset" } test.test_collection shard key: { "number" : 1 } chunks: secondset 23 firstset 191
so shard still moving chunks , new nodes finsihed initializing typing.
and that's there adding additional nodes replica set on shard. of done during 1 million document insert.
Comments
Post a Comment