Primary Shard¶
In general, you should not need to specify the primaryShard in the command. Instead, allow the balancer to select the primary shard.
However, if you do specify the primary shard for a database and the database is already enabled for sharding with a different primary shard, the operation returns an error and the primary shard for the database remains as before. To change the primary shard for a database, use the movePrimary
command instead.