Page 1 of 1

Using network storage for events and images

Posted: Mon Dec 11, 2017 4:34 pm
by jwtoler
I have successfully set up a NFS location that Zoneminder is using for storing events and images. This works but sometimes the NFS server goes down or the actual Zoneminder system looses the connection for whatever reason. This causes it to just not write the images to the directory or it ends up writing them to the local hard drive which is only 20GB. I'm also not sure what happens to those local images when the NFS connection comes back online and that directory is now a NFS location.

How can I set up something so Zoneminder cannot just write to it's default location if the NFS connection is down, stoping Zoneminder from writing to the local 20GB hard drive all together, and also email me that the NFS connection is down? It would be nice if it could use a "backup location" when the NFS connection is not available and email me that it did so.


*** This might be a question targeted more towards Linux as a whole but I am unsure of websites where I could ask this question.

Re: Using network storage for events and images

Posted: Tue Dec 12, 2017 1:27 am
by bbunge
Use systemd to do the mounts.
For Ubuntu/Debian see: https://wiki.zoneminder.com/Common_Issu ... ive_or_NAS
Can also be done for Centos/RH.

Re: Using network storage for events and images

Posted: Tue Dec 12, 2017 1:35 am
by jwtoler
Wow... never seen that part of the countless documentation I browse through every now and then. Thanks!

Using systemd... I’m assuming it’s pretty easy, with a Google search, to have it check if it’s running and send an email if not?

Re: Using network storage for events and images

Posted: Tue Dec 12, 2017 2:07 am
by bbunge
I do know that systemd, the way we have it configured, will not allow Zoneminder to start if the drive mapping fails on start. While I have not tested drive failure while running I suspect systemd will, or can be set to, stop Zoneminder. As for monitoring there are several ways it can be done. I've been told monit will work.

I have used systemd to mount NFS exports and SMB/CIFS shares. Survey says SMB works better. Make sure you use a file system on your remote storage that understands symbolic links (NTFS, XFS and FAT don't).

Re: Using network storage for events and images

Posted: Tue Dec 12, 2017 2:44 am
by jwtoler
Use FreeNAS to handle all the storage for various systems.

Re: Using network storage for events and images

Posted: Tue Dec 12, 2017 3:16 am
by iconnor
I havn't gotten to it yet, but storageareas branch is 2 or three lines of code away from trying different storage bits on failure.

Re: Using network storage for events and images

Posted: Tue Dec 12, 2017 2:33 pm
by jwtoler
iconnor wrote: Tue Dec 12, 2017 3:16 am I havn't gotten to it yet, but storageareas branch is 2 or three lines of code away from trying different storage bits on failure.
Did not know you guys were working on adding this feature. That’s awesome.

What branch is that exactly? Any idea of when it might be officially merged into the master code?

Re: Using network storage for events and images

Posted: Wed Dec 13, 2017 3:11 pm
by rockedge
I think it is this branch on iconner's PPA https://launchpad.net/~iconnor/+archive ... orageareas