My company is using mongoDB as a database.
Currently we are writing script for adding shard, once the disk value increase more than 70%.
It is working fine and adding one extra shard after threshold of 70% reaches.
The problem is that when we add shard the file size for old shards are not getting reduce as mentioned in mongo document as well.
So we connect to mongos and execute db.repairDatabase, which is working fine and reduce the file size of old shards.
The biggest problem we are facing is that the repair Database command only shrinks the storage for the primary shard, not secondary shards.
We need to shrink the secondary shard as well for automation.
Is there any command to shrink mongoDB secondary node as well?
We don't want to do resynch it: is a too long and tedious job...