Data Drive

Forum for questions and support relating to the 1.30.x releases only.
Locked
skydiver
Posts: 86
Joined: Wed Jun 16, 2004 7:15 pm

Data Drive

Post by skydiver »

I am rebuilding my Zoneminder system in my new VMWARE server. I would like to set the data drive where ZM writes the events to to be a separate virtual drive running on a different storage source than the Ubuntu Server OS

Should I first install ZM per the WIKI https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way then mount the drive in the VM and the configure ZM to point to it or should I mount the drive first then setup ZM to write to it?

Also where is the default directory that ZM writes the event to?
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Data Drive

Post by knight-of-ni »

Install ZoneMinder first, according to the wiki article you referenced, then go here:
https://wiki.zoneminder.com/Using_a_ded ... Hard_Drive

This applies to filesystems mounted across your (virtual) network as well as a traditional hard drive.
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/
johndul0001
Posts: 21
Joined: Mon Jul 25, 2016 4:31 pm

Re: Data Drive

Post by johndul0001 »

I have done this too, always by installing zm first. It does work.
skydiver
Posts: 86
Joined: Wed Jun 16, 2004 7:15 pm

Re: Data Drive

Post by skydiver »

Thanks. I installed as suggested then before starting the ZM service, I changed the mount point of my dedicate data drive to to /var/cache/zoneminder/events and then ran:

Code: Select all

chown -R www-data:www-data /var/cache/zoneminder/events
chown -R www-data:www-data/var/cache/zoneminder/images
chown -R www-data:www-data /var/cache/zoneminder/images
I have one question. Will the cleanup filter to delete the oldest events when the disk reach X% full run based on:
- Aggregate size of /sda AND sdb ?
- SIze of /sda ?
- Size of sdb ?
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Data Drive

Post by knight-of-ni »

First, read the documentation about filters:
https://zoneminder.readthedocs.io/en/st ... vents.html

Then open the filter named purgewhenfull, and verify it does what you want it to do. If it does not, then modify it accordingly. It can delete oldest, newest, none at all, whatever you want it to do.

ZoneMinder zmfiler.pl uses the standard df command on your events folder:
https://github.com/ZoneMinder/ZoneMinde ... er.pm#L408

So naturally, if you redirect your events folder to some other share, mount, etc then ZoneMinder will end up calculating free space on that share, mount, etc.
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/
skydiver
Posts: 86
Joined: Wed Jun 16, 2004 7:15 pm

Re: Data Drive

Post by skydiver »

Thanks for the tip on the df command. Now that I know that is what it uses, that answered my question.
Locked