sharding - how to clear out garbage tables from broken mongodb shard -


i trying remove remains of data shard proved slow useful. programming error produced bunch of databases have bogus names:

mongos> db.runcommand( { removeshard: "shard0002" });  {     "msg" : "draining ongoing",     "state" : "ongoing",     "remaining" : {             "chunks" : numberlong(0),             "dbs" : numberlong(30)     },     "note" : "you need drop or moveprimary these databases",     "dbstomove" : [             "*�\u000f",             "m�\u0006",             "ed_tione_tr�\u0002",             "sns�\u0002",             "sns�\u0002",             "sns�\u0002",             "sns�\u0002",             "sns�\u0002",             "sns�\u0002",             "sn�\u0002",             "sn�\u0002",             "sn�\u0002",             "sn�\u0002",             "sn�\u0002",             "sn�\u0002",             "sn�\u0002",             "s�\u0002",             "s�\u0002",             "�\u0002",             "�\u0003",             "�\u0006",             "�%\u0003",             "��\r",             "�\u0007",             "�\u0002",             "�\u0002",             "�\u0002",             "�\u0002",             "�\u0002",             "�\f"     ],     "ok" : 1 } 

i access names, can't type:

mongos> var k = db.runcommand( { removeshard: "shard0002" }); mongos> var n = k.dbstomove 

but, doesn't me:

mongos> db.admincommand({ moveprimary: n[10],to : "shard0001" }); { "ok" : 0, "errmsg" : "can't find db!" } 

i'm running mongodb 2.6.7, , getting rid of useless shard 1 thing keeping upgrading.

in end, did this:

use config db.shards.remove({"_id":"shard0002"}); 

as data cared had been drained. have 2 more shards drain, , have garbage databases, fortunately not ones untypeable.

i'd still better answer on how remove these garbage databases.


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -