发现一个分片磁盘有问题,本打算移除分片重装这机器
结果这分片一直 "draining" : true
db.runCommand( { removeshard: "shard0000" } )
我应该是刚removeShard 时看到提示
立马又执行了movePrimary
db.runCommand({moveprimary:"xxxx",to:"shard0001"})
然后chunks分片一直是 354
db.runCommand( { removeshard: "shard0000" } )
{
"msg" : "draining ongoing",
"state" : "ongoing",
"remaining" : {
"chunks" : NumberLong(354),
"dbs" : NumberLong(0)
},
"note" : "you need to drop or movePrimary these databases",
"dbsToMove" : [ ],
"ok" : 1,
"operationTime" : Timestamp(1553001600, 1),
"$clusterTime" : {
"clusterTime" : Timestamp(1553001600, 1),
"signature" : {
"hash" : BinData(0,"nlmTAbL+HOdwACg5qH5Az8n4KGE="),
"keyId" : NumberLong("6669824077403783188")
}
}
}
后面找资料看到说
Do not run themovePrimary until you have finished draining the shard
是我执行错了吗?
这个还能恢复吗?