2

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
1
  • can you provide the output of df -h? Commented Nov 24, 2011 at 22:18

1 Answer 1

3

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!

3
  • 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! Commented Nov 25, 2011 at 17:36
  • No problem; I only knew because I ran into the same exact issue! Glad you got it all resolved! :) Commented Nov 26, 2011 at 4:57
  • This answer has just saved my life! Thanks @nicknisi Commented Jan 3, 2013 at 8:59

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.