Zoneminder 1.23X out of control /var/lib/mysql/zm

Support and queries relating to all previous versions of ZoneMinder
Locked
metallica1973
Posts: 100
Joined: Sat Aug 23, 2008 8:03 pm

Zoneminder 1.23X out of control /var/lib/mysql/zm

Post by metallica1973 »

My client has zoneminder 1.23x and it has stop working. When I looked at the system I see that his /var/lib/mysql/zm directory has filled up the /var partition and wanted to know what has happened and why did it fill up. I have the recording saving to /home directory which is 100G's. I can see that when I attempt to start it it errors and I know it is related to the filled /var/lib/mysql/zm directory. help

sudo du -h /var|more

5.8G /var/lib/mysql/zm
284K /var/lib/mysql/mysql
5.8G /var/lib/mysql
4.0K /var/lib/update-manager
8.0K /var/lib/PolicyKit
12K /var/lib/binfmts
20K /var/lib/initramfs-tools
24K /var/lib/pam


the total disk space is:

sudo df -h

/dev/sda8 4.6G 546M 3.9G 13% /
tmpfs 1007M 0 1007M 0% /lib/init/rw
varrun 1007M 108K 1007M 1% /var/run
varlock 1007M 0 1007M 0% /var/lock
udev 1007M 2.9M 1005M 1% /dev
tmpfs 1007M 0 1007M 0% /dev/shm
lrm 1007M 2.2M 1005M 1% /lib/modules/2.6.27-17-generic/volatile
/dev/sda1 137M 53M 78M 41% /boot
/dev/sda10 203G 89G 104G 47% /home
/dev/sda9 2.8G 69M 2.6G 3% /tmp
/dev/sda6 6.9G 2.0G 4.6G 31% /usr
/dev/sda7 6.9G 6.6G 0 100% /var

and I cannot start zoneminder:

bpshady@Security:/var/lib/mysql$ sudo /etc/init.d/zoneminder start
Starting ZoneMinder: DBI connect('database=zm;host=localhost','zmuser',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at /usr/share/perl5/ZoneMinder/Config.pm line 89
Can't call method "prepare_cached" on an undefined value at /usr/share/perl5/ZoneMinder/Config.pm line 91.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 100.
Compilation failed in require at /usr/share/perl5/ZoneMinder.pm line 33.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder.pm line 33.
Compilation failed in require at /usr/bin/zmpkg.pl line 45.
BEGIN failed--compilation aborted at /usr/bin/zmpkg.pl line 45.
failure

What to do??????
User avatar
kingofkya
Posts: 1110
Joined: Mon Mar 26, 2007 6:07 am
Location: Las Vegas, Nevada

Post by kingofkya »

ok first you need to free up some space 10mb or so should be enofe.

Stop ZM
Resart MYSQL

run ZMaudit.pl

it should deleat the excess events.

next open up the zm interface you ether have zm_fast_deleat on and zm audit off or the purge when full filter is off.

start zm and watch zmlog make sure its deleting events when hard disk is full.
metallica1973
Posts: 100
Joined: Sat Aug 23, 2008 8:03 pm

Post by metallica1973 »

what would be the recommended optimal settings?
User avatar
kingofkya
Posts: 1110
Joined: Mon Mar 26, 2007 6:07 am
Location: Las Vegas, Nevada

Post by kingofkya »

im my opinion yes the thing is when you enable fast delete it only removes the db record and then zmaudit come back later and removes the rest from the drive most users dont relises this me included and kill there system with a full drive.
Locked