Comment 1 for bug 1210407

Revision history for this message
Haw Loeung (hloeung) wrote :

Hi,

We had issues with bootstrapping of new environments in Canonistack. Eventually traced it down to the default instance of m1.tiny having only 2GB of storage and the second mongodb created all these prealloc[1] files filling up disk space.

ubuntu@juju-canonistack-haw-lcy02-machine-0:/var/lib/mongodb/journal$ ls -la
total 3145748
drwxr-xr-x 2 mongodb nogroup 4096 Sep 26 05:21 .
drwxr-xr-x 3 mongodb mongodb 4096 Sep 26 05:21 ..
-rw------- 1 mongodb nogroup 1073741824 Sep 26 05:21 j._0
-rw------- 1 mongodb nogroup 1073741824 Sep 26 05:21 prealloc.1
-rw------- 1 mongodb nogroup 1073741824 Sep 26 05:21 prealloc.2

ubuntu@juju-canonistack-haw-lcy02-machine-0:/var/lib/mongodb/journal$ ps afx | grep mongo
 7511 pts/2 S+ 0:00 \_ grep --color=auto mongo
 7217 ? Ssl 0:05 /usr/bin/mongod --config /etc/mongodb.conf
 7319 ? Ssl 0:01 /usr/bin/mongod --auth --dbpath=/var/lib/juju/db --sslOnNormalPorts --sslPEMKeyFile /var/lib/juju/server.pem --sslPEMKeyPassword xxxxxxx --bind_ip 0.0.0.0 --port 37017 --noprealloc --syslog --smallfiles
ubuntu@juju-canonistack-haw-lcy02-machine-0:/var/lib/mongodb/journal$

We managed to work around it by re-deploying with the 'root-disk' constraint set but it would be nice to have this fixed. Would shipping out a /etc/default/mongodb file with ENABLE_MONGODB="no" fix this?

Thanks,

Haw

[1] http://serverfault.com/questions/329574/run-a-mongodb-configuration-server-without-3gb-of-journal-files