I ran out of disk space on my mongo database. I saw it and dropped some collections (120 out of 1700 i had). And ran db.compact(...) thinking it would release free space. well, that was a stupid idea.

Anyway, the database is around 800GB, and I dont have any space (~5GB) in the current disk. I symlinked a folder from another disk that has around 35GB and tried db.repairDatabase() (and mongod --repair --repairpath ...), but that failed too saying not enough space. What else can I do? short of getting another 1TB HDD?

Why is even 35GB not enough? Since I dropped the collections, I know I should get another ~50GB free after the repair. Is that going to be enough?

The partition I use for data would have around ~800GB for mongo. How much free space should I ideally have?


I don't know why someone would downvote. What's bad about this question? I read all the documents I can find, and it says I need working set+2GB free space. But no queries are running and mongod stopped. So I'm not sure why 35GB is not enough.

migrated from stackoverflow.com Nov 24 '13 at 5:35

This question came from our site for professional and enthusiast programmers.

  • oh, yeah. sorry – xcorat Nov 23 '13 at 22:21
  • The only thing you can do is copy the mongo files to another disk, there is no way to compact the files without having a line open to another file, though there might just be enough space to shard... – Sammaye Nov 23 '13 at 23:32
  • I replied to this on mongodb-users google group - that's probably a better venue for this anyway. – Asya Kamsky Nov 25 '13 at 9:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.