Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to upgrade MongoDB from version 1.6.5 to version 2.0.1 on an Ubuntu machine. I have tried many ways of updating, including replacing the binaries with the more recent ones, to adding mongodb-10gen to my sources list and installing from apt-get. However, each time I start mongodb after the upgrade I get a message similar to the following from the OS:

This computer has only 176.0 KB disk space remaining. You can free up disk space by removing unused programs or files, or by moving files to an external disk.

I am confident that I have more than enough space for this upgrade, but I can't figure out what I am doing wrong for this to continue happening. Anyone run across similar issues? Were you able to solve it?

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             7.5G  7.2G   64K 100% /
none                  492M  216K  492M   1% /dev
none                  499M  184K  499M   1% /dev/shm
none                  499M  144K  499M   1% /var/run
none                  499M     0  499M   0% /var/lock
none                  4.0T     0  4.0T   0% /media/psf
/dev/sr0               23M   23M     0 100% /media/CDROM
share|improve this question
can you provide the output of df -h? – sreimer Nov 24 '11 at 22:18
up vote 3 down vote accepted

Are you running a 64-bit system? Journaling is automatically enabled on 64-bit systems as of Mongo 1.9.2, and this can take up quite a bit of space. You can safely disable journaling and clear out the old journal files (which can be quite big).

To disable from config file, you will need to COMMENT OUT or DELETE the line that says journal = true (if it exists) and add a line that says nojournal = true. Or, if you're running Mongo via command line, specify --nojournal. Regardless, make sure you restart Mongo before going to the next step.

To delete the journal files, go to your {dbpath}/journal and remove the entire journal subdirectory. This will clear out the journal files and should clean up quite a bit of space.

Hope this helps!

share|improve this answer
Yes, I am running a 64-bit system, and that looks like it was totally the problem. I am testing this in a VM that doesn't have a ton of disk space, but should have had enough, when I did what you said, it freed up a ton of space. Thanks! – nicknisi Nov 25 '11 at 17:36
No problem; I only knew because I ran into the same exact issue! Glad you got it all resolved! :) – Andrew M. Nov 26 '11 at 4:57
This answer has just saved my life! Thanks @nicknisi – Waliaula Makokha Jan 3 '13 at 8:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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