Hi.
I am using MongoDB 2.0.4
3 shards, each shard contain 3 Node in Replica Set
mongos> db.settings.find()
{ "_id" : "chunksize", "value" : 200 }
mongos> db.version()
2.0.4
this is printShardingStatus command output
mongos> db.printShardingStatus()
--- Sharding Status ---
sharding version: { "_id" : 1, "version" : 3 }
shards:
databases:
{ "_id" : "admin", "partitioned" : false, "primary" : "config" }
{ "_id" : "xunuu_test", "partitioned" : true, "primary" : "shard62-1" }
xunuu_test.WebDb chunks:
shard62-1 11
shard63-1 3
shard64-1 1
} on : shard62-1 { "t" : 2000, "i" : 14 }
} on : shard63-1 { "t" : 3000, "i" : 2 }
{
{ "_id" : "test", "partitioned" : false, "primary" : "shard63-1" }
{ "_id" : "bbj", "partitioned" : false, "primary" : "shard63-1" }
{ "_id" : "bbj_test", "partitioned" : false, "primary" : "shard64-1" }
{ "_id" : "xunuu", "partitioned" : false, "primary" : "shard65-1" }
{ "_id" : "EOO", "partitioned" : false, "primary" : "shard64-1" }
I think my shard is imbalanced. because shard62-1 have more than 8 chunks than shard64-1, and shard65-1 has no chunk.
I see below error in mongos log
Sat Apr 28 00:00:59 [Balancer] distributed lock 'balancer/xunuu62:50124:1335497117:1804289383' acquired, ts : 4f9ac2bbbd09b0063f21850a
Sat Apr 28 00:00:59 [Balancer] no available shards to take chunks
Sat Apr 28 00:00:59 [Balancer] distributed lock 'balancer/xunuu62:50124:1335497117:1804289383' unlocked.
Sat Apr 28 00:01:09 [Balancer] distributed lock 'balancer/xunuu62:50124:1335497117:1804289383' acquired, ts : 4f9ac2c5bd09b0063f21850b
Sat Apr 28 00:01:09 [Balancer] no available shards to take chunks
Sat Apr 28 00:01:09 [Balancer] distributed lock 'balancer/xunuu62:50124:1335497117:1804289383' unlocked.
and my WebDb.stats() output like this:
mongos> db.WebDb.stats()
{
"sharded" : true,
"flags" : 1,
"warning" : "indexes don't all match - ok if ensureIndex is running",
"ns" : "xunuu_test.WebDb",
"count" : 1308387,
"numExtents" : 36,
"size" : 719689268,
"storageSize" : 828092416,
"totalIndexSize" : 788068288,
"indexSizes" : {
"URI_1" : 161459648,
"_id_" : 46529616,
"crawlState_1" : 42883120,
"expiredTime_1" : 42384384,
"fetchInterval_1" : 28444304,
"fetchTime_1" : 30888928,
"isInfoPage_1" : 29956864,
"isStructured_1" : 29956864,
"objectType_1" : 42384384,
"pageType_1" : 42196336,
"parentURI_1" : 36636656,
"score_1" : 38827824,
"siteKey_1" : 56201824,
"siteScore_1" : 40912704,
"siteScore_1_score_1" : 52449040,
"threadId_1" : 35132272,
"updateNumber_1" : 30823520
},
"avgObjSize" : 550.0584062666474,
"nindexes" : 17,
"nchunks" : 15,
"shards" : {
"shard62-1" : {
"ns" : "xunuu_test.WebDb",
"count" : 891721,
"size" : 531580824,
"avgObjSize" : 596.1290852183587,
"storageSize" : 607436800,
"numExtents" : 20,
"nindexes" : 17,
"lastExtentSize" : 107782144,
"paddingFactor" : 1.0099999999852463,
"flags" : 1,
"totalIndexSize" : 716193072,
"indexSizes" : {
"_id_" : 32671296,
"URI_1" : 103442752,
"score_1" : 38827824,
"siteScore_1" : 40912704,
"siteScore_1_score_1" : 52449040,
"threadId_1" : 35132272,
"expiredTime_1" : 42384384,
"isStructured_1" : 29956864,
"crawlState_1" : 42883120,
"isInfoPage_1" : 29956864,
"siteKey_1" : 56201824,
"fetchTime_1" : 30888928,
"fetchInterval_1" : 28444304,
"parentURI_1" : 36636656,
"updateNumber_1" : 30823520,
"objectType_1" : 42384384,
"pageType_1" : 42196336
},
"ok" : 1
},
"shard63-1" : {
"ns" : "xunuu_test.WebDb",
"count" : 416659,
"size" : 188106548,
"avgObjSize" : 451.46402213800735,
"storageSize" : 220647424,
"numExtents" : 15,
"nindexes" : 2,
"lastExtentSize" : 43311104,
"paddingFactor" : 1.009999999997084,
"flags" : 1,
"totalIndexSize" : 71858864,
"indexSizes" : {
"_id_" : 13850144,
"URI_1" : 58008720
},
"ok" : 1
},
"shard64-1" : {
"ns" : "xunuu_test.WebDb",
"count" : 7,
"size" : 1896,
"avgObjSize" : 270.85714285714283,
"storageSize" : 8192,
"numExtents" : 1,
"nindexes" : 2,
"lastExtentSize" : 8192,
"paddingFactor" : 1,
"flags" : 1,
"totalIndexSize" : 16352,
"indexSizes" : {
"_id_" : 8176,
"URI_1" : 8176
},
"ok" : 1
}
},
"ok" : 1
}
and why shard index count is different.
Could you help me out.
Thanks
lemo lu