Moving Events To New Storage Kills The Event

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
thefuzz4
Posts: 28
Joined: Sat Mar 01, 2014 5:43 am

Moving Events To New Storage Kills The Event

Post by thefuzz4 »

So I have 1TB NFS mount that my 2 ZM servers use to store their events into. I then setup a GDrive mount that I'm using mergerfs to setup so that I can have things written to the local disk then I have a cron at night that moves the files off to the cloud. The mergerfs just makes this bit seamless to anything that is currently accessing the files.

The problem I'm having right now is this. I setup a filter that will move anything that I mark as archived. So right now the cloud bit isn't even a thought this is all taking place locally. So I have my 2 storage areas setup:
/srv/zoneminder/events (NFS)
/srv/longterm (this is the mergerfs)

So I go into ZM and mark an event as archived. Then I have a filter that moves all archived events from the current storage area to the new one.

Once the filter runs and moves these events to the /srv/longterm storage location and I can confirm that they are moved there because they show up with their events. I can no longer view the event in zm. I don't see anything logged in the logs about it, other than some entries talking about the file was already moved by someone else. The event then shows up in ZM with a 0B disk size and then my filter that removes those events runs and deletes it forever from the system. I'm trying to understand why when the event is moved it fails. I have everything mounted and running under apache so I know its not a permissions issue.

My 2 systems are both CentOS 7 VMs with identical configurations.

Thank you all for your assistance with this in advance.
thefuzz4
Posts: 28
Joined: Sat Mar 01, 2014 5:43 am

Re: Moving Events To New Storage Kills The Event

Post by thefuzz4 »

So I think my filter to delete events that have 0 disk usage was being a little over zealous. Added a few more conditions to this filter and I think things might be sorted out now.
thefuzz4
Posts: 28
Joined: Sat Mar 01, 2014 5:43 am

Re: Moving Events To New Storage Kills The Event

Post by thefuzz4 »

I've now had this running for over 24 hours and all is well.

So for those that are curious this is my setup.

I have rclone running with a gdrive mount that is encrypted
I then have a few folders created.
1. /srv/longterm
2. /srv/longterm_local
3. /mnt/gdrive

So I mount the gdrvie up under /mnt/gdrive
Then I use mergerfs to merger /srv/longterm_local and /mnt/gdrive into /srv/longterm
The mergerfs uses the longterm_local for all local stuff until midnight rolls around and my script to use the rclone move kicks in and moves everything from the local storage to the cloud. Because of the mergerfs its all seamless to zoneminder it doesn't know that things moved.

I have a filter that tags everything as archived and then moves it to its new storage location.
I figure I'll let them live there for a year and then I have a filter that will purge them once they reach a year.
Post Reply