Can I distribute shard already inserted data?
I tried to do it alone, but it didn’t work.
Step)
- insert document
- sh.enableSharding
- db.createIndex
- sh.shardCollection
It’s awkward because it’s a translator, sorry.
Ask me if you don’t understand anything.
If the collection (with the inserted data) is sharded, the collection’s data is distributed among the shards - based upon the Shard Key.
Also see:
Review your steps once again for deploying a sharded cluster: Deploy a Sharded Cluster. If you had followed the procedures then there should not be any problem.