Docker Community Forums

Share and learn in the Docker community.

Running out of disk space with a mounted volume


(Adamgotterer) #1

I’m mounting a 20GB mongo database to a host folder and it’s out of memory before it can start. It appears that /data/db is being mounted to tmpfs instead of to disk. Any ideas how to fix this?

docker-compose:

    mongo:
    image: mongo:2.4
    volumes:
        - /data/db:/data/db

Docker output

mongo_1  | Wed May  4 20:55:12.591 [initandlisten] ERROR: Insufficient free space for journal files

Machine memory:

Filesystem     1K-blocks    Used Available Use% Mounted on
tmpfs            1025388  241788    783600  24% /data/db
/dev/vda2       61886452 1128580  57591152   2% /data/configdb
/dev/vda2       61886452 1128580  57591152   2% /etc/resolv.conf
/dev/vda2       61886452 1128580  57591152   2% /etc/hostname
/dev/vda2       61886452 1128580  57591152   2% /etc/hosts