Ask Your Question
3

How to safely clear Ceilometer database?

asked 2013-11-20 13:46:36 -0500

sgordon gravatar image

updated 2013-11-20 14:24:14 -0500

I have an "all in one" OpenStack setup running Havana (RDO) that has been up for around 10 days. As well as flooding the MySQL token database (expected and since resolved) I also noticed that it has a large amount of data (3 G) under /var/lib/mongodb/journal/ which I believe is associated with Ceilometer.

There are three files in the directory of 1 G each, j._0, prealloc.1, and prealloc.2 as well as an 88 byte file names lsn. I'm not familiar with MongoDB at all so my question is how to safely clear the database? I have tried using the mongo client:

# mongo --eval "db.dropDatabase();"

But the files listed above stay on, even after a system restart. I am also wondering if this volume of metering data is expected/normal for such a small setup that has mostly been dormant for such a short period of time?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
3

answered 2013-11-25 08:04:23 -0500

rook gravatar image

updated 2013-11-26 13:05:27 -0500

sgordon gravatar image

It seems like if you drop the db, then remove the preallocated files, you will be fine.

Preallocated files do not contain data. It is safe to later remove them. But if you restart mongod with journaling, mongod will create them again.

http://docs.mongodb.org/manual/tutorial/manage-journaling/

Using the smallfiles directive may also help:

http://docs.mongodb.org/manual/reference/configuration-options/#smallfiles

edit flag offensive delete link more

Comments

Using the above links, the following worked for me: Add line: vi /etc/mongod.conf smallfiles = true Add line: vi /etc/init.d/mongod MONGODB_OPTIONS="--nojournal"

Kunal Patil gravatar imageKunal Patil ( 2013-12-17 02:29:21 -0500 )edit
0

answered 2013-12-17 10:11:06 -0500

For --allinone, packstack should really config mongo to use minimal space: https://bugzilla.redhat.com/1034395

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-11-20 13:46:36 -0500

Seen: 2,644 times

Last updated: Jan 21 '14