Page 1 of 1

disk full and crashed now cant access event database

Posted: Wed Sep 17, 2008 2:41 pm
by cadillackid
My zonemoder system filled up its disk space to the point that the MySQL server crashed and was not running.. at that point i rebooted the system, deleted some files , rebooted again, this time ZM and the Mysql started up normally. I let the zmaudit process delete all the events out of the database so now i have a blank events screen... my capturing works bormally now i can view all my monitors and see them go into alarm etc like thwey are supposed to however no event is created and no files are stored on the hard drive with images...

when I read the Logs I get an entry like:

Zoneminder zma_m2[12365]: ERR [Can't insert event: Duplicate entry '36681' for key 1]

I did a select * from Events; in the mysql console and get an ampty set.. so im not sure why it thinks the record exists?

what is the best way to get out of this? and how to have the system not fill the disk up again without manually deleting events?
-Christopher

Posted: Wed Sep 17, 2008 6:46 pm
by jameswilson
sounds like you have a db issue, if you have a look about repairing / checking you db.

Posted: Wed Sep 17, 2008 7:22 pm
by coke
MySQL Administrator is available on most distros in the repositories, part of the MySQL GUI tools package, I believe. Easy graphical way to check status on databases, repair them, etc.

Command line works also, but this might get you running faster. And if you get the whole package, it comes with a nice query browser.

Posted: Wed Sep 17, 2008 9:03 pm
by cadillackid
are there procedures specific to the zm database or are you guys just tossing me to general databse repair procedures? i also do not have and do not ever plan to have X on my zm server... though I can probably set myself up a remote user and run the gui on a remote machine....
-Christopher

Posted: Wed Sep 17, 2008 9:28 pm
by jameswilson
you use the gui tools from a windows client, but id personally use the command line. And yes its generic mysql repair procedure.

Posted: Thu Sep 18, 2008 2:59 am
by cadillackid
that did the trick... for anyone else who may experience the problem..

fro mthe linux command line I did a

mysqlcheck -r zm -uuser -ppass

of course replace user with your mysql username and pass with your mysql password....
-Christopher

Posted: Thu Sep 18, 2008 3:00 pm
by coke
How many cameras does one need to run on a machine before it becomes relevant that you're running X? I have a 2.6ghz quad core intel, 3 gigs of ram, 7 IP cams capturing (and motion detecting) 10fps at 640x480, firefox open to check my email, pidgin running to chat, VMWare Server running a windows box mainly to check my other gmail box in chrome, and rhytmbox blasting.

I never have an issue. No processor's hit 100%, the ram's never passed 1 of the 3 gigs. How many cameras am I going to need until it starts to make a difference? I understand the concept, I miss the days when Novell beat Microsoft as a server because it didn't bother with all the gui crap. But machines are faster and cheaper now.

Posted: Fri Sep 19, 2008 3:06 am
by cadillackid
well my Zoneminder *IS* a Virtual Machine in VMware under windows server 2003.. running all IP Cameras so I chose not to run anything unnecessary for the operation of the cams.. I allow it 1 gig of RAM and the host server is a cor 2 duo at 2/2 ghz with server 2003 x64 running VMWare server... the server handles my complete home automation system..(Movie / music storage. Homeseer, Mainlobby{with 3 thin clients access terminal services}, Perfectemp HVAC Staging system, Zoneminder in a VM, whats up?! network monitoring, Main Webserver running ASPX / AJAX) and i dont have issues with any of it.. typically I see RAM usage on the host at 1.5 Gigs (I hve 4 gigs), ZM VMware machine typically runs .5 CPU and 400 meg ram as shown my Top... Host CPU is usually at 35-40% Max.. but I didnt want to push a Gui inside a VM so I stay in runlevel 3.....
-Christopher