Page 1 of 1

HDD is full... can't access web gui, how can I free space?

Posted: Mon Jun 07, 2010 3:09 pm
by butlerm1977
Hey not sure how this happened, but I let ZM run for the first weekend in MoDect mode (4 network cams). This morning I arrive to find the web gui inaccessible.

http access shows...
Could not connect to database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

/var/log/mysqld.log shows....

Code: Select all

100607  9:53:52 [ERROR] /usr/libexec/mysqld: Error writing file '/var/run/mysqld/mysqld.pid' (Errcode: 28)
100607  9:53:52 [ERROR] Can't start server: can't create PID file: No space left on device
100607 09:53:52  mysqld restarted

Looks like mysqld_safe is in infinite restart. How can I go about freeing up space to allow get me into the GUI to run cleanup? I read in other posts that I cannot just delete files from the ZM directory.

Thanks!

update...

Posted: Mon Jun 07, 2010 4:29 pm
by butlerm1977
I deleted one of the install files and I guess it freed up enough room to spit this out in the mysqld.log file...

Code: Select all

100607 11:21:33  InnoDB: Started; log sequence number 0 43655
100607 11:21:33 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.77'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution
100607 11:21:44 [ERROR] /usr/libexec/mysqld: Table './zm/Events' is marked as crashed and should be repaired
100607 11:21:44 [ERROR] /usr/libexec/mysqld: Table './zm/Events' is marked as crashed and should be repaired
http to the web gui shows....
An error has occurred and this operation cannot continue.
For full details check your web logs for the code '9CAB40'

httpd logs contained...

Code: Select all

[Mon Jun 07 11:25:05 2010] [error] [client 192.168.1.100] SQL-ERROR(9CAB40): select count(if(1 and ( E.MonitorId = 3 ),1,NULL)) as EventCount0, count(if(1 and ( E.Archived = 0 and E.StartTime >= '2010-06-07 10:25:05' and E.MonitorId = 3 ),1,NULL)) as EventCount1, count(if(1 and ( E.Archived = 0 and E.StartTime >= '2010-06-06 11:25:05' and E.MonitorId = 3 ),1,NULL)) as EventCount2, count(if(1 and ( E.Archived = 0 and E.StartTime >= '2010-05-31 11:25:05' and E.MonitorId = 3 ),1,NULL)) as EventCount3, count(if(1 and ( E.Archived = 0 and E.StartTime >= '2010-05-07 11:25:05' and E.MonitorId = 3 ),1,NULL)) as EventCount4, count(if(1 and ( E.Archived = 1 and E.MonitorId = 3 ),1,NULL)) as EventCount5 from Events as E where MonitorId = '3'
Going for a reboot now....

Posted: Tue Jun 08, 2010 2:17 am
by kingofkya
You have to repair the mysql table Being lazy right now Just search forum.

Posted: Tue Jun 08, 2010 1:30 pm
by butlerm1977
woud this be the best command to run for mysql repair?

Code: Select all

myisamchk --force --fast --update-state -O key_buffer=64M -O read_buffer=1M -O write_buffer=1M /var/lib/mysql/zm/*.MYI

Posted: Thu Jun 10, 2010 10:01 pm
by kingofkya
That should work just fine.