I am using mongo 2.6.7 I deploy a sharding cluster follow the guide: http://ift.tt/1iPAR3b
My sharding cluster include: - two replica sets (one primary + one secondary for each replica set) - three config servers - two mongos
I make sure sh.getBalancerState() is true. I prepared a amount of data about 1G. When I recheck by sh.status()
--- Sharding Status ---
sharding version: {
"_id" : 1,
"version" : 4,
"minCompatibleVersion" : 4,
"currentVersion" : 5,
"clusterId" : ObjectId("54c2644bf2759e71913a3b59")
}
shards:
{ "_id" : "test_repl_set", "host" : "test_repl_set/mongo1.example.com:27017,mongo2.example.com:27017" }
{ "_id" : "test_repl_set1", "host" : "test_repl_set1/mongo3.example.com:27017,mongo4.example.com:27017" }
databases:
{ "_id" : "admin", "partitioned" : false, "primary" : "config" }
{ "_id" : "linux", "partitioned" : true, "primary" : "test_repl_set" }
linux.components
shard key: { "_id" : 1 }
chunks:
test_repl_set 1
{ "_id" : { "$minKey" : 1 } } -->> { "_id" : { "$maxKey" : 1 } } on : test_repl_set Timestamp(1, 0)
linux.distro
shard key: { "name" : 1 }
chunks:
test_repl_set 1
{ "name" : { "$minKey" : 1 } } -->> { "name" : { "$maxKey" : 1 } } on : test_repl_set Timestamp(1, 0)
{ "_id" : "test", "partitioned" : false, "primary" : "test_repl_set1" }
{ "_id" : "testdata", "partitioned" : false, "primary" : "test_repl_set1" }
{ "_id" : "testshard", "partitioned" : true, "primary" : "test_repl_set1" }
testshard.testdata
shard key: { "x" : 1 }
chunks:
test_repl_set1 1
{ "x" : { "$minKey" : 1 } } -->> { "x" : { "$maxKey" : 1 } } on : test_repl_set1 Timestamp(1, 0)
I only get data of testshard from test_repl_set and there is no data of testshard from test_repl_set1. I don't know why testshard is not being migrated and why mongos tell me there is only one chunk on test_repl_set1 ?
Aucun commentaire:
Enregistrer un commentaire