Page 1 of 1

Running out of disk space

Posted: Fri May 20, 2016 8:00 pm
by baradanikto
I've read the docs and done what was suggested for filters. However, I still see a large amount of space being consumed in var/cache/zoneminder/events. I'm talking gigs. How do I control that from happening? I've used MySql to clean out the events, but, it appears there's some other files left around.

Re: Running out of disk space

Posted: Sat May 21, 2016 12:31 pm
by bbunge
You use zoneminder to clean out events. If you did it with some other utility you likely messed up the zm database and should dump it and make a new one. You can use filters to delete events and zm will, in time, delete the event images. Or you can turn on fast delete. Online docs cover this well.

Re: Running out of disk space

Posted: Sat May 21, 2016 1:50 pm
by baradanikto
Thanks for your reply. I agree that using MySql workbench probably corrupted something. But, are you taking about dropping the Events table, or, the entire database? I'm assuming that if I drop the entire database I'll lose all definition of my camera(s), etc. What is the recommended way to recreate the ZM database/tables from scratch?

Re: Running out of disk space

Posted: Sat May 21, 2016 8:57 pm
by bbunge
Create Zoneminder database in MySQL (Note: this also creates the default Zoneminder user and permissions in MySQL)

mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql

mysql -uroot -p -e "grant all on zm.* to 'zmuser'@localhost identified by 'zmpass';"

mysqladmin -uroot -p reload

Re: Running out of disk space

Posted: Sun May 22, 2016 5:45 pm
by baradanikto
Thanks for that. But, before I can attempt anything, I need to resolve the disk space issue with "var/cache/zoneminder/events". There seems to be gigs of data there and I can't delete it because it seems to be owned by a different user. Will your procedure clean up that space also? My fear is that if it doesn't, I still will need to address the disk space as I only have about 192mb left of 500gb.

Re: Running out of disk space

Posted: Sun May 22, 2016 7:21 pm
by mikb
The steps above won't clear out your disk events directly.

ZMAudit (when it next runs) may get very busy deleting the disk files (jpgs/videos) which no longer have a corresponding database entry (due to you having an empty database.)

Re: Running out of disk space

Posted: Thu May 26, 2016 4:10 pm
by baradanikto
mikb & bunge..... Thanks for your help. I was able to recreate the database following your advice. It took a couple of days, but, it appears that the audit program (or filter) has cleaned out the orphaned files. My free disk space has increased and is now at the expected level.