Compact an Atlas Volume
Atlas Device Sync optimizes sync storage by minimizing the amount of Device Sync metadata stored in your Atlas clusters. However, these strategies do not reduce the overall size of the Atlas cluster.
To reclaim disk space in your cluster, you must compact the data on an Atlas volume. For more information on reducing the size of your Atlas cluster, contact Support.
You can compact your Atlas volume in two ways:
(Recommended) File a Support ticket to request a rolling resync be performed on your Atlas cluster. This process is similar to the procedure outlined in Resync a Member of a Replica Set, but re-syncing an Atlas cluster must be completed by a Support representative.
Alternatively, you can compact the indexes on your Atlas cluster using the compact() command. This may not reduce the volume size as effectively as performing a rolling resync.
This method involves performing a failover on the cluster's primary node. To fully understand this process and to ensure that your cluster meets the minimum requirements to successfully handle a primary failover, we highly recommend that you first perform a primary failover test.
After successfully testing failover of your primary node, follow these steps:
Run the compact() command on each of the cluster's secondary nodes, one at a time.
Perform a failover on the primary mode, then run
compact()
on the primary node.