I have a directory in my local file system where databases are stored called moveChunk which I understand is used by MongoDB for shard movement of chunks. This is taking up around 206GB and I can't find any information on MongoDB site for cleaning this. Some of the data is from earlier in the year. Is there a resource to determine if this is safe to clean? Or is there a process within MongoDB that cleans this?

  • Please see this. groups.google.com/forum/#!topic/mongodb-user/egdAfPFpIBk Oct 18, 2017 at 14:24
  • @SqlWorldWide The link in that forum post to Mongo does not seem to advise on what to do and the other link for Markus' site seems to be down. I've seen a number of forum posts saying its ok to remove but not much beyond individuals discussion about it being ok.
    – Russ960
    Oct 18, 2017 at 14:47

1 Answer 1


As per the MongoDB official documentation:

Is it safe to remove old files in the moveChunk directory?

Yes. mongod creates these files as backups during normal shard balancing operations. If some error occurs during a migration, these files may be helpful in recovering documents affected during the migration.

Once the migration has completed successfully and there is no need to recover documents from these files, you may safely delete these files. Or, if you have an existing backup of the database that you can use for recovery, you may also delete these files after migration.

To determine if all migrations are complete, run sh.isBalancerRunning() while connected to a mongos instance.

  • Thank you for that info. I did several searches and could not find that. Much appreciated.
    – Russ960
    Oct 18, 2017 at 16:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.