Problems with event directory

Forum for questions and support relating to the 1.28.x releases only.
Locked
raydude
Posts: 65
Joined: Sun Jul 21, 2013 6:09 pm

Problems with event directory

Post by raydude »

I've been suffering with a problem for quite some time and I've isolated it down to one issue, but I don't understand the cause.

I'm running Gentoo, ZM 1.28.1 and its working great on an mpeg4 1080P camera, as long as I allow the events to be stored on my ssd in the same folder as the zoneminder www data.

If I change events & images to be symlinks, or if I mount my raid array in place, then the recordings stop working, disappear and I can't get them back.

I've tried this over and over again and every time I use symlinks or use a mount --bind, the recordings stop working.

I figure, since I spin my own kernel, there is a kernel setting to do with filesystems that must be set for zoneminder to function, but I have no idea what it is.

Has anyone dealt with this?

I'll trawl through the kernel today to see if I can find anything that could be the source of my woes.

Thanks in advance for any help you may offer.
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Problems with event directory

Post by bbunge »

Search the WIKI for using add on drive.
raydude
Posts: 65
Joined: Sun Jul 21, 2013 6:09 pm

Re: Problems with event directory

Post by raydude »

You are talking about this: https://wiki.zoneminder.com/Using_a_ded ... Hard_Drive

I followed that, it does not work. Once I implement that, all existing recordings go away and new ones won't happen.

I think there's something else going on.
raydude
Posts: 65
Joined: Sun Jul 21, 2013 6:09 pm

Re: Problems with event directory

Post by raydude »

Here's the lines in the fstab that I used.

/mnt/raid6/zoneminder/events /usr/share/zoneminder/www/events none defaults,bind 0 2
/mnt/raid6/zoneminder/images /usr/share/zoneminder/www/images none defaults,bind 0 2

Please note: when gentoo installs zoneminder it puts symlinks from /usr/share/zoneminder/www/events (and images) to /var/lib/zoneminder/events (and images). I removed those sim links because I think they were an issue as well.
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Problems with event directory

Post by bbunge »

While not an expert in this area I remember seeing comments that you need to have permissions set to match your Apache user (www-data in Debian) in the destination directory. Have also seen that symbolic links may not work...
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Problems with event directory

Post by knight-of-ni »

raydude wrote:You are talking about this: https://wiki.zoneminder.com/Using_a_ded ... Hard_Drive

I followed that, it does not work. Once I implement that, all existing recordings go away and new ones won't happen.

I think there's something else going on.
Except that it does work if you follow the instructions correctly. Gentoo isn't doing anything different with symlinks compared to other distros.
raydude wrote:Here's the lines in the fstab that I used.

/mnt/raid6/zoneminder/events /usr/share/zoneminder/www/events none defaults,bind 0 2
/mnt/raid6/zoneminder/images /usr/share/zoneminder/www/images none defaults,bind 0 2
You are not following the instructions stated in the link you referenced.
See the second item under Frequently Asked Questions which tells you not to map your drives under /usr/share/zoneminder.
raydude wrote: Please note: when gentoo installs zoneminder it puts symlinks from /usr/share/zoneminder/www/events (and images) to /var/lib/zoneminder/events (and images). I removed those sim links because I think they were an issue as well.
And doing that can cause you to lose all your events after an upgrade. See the Frequently Asked Questions at the bottom of the wiki link you referenced.

What you need to do is find the real folders your events live under. Look under /var/lib or /var/cache. Put the original symlinks back (which point to those folders). Then recreate your mount points under fstab to point to those real folders.

If you take the time to read through and understand everything in that wiki link, then will you will find that this solution works perfectly.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
raydude
Posts: 65
Joined: Sun Jul 21, 2013 6:09 pm

Re: Problems with event directory

Post by raydude »

Thanks for trying.

I know about ownership needing to be apache:apache.

It's not the upgrade that kills the videos. The videos do not get written when there is a symlink or I use the mounted folders. They simply do not write. There is no error message, just messages about the files disappearing and the data base entries being removed.

It's really weird. I get some recordings at first, but after a few minutes they are deleted because zoneminder can't find them.

Hopefully I'll get some time this weekend to play with it again. It's working with storage on the local drive at the moment.
Locked