Subject: [mongodb-user] Re: movePrimary and locking dbs



Hi Dave

It's been some time since you posted this question. Have you found a method to unshard your deployment?

Would I be able to continue to write to the ‘bat-production’ database while it is being moved?

Unfortunately the short answer is no.

This is described in detail in the Considerations section in the movePrimary page. Specifically this sentence regarding an unsharded collection: “Avoid accessing an un-sharded collection during migration. movePrimary does not prevent reading and writing during its operation, and such actions yield undefined behavior.”

For the sharded dbs(staging,production) do I run movePrimary and then removeShard “data1”?

Yes you can perform a movePrimary then removeShard to remove the data1 shard. However, I believe currently there is no supported method to unshard a collection without downtime. mongodump and mongorestore may be the most straightforward method to migrate from a sharded cluster to a replica set.

Best regards,
Kevin

--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email...

to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/99276aad-8d06-4f43-9463-2c312e53e8bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



Programming list archiving by: Enterprise Git Hosting