6

I have a MongoDB cluster, I accidentally hosed a shard, I don't have a backup. It's pretty easy to recover the data, but after issuing the removeShard command, it says it's draining. However, the shard is unreachable, and will forever be unreachable (I no longer have access to the cloud IP address, and the data is gone). I just want to tell mongo to forget about the shard forever. Is this possible? i.e. Can you remove a shard from mongo without the config controller having access to it?

Kevin
  • 61
  • 1

1 Answers1

1

Wiki answer generated from question comments by SDillon

No; at least in versions prior to 2.6. After 2.6 I am not 100% sure.

I've had this happen in development, thankfully a while ago. I dropped the collection and recovered the data to it. Here is a MongoDB email group post regarding this topic and your exact challenge.

Another mistake I made, once, was to monkey around in the config database and attempt to remove the shard info that way. I ruined that dev cluster.

Paul White
  • 94,921
  • 30
  • 437
  • 687