Disk space and databases
Hi, I was asked a few days ago to look at our Mango. I'm not too bad with Linux, but have never looked at the Mango before. I logged into the ssh port and discovered almost immediately we're pretty much out of disk space. I poked around and discovered it's all in the database directory.
/opt/mango/databases/mah.h2.db is 100Mb. The mangoTSDB folder is 4Gb in size. I did manage to do a backup of the database and the zip file of the backup is only 95k in size. I ran a purge from the web page which didn't make any difference at all.
Is there an easy way to shrink/purge the mangoTSDB file? From what I've read I believe it holds shards of the database, but I've got no idea if they are important or not. I'm still doing my research, so might find an answer, but I thought I'd ask here in case someone has a wonderful idea.
phildunlap last edited by
Hi Boolardyrm, welcome to the forum!
I did manage to do a backup of the database and the zip file of the backup is only 95k in size. I ran a purge from the web page which didn't make any difference at all.
Mango/backupcore-database-H2-date.zipfile does not contain the data from the NoSQL database, so that's partially why it is so small. The effects a purge will have is reliant on the purge settings. If your points or data sources override the purge settings, then the "Purge point data older than" setting saved on
/ui/administration/system/purgewould be overridden in deciding how much data to retain for a data source or a data point. You can try to set this to a shorter time period of data retained and rerun the purge, that may help.
From a purely Linux standpoint, you could look for the lowest number
.data.revfile in Mango/databases/mangoTSDB/// and delete that with shell commands, like
find Mango/databases/mangoTSDB -name '700.data.rev' -deletewhich will free the space owned by that file, if the file is not currently open in any program.
Thanks, just wanted to say that deleting some files from the command line and stopping/starting the mango service appears to have fixed it. I'm leaving other people to modify the purge settings since they're the ones who run report and exciting things like that, so they know how much data they need, but I won't be surprised if I get a call in another few months asking if I could do it again.
phildunlap last edited by
I won't be surprised if I get a call in another few months asking if I could do it again.
What is that a reflection of you not having faith in? Did you adjust the purge settings?
I think it's more a working understanding of how things seem to happen around here. :)
I adjusted the purge settings down to 6 months, ran the purge and have told the people who watch the Mango to adjust the settings to it fits their needs, but to be aware of if they set it back to a year, chances are it will fill up again.
We shall see how it goes.