Page 1 of 1

zmaudit.pl is deletting the wrong events

Posted: Sat Jan 11, 2014 12:00 am
by muchacha_grande
Hi,

I'm running Zoneminder 1.26.5 on a CentOS 6.5 virtual machine under VMWare ESXi Server.

Events and Images directories are pointing to an external storage through NFS and 'external' directory is mounted at boot time and pointing to a shared resource of a NAS server at IP:/CAMS.

Configured directories as as follows:

DIR_EVENTS = external/zoneminder/events
DIR_IMAGES = external/zoneminder/images

This is the mounted share:
<remote IP>:/CAMS on /usr/share/zoneminder/www/external type nfs (rw,intr,vers=4,addr=<remote IP>,clientaddr=<local IP>)

Events are being recorded fine, but zmaudit.pl have deleted events in a wrong way.

Observe the log at 19:54:

2014-01-10 19:54:07.698270 zmaudit 3005 INF deleting zmaudit.pl
2014-01-10 19:54:07.677970 zmaudit 3005 INF Filesystem monitor '19' does not exist in database zmaudit.pl

I don't have 19 monitors, just 7 but at that time was only recording events on the first one.

After deletion the directory structure left on the disk was as follows:

external/zoneminder/events/1/14/01/10

Everything inside '10' directory was deleted by zmaudit.

The recorded and then deleted event happened at 19:26:35 so the directory structure following the '10' directory was .../19/26/35/...

For some reason zmaudit deleted everything inside the '19' directory inclusive may be thinking that '19' directory is the root of a 19th monitor as if it were inmediately after 'events' directory.

Thank you...

Re: zmaudit.pl is deletting the wrong events

Posted: Sat Jan 11, 2014 3:14 pm
by knight-of-ni
The 19 simply means that's the 19th monitor that was created over the entire lifetime of your particular system. If you create and then delete monitors 1-18, the next monitor would be known as monitor 19 to zoneminder.

I believe the issue here is that the symbolic links have not been created under your events folder.
For each monitor, you should have a link that looks like this:

Code: Select all

lrwxrwxrwx 1 apache apache      1 Oct  1  2011 {human_friendly_name_of_monitor} -> {monitor_number}
If you don't have these then zmaudit thinks you've got orphaned records and deletes them from the disk.

EDIT: Spelling

Re: zmaudit.pl is deletting the wrong events

Posted: Sat Jan 11, 2014 3:45 pm
by muchacha_grande
Thank you for your answer...

I checked the presence of those links and they are all there, but I think that when I migrated the events directory to the external drive I didn't copy all the previous structure.

I'll keep testing a little more...

Thank you again and best regards...