[SOLVED] Storage on a nfs share

Forum for questions and support relating to the 1.30.x releases only.
Locked
bigsub
Posts: 13
Joined: Thu Sep 14, 2017 11:51 am

[SOLVED] Storage on a nfs share

Post by bigsub »

Hi to all,
I'm searching for best practies for store zoneminder's data on a nfs share that resides on my nas server. I found an article in wiki that talks about the dedicated use of a separate disk.
Is it the same thing using a nfs share mounted with autofs? What about zmaudit in case my zm runs without the share's availability?
My zm server now is on a mini-itx case without 3,5" hard drive slots and with only 2 sata port on MOBO, one of this, for the operating system's ssd disk.

Furthermore I've a nas in my network with nfs on a 3TB raid disks (dedicated for cctv).
What is the best solution?

https://wiki.zoneminder.com/Using_a_ded ... Hard_Drive
Last edited by bigsub on Tue Oct 10, 2017 8:25 pm, edited 1 time in total.
bbunge
Posts: 2931
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Storage on a nfs share

Post by bbunge »

For Ubuntu or Debian use systemd. See the WIKI Ubuntu area for a how to. Will also need to have Linux file system o NAS.

https://wiki.zoneminder.com/Common_Issu ... ive_or_NAS

This can also be done on Centos and Red Hat distros. Can look up the how to if needed...
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Storage on a nfs share

Post by knight-of-ni »

That has always been the risk with using a remote volume... if for any reason the ZoneMinder service is started w/o the remote volume mounted, zmaudit will delete the records from your database, because it will think they are orphaned records. ZoneMinder has no way to know the difference between a situation where events were intentionally deleted from the disk versus a condition where events were accidentally removed (or just not available).

Fortunately for modern Linux distros, systemd has functionality built-in to prevent you from losing all your events if you remote volume does not mount.

I've documented the details here:
http://zoneminder.blogspot.com/p/blog-page.html

Also note that the remote filesystem has to be some kind of unix style filesystem. It cannot be a Microsoft filesystem.

UPDATE: Bill ninja'd me
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/
mikb
Posts: 595
Joined: Mon Mar 25, 2013 12:34 pm

Re: Storage on a nfs share

Post by mikb »

"some kind of unix style filesystem" ... which means more than just saying "it's an NFS share, it's automatically Unix" :)

You can NFS share out a DOS/FAT file system, but ZoneMinder won't like it at all (FAT doesn't support permissions properly, it doesn't support symbolic links)

You can CIFS/Samba share out a competent ext2/ext3/reiser/otherunixy file system, and that probably doesn't work either (this time the share protocol is the weak link).

Proper Unix filesystem, AND shared by NFS, should work ...
bigsub
Posts: 13
Joined: Thu Sep 14, 2017 11:51 am

Re: Storage on a nfs share

Post by bigsub »

The nas really is an ubuntu server with some disks in raid. The shares are exported with nfs.
I'll read your suggestions.
bbunge
Posts: 2931
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Storage on a nfs share

Post by bbunge »

bigsub wrote: Fri Oct 06, 2017 7:07 pm The nas really is an ubuntu server with some disks in raid. The shares are exported with nfs.
I'll read your suggestions.
Then you are all set and you do not have to export the share. The systemd method is the safest way to go!

bb
bigsub
Posts: 13
Joined: Thu Sep 14, 2017 11:51 am

Re: Storage on a nfs share

Post by bigsub »

bbunge wrote: Fri Oct 06, 2017 11:56 pm Then you are all set and you do not have to export the share. The systemd method is the safest way to go!
Can I directly mount the raid device on the zm server or the mount point of raid in nas server?
I suppose that I need to mount this in the zm server:

nas_ip_address:/mnt_point_on_nas_server

is it ok?
bbunge
Posts: 2931
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Storage on a nfs share

Post by bbunge »

See the instructions for the systemd mount. You do not need to mount the nas from the zm pc. Systemd will do that when set up correctly.
bigsub
Posts: 13
Joined: Thu Sep 14, 2017 11:51 am

Re: Storage on a nfs share

Post by bigsub »

Thanks guys, I resolved with systemd using. I like it more than autofs.
bbunge
Posts: 2931
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Storage on a nfs share

Post by bbunge »

bigsub wrote: Tue Oct 10, 2017 8:24 pm Thanks guys, I resolved with systemd using. I like it more than autofs.
Ah, another happy customer!
Locked