I am trying to setup sharding across different replica sets. I referred to the manual from mongodb website.
mongo version I am using is : 3.0.5. This is what I have setup.
3 servers for replication, 1 for configuration.
I have 6 mongod instance running on 3 different servers with 6 different ports rs1 : has 3 mongod instance running on 3 different servers(x,y,z) with 3 different ports(1,2,3) rs2 : has 3 mongod instance running on 3 different servers(x,y,z) with 3 different ports(4,5,6)
I have a config server ( a ) which has three mongod config server instances runing on three different ports ( 100, 101, 102 )
and a mongos instances with the above three config process in the same host( a )
This is the status: mongos> sh.status() --- Sharding Status --- sharding version: { "_id" : 1, "minCompatibleVersion" : 5, "currentVersion" : 6, "clusterId" : ObjectId("56bb5292ecc674897b781f9f") } shards: { "_id" : "rs1", "host" : "rs1/10.xxx.xx.xx:36000,10.xxx.xx.xx:36002,10.xxx.xx.xx:36001" } { "_id" : "rs2", "host" : "rs2/10.xxx.xx.xx:37000,10.xxx.xx.xx:37002,10.xxx.xx.xx:37001" } balancer: Currently enabled: yes Currently running: no Failed balancer rounds in last 5 attempts: 0 Migration Results for the last 24 hours: 2 : Failed with error 'chunk too big to move', from rs1 to rs2 databases: { "_id" : "admin", "partitioned" : false, "primary" : "config" } { "_id" : "test", "partitioned" : true, "primary" : "rs1" } test.test_collection shard key: { "EVENTDATE" : 1 } chunks: rs1 2 { "EVENTDATE" : { "$minKey" : 1 } } -->> { "EVENTDATE" : ISODate("2014-01-01T05:00:00Z") } on : rs1 Timestamp(1, 0) jumbo { "EVENTDATE" : ISODate("2014-01-01T05:00:00Z") } -->> { "EVENTDATE" : { "$maxKey" : 1 } } on : rs1 Timestamp(1, 1) jumbo { "_id" : "test_migration", "partitioned" : false, "primary" : "rs2" }
Questions:
- why the data is not splitted across rs2.
- I tried inserting the data in rs2 primary server, but sharding is not happening for rs2.( db: test.test_collection)
- I inserted more documents in rs1, but the sharding is not happening. The chunk size I set is 2 in settings table.
I see below error in mongos logs. 2016-02-10T10:58:28.621-0500 E SHARDING [Balancer] shard: rs1 ns: test.test_collection has too many chunks, but they are all jumbo numJumboChunks: 2
Any help is very much appreciated.