Page 1 of 1

Repair directory structure after 'manual purge'

Posted: Tue May 29, 2012 8:17 am
by tortoise74
I got zoneminder v1.25 working but found that it filled up my remainging disk space 4Gb overnight. As I hadn't set-up a purgewhenfull filter yet.
Unwisely I chose to rm -rf the full directory of /var/cache/zoneminder/1/events/.
I expected zoneminder to recreate any directories needed as required. Something is not right though.
Although zoneminder records it is unable to playback.
I tried running "zmfix -a". I'm not sure what its supposed to fix but it didn't do anything for this problem.

I can just re-install as it is a new installation but I would like to understand the system better.
(any links to discussions or documentation of the design would be very useful)

Is there anyway to repair the /var/cache directory structure?
What is a easy, correct and safe way to *manually* purge parts of it when it starts to get too full?



Manual Purge

Posted: Tue May 29, 2012 6:41 pm
by tortoise74
It seems I was wrong and zoneminder does at least partially repair the cache itself.
I can happily playback events in firefox but for some reason not chrome. Though both browsers display the live feed perfectly.

Re: Repair directory structure after 'manual purge'

Posted: Wed May 30, 2012 12:16 pm
by christophe_y2k
Hello, after filled up hdd, depend on your system (best to separate mysql database directory and zoneminder image directory)
i need to repair mysql bdd
on my gentoo :

# /etc/init.d/zoneminder stop
# /etc/init.d/apache2 stop
# /etc/init.d/mysql stop
# myisamchk --extend-check /var/lib/mysql/zm/*.MYI
# myisamchk --recover /var/lib/mysql/zm/*.MYI
# /etc/init.d/mysql start
# /etc/init.d/apache2 start
# /etc/init.d/zoneminder start

or repair zoneminder bdd with phpMyAdmin

Re: Repair directory structure after 'manual purge'

Posted: Wed Jun 06, 2012 7:24 pm
by tortoise74
Its the image directory taking up most of the space but I don't know what it is safe to delete.
I guess find . -name \*.jpg | xargs rm -f rather than rm -f is safer.
Of course that leaves the database with dangling events.

I'm sure there is a better way.