Using network storage for events and images

Forum for questions and support relating to the 1.31.x releases only.
Locked
jwtoler
Posts: 4
Joined: Mon Dec 11, 2017 4:24 pm

Using network storage for events and images

Post 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.
bbunge
Posts: 2930
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Using network storage for events and images

Post 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.
jwtoler
Posts: 4
Joined: Mon Dec 11, 2017 4:24 pm

Re: Using network storage for events and images

Post 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?
bbunge
Posts: 2930
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Using network storage for events and images

Post 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).
jwtoler
Posts: 4
Joined: Mon Dec 11, 2017 4:24 pm

Re: Using network storage for events and images

Post by jwtoler »

Use FreeNAS to handle all the storage for various systems.
User avatar
iconnor
Posts: 2881
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Using network storage for events and images

Post 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.
jwtoler
Posts: 4
Joined: Mon Dec 11, 2017 4:24 pm

Re: Using network storage for events and images

Post 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?
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Using network storage for events and images

Post by rockedge »

I think it is this branch on iconner's PPA https://launchpad.net/~iconnor/+archive ... orageareas
Locked