<Solved> PurgeWhenFull won´t purge or purge too much on Storagearea

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
DerGraf
Posts: 35
Joined: Fri Aug 17, 2018 7:33 pm

<Solved> PurgeWhenFull won´t purge or purge too much on Storagearea

Post by DerGraf »

Hello,

i´m using storageareas in ZM 1.32.3 for my records. Name is "NewStorage" and Path is "/data/zm". All works fine but now "NewStorage" is 100% full and the filter "PurgeWhenFull" won´t work. On manual running it give 0 results. I think ZM only check the default storage /var/cache/zoneminder.

On the other side when the default storage has reach the mark of 90% (mostly by database blowup) ZM delete all records on "NewStorage" because it can´t reduce the disk space of the default storage.

What can i do?

Thanks for help.
Last edited by DerGraf on Thu Jun 06, 2019 8:08 pm, edited 1 time in total.
DerGraf
Posts: 35
Joined: Fri Aug 17, 2018 7:33 pm

<Solved> PurgeWhenFull won´t purge or purge too much on Storagearea

Post by DerGraf »

Okay, i solve it.

I have delete the default storage in Option/Storage.
After that i have create a conf file "/etc/zm/conf.d/user.conf" and add "ZM_DIR_EVENTS=/data/zm" to it.

Not elegant but now PurgeWhenFull works for my "NewStorage". Hope the developers bring a fix.
User avatar
snake
Posts: 337
Joined: Sat May 21, 2016 2:20 am

Re: <Solved> PurgeWhenFull won´t purge or purge too much on Storagearea

Post by snake »

In 1.32+ I believe you have to add to the existing purge when full filter

Code: Select all

AND "storage area" equal to <storage area name>
This is probably only when you are using a storage area different from the default.
DerGraf
Posts: 35
Joined: Fri Aug 17, 2018 7:33 pm

Re: <Solved> PurgeWhenFull won´t purge or purge too much on Storagearea

Post by DerGraf »

snake wrote: Thu Jun 06, 2019 8:19 pm In 1.32+ I believe you have to add to the existing purge when full filter
Nope, that doesn´t work. I had try this.
I think it´s only an extra rule to specify which storage area to be used on server with more storage areas.
User avatar
snake
Posts: 337
Joined: Sat May 21, 2016 2:20 am

Re: <Solved> PurgeWhenFull won´t purge or purge too much on Storagearea

Post by snake »

What I said works on my machine, I'm using Ubuntu 19.04. See http://forums.zoneminder.com/viewtopic. ... 0&p=110035

Which distribution? What instructions did you use to install ZM? It sounds like you have something else going on.

The default purge when full function is unconventional due to the new ability to have multiple storage areas. From what I've read, it will by default sum up all the storage areas, and delete from all of them if they reach the percentage. But I often will start by making a second dedicated storage area for all cameras so what happens is the new storage area reaches 100% but the original doesn't. As a result, the total purge percentage may not reach the 95 or whatever percentage you set. What reportedly works is what is in the linked post above.
DerGraf
Posts: 35
Joined: Fri Aug 17, 2018 7:33 pm

Re: <Solved> PurgeWhenFull won´t purge or purge too much on Storagearea

Post by DerGraf »

I´m using Ubuntu 18.04 and the quick ´n dirty install over ppa.

The PurgeWhenFull Filter has a simple AND linkage. More AND = more specific. If you delete the disk percent AND linkage it kills all exept archived. So i can´t understand that an extra AND will work in your posted link.

I solved it by reading and using Step 4 on this page:
https://zoneminder.readthedocs.io/en/la ... ddrive.htm

Now i see only the used Storage purge works as it should.
Firefox_Screenshot_2019-06-09T08-34-10.867Z.png
Firefox_Screenshot_2019-06-09T08-34-10.867Z.png (18.07 KiB) Viewed 15200 times
User avatar
iconnor
Posts: 2880
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: <Solved> PurgeWhenFull won´t purge or purge too much on Storagearea

Post by iconnor »

For clarity, until I figure out how to make it smarter:

If you don't specify a storage area, it has no information which area you care about. So it actually does a df on wherever the script is running from, which is normally /var/cache/zoneminder/events which is the age old default (under debian, redhat is different).

If you specify a storage area, then it looks there. It literally does a df path_to_storage_area.

Unfortunately the code needs to change a lot to enable just hitting all the storage areas. I keep taking a look at it and going down the rabbit hole and giving up. It might make it into 1.34 and it might not.

For now, just make a Purge WHen Full filter for each storage area.
dougmccrary
Posts: 1172
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: <Solved> PurgeWhenFull won´t purge or purge too much on Storagearea

Post by dougmccrary »

I had to add Default to it. seems it oughtta check the system disk. My /var/cache/zoneminder is a mount bind.
I'm running the recent zm 1.33.14 on ubuntu 18.04
Post Reply