PurgeWhenFull no longer works for my events disk

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
uuhi
Posts: 16
Joined: Fri Nov 25, 2016 8:22 am

PurgeWhenFull no longer works for my events disk

Post by uuhi »

Hi!
After upgrading to v1.36.31 I noticed that filter PurgeWhenFull no longer works for my 6 Tb disk that is dedicated to ZM events.The disk is mounted as a "/media/zm_events" and is owned by www-data and has appropriate rights.

Actually, what happens is that the "/media/zm_events" disk fills up to 100% and then then ZM starts to fill default storage "/var/cache/zoneminder/events". As that disk reaches 95%, PurgeWhenFull removes older events so that the default storage does not get full. So, filter works ok for default strorage but not for the "/media/zm_events" disk.

I tested the PurgeWhenFull filter's "list maches" and filter finds matches in the "/media/zm_events" but for some reason does not delete them. Also filter is running:

Code: Select all

'zmfilter.pl --filter_id=1 --daemon' running since 22/11/16 07:31:52, pid = 82690, valid
'zmfilter.pl --filter_id=2 --daemon' running since 22/11/16 00:00:23, pid = 59101, valid
The system have been working great until now. Is there something broken or am I missing something?

Edit: zmfilter_1.log

Code: Select all

16.11.2022 00:00:24.645006 zmfilter_1[59113].INF [main:182] [Scanning for events using filter id '1']
16.11.2022 07:31:50.767234 zmfilter_1[59113].INF [main:113] [Received TERM, exiting]
16.11.2022 07:31:53.122893 zmfilter_1[82690].INF [main:182] [Scanning for events using filter id '1']
11/16/22 09:11:25.800145 zmfilter_1[97803].INF [main:182] [Scanning for events using filter id '1']
11/16/22 09:20:39.951021 zmfilter_1[97911].INF [main:182] [Scanning for events using filter id '1']
dougmccrary
Posts: 1314
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: PurgeWhenFull no longer works for my events disk

Post by dougmccrary »

I'm on proposed 1.36.32, and it seems ok. Didn't notice any prob on .31, but that doesn't mean it was working... :|
Maybe post screenshot of your options-storage page and your filter. And or see if it's broke on .32
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: PurgeWhenFull no longer works for my events disk

Post by Magic919 »

Have you pointed the filter to the 6TB storage? Look at Storage Area if not.
-
uuhi
Posts: 16
Joined: Fri Nov 25, 2016 8:22 am

Re: PurgeWhenFull no longer works for my events disk

Post by uuhi »

Thanks for pointing me to the right direction. For some reason in filters "Disk percent" "Greater or equal" to "95'' just did not work. I made a copy of provided filter "PurgeWhenFull" named it differently and augmented it with "and" "Storage Area" "Equal" "6TB_disk". Most importantly I changed the "Disk percent" to the "Event Disk Space". That made the difference!

In the zmfilter log I can see that it is deleting some of the oldest events. I guess it is working now although I have no clue why this chance over all has happened.
uuhi
Posts: 16
Joined: Fri Nov 25, 2016 8:22 am

Re: PurgeWhenFull no longer works for my events disk

Post by uuhi »

Still a problem. As it does not work to use "Disk percent" in the filter I use "Event disk space" instead. Now I'm in doubt what to put in the next field. Now I have left it to 95 which obviously is not correct as filter keeps removing even disk is 84%. Should it be Mbytes, Gbytes, bytes or what. I did not find any info about that. Any clue?
Attachments
suodatin.png
suodatin.png (47.42 KiB) Viewed 1133 times
User avatar
iconnor
Posts: 3126
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: PurgeWhenFull no longer works for my events disk

Post by iconnor »

Event DIsk Space matches the space taken up by individual events. Put it back to just Disk Space
uuhi
Posts: 16
Joined: Fri Nov 25, 2016 8:22 am

Re: PurgeWhenFull no longer works for my events disk

Post by uuhi »

Thank you for your attention. I changed filter back to Disk Percent. Mysteriously it seems to be working now. If I test the filter by clicking "List Matches" I get no results. However, in the zmfilter_7.log I can see it actually deletes events.

Remains a mystery why filter "PurgeWhenFull" actually stopped doing its job for my event disk as I haven't done any changes to the system excluding updates. This Zm box has been running flawlessly more than a year at least...
Post Reply