There was a problem loading the comments.

Reclaim disk space - MongoDB replica set

Support Portal  »  Knowledgebase  »  Viewing Article

  Print

Original Question

or Issue:

The Auto Archive Audit Database feature is enabled and working, but the storage space isn't reduced.

Environment:

  • Product - FileCloud server
  • Version - All
  • Platform - All
Steps to Reproduce:

The Auto Archive Audit Database is enabled.

MongoDB is deployed in a replica set.

Error or Log Message: Storage space consumption is not reduced.

Defect or

Enhancement Number:

 
Cause:

MongoDB does not release the space but keeps it for new entries to be added.

Resolution or

Workaround:

If you need to reclaim the space, please find below the procedure to compact the audit collection in a MongoDB replica set:

 

  • Compact the audit collection in every secondary node, do it one by one:

    ______________

    use tonidoauditdb;
    db.runCommand({ compact: 'audit' });
    ______________
        
  • Step down the current primary:  rs.stepDown();
        
  • Compact the old primary.
Notes:  Please execute the above procedure during a maintenance window and take a backup before that.

 


Share via

Related Articles


Self-Hosted Help Desk Software by SupportPal
© FileCloud