前提・実現したいこと
mongodbでsharding環境にて
sh.enableSharding("コレクション名")を実行し
データがシャード1→シャード2と移動している最中に
サーバーを停止させました。
サーバーおよび、mongodbを再起動させたら
自然とシャード間のデータの移動が再開するのかと思ったのですが、
何も変化がありません。
どうすれば、再開するのでしょうか?
手動でchunkを移動させる方法もあるようですが、
できれば自動で移動させたいです。
発生している問題・エラーメッセージ
collection.aはサーバー停止前にデータの移動が完了していたので、
shard-1,2のchunks数がほぼ同じですが、
collection.bは移動中にサーバーが停止したため、chunks数の差が大きいです。
ドキュメントではこのような場合、自動でchunks数が同じとなるように
処理すると思ったのですが、特に変化がありません。
mongos> sh.status() --- Sharding Status --- sharding version: { } shards: { "_id" : "shard-1", "host" : "【略】", "state" : 1 } { "_id" : "shard-2", "host" : "【略】", "state" : 1 } active mongoses: "3.6.7" : 1 autosplit: Currently enabled: yes balancer: Currently enabled: yes Currently running: no Failed balancer rounds in last 5 attempts: 0 Migration Results for the last 24 hours: 1756 : Failed with error 'aborted', from shard-1 to shard-2 databases: { "_id" : "config", "primary" : "config", "partitioned" : true } config.system.sessions shard key: { "_id" : 1 } unique: false balancing: true chunks: shard-1 1 { "_id" : { "$minKey" : 1 } } -->> { "_id" : { "$maxKey" : 1 } } on : shard-1 Timestamp(1, 0) { "_id" : "xxxxx", "primary" : "shard-1", "partitioned" : true } collection.a shard key: { 【略】 } unique: false balancing: true chunks: shard-1 48 shard-2 47 too many chunks to print, use verbose if you want to force print collection.b shard key: { 【略】 } unique: false balancing: true chunks: shard-1 670 shard-2 349 too many chunks to print, use verbose if you want to force print
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/09/27 01:20