(solved)Purge when full not working

Forum for questions and support relating to the 1.30.x releases only.
Locked
velthuizen
Posts: 6
Joined: Mon Jun 23, 2008 1:52 pm

(solved)Purge when full not working

Post by velthuizen »

When the script purged when full is executed the events are gone but the disk space is still the same, seems only database entry are gone but not the images.

Zoneminder is running on Lubuntu 16.04.1
Last edited by velthuizen on Sun Sep 18, 2016 6:21 pm, edited 1 time in total.
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Purge when full not working

Post by knight-of-ni »

Look for OPT_FAST_DELETE under Options then read the help text associated with it.

HINT: You probably want to turn it off.
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: 586
Joined: Mon Mar 25, 2013 12:34 pm

Re: Purge when full not working

Post by mikb »

Or just have patience and the problem will have "fixed itself" by tomorrow.

This is such a smart efficiency feature, but it definitely trips up the impatient/eager/didn't read the manual people :)
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Purge when full not working

Post by knight-of-ni »

I actually have this set to off for all the ZoneMinder rpms in zmrepo.

We have found the problem with slow deletes is the system can fill the hard drive before the time it takes zmaudit to find the orhpans and delete them from the disk. This tends to happen with modern HD cameras running on a system with relatively small storage space.
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/
racelife
Posts: 84
Joined: Mon Mar 22, 2010 11:38 pm

Re: Purge when full not working

Post by racelife »

I think this happened with me. I went to make sure that it purged and it won't bring anything up but a blank white page with "Unable to connect to ZM db.SQLSTATE[HY000] [2002] No such file or directory" across the top. any tips on how I can fix that? Like go in the command line and delete some files and it will work fine again, or do I need to start from scratch?
velthuizen
Posts: 6
Joined: Mon Jun 23, 2008 1:52 pm

Re: (solved)Purge when full not working

Post by velthuizen »

The problem was a slow computer with a small storage it took awhile before the disk was cleared.
rockandroller
Posts: 51
Joined: Tue Dec 22, 2015 12:44 am

Re: (solved)Purge when full not working

Post by rockandroller »

I have an 8-core 3GHz xeon machine, 18GB RAM, drives are SATA RAID configured for 2 TB total. Running Centos7.
Currently monitor 4 cams, 1920x1080 color @ 4FPS. Between all the cameras together, averaging about 24 events an hour.

Do you think the machine is fast enough for default purging? Or should I back it down from 90% to say, 70% ?
Something of a moot point now, since its up to 88% disk use currently

And if I see an * after the filter, that means it's already active? (I'm having some trouble parsing the docs about that...)
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: (solved)Purge when full not working

Post by knight-of-ni »

If you are using the zoneminder rpm from zmrepo, then Options -> OPT_FAST_DELETE should be off already. Verify it is off.
For a 2TB volume, you could get a little more usable storage by increasing the threshold to 95%.

Once the disk reaches the threshold, watch the volume over a period of days to make sure the free space stays approximately 5% free. It will vary slightly over time. If it becomes apparent that the filter is not keeping up, then increase the number of results in the filter so it deletes more events at any given time. We can't tell you what this number should be because it depends entirely on the quantity of cameras you have and how they are configured to record.
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/
rockandroller
Posts: 51
Joined: Tue Dec 22, 2015 12:44 am

Re: (solved)Purge when full not working

Post by rockandroller »

Thanks!! I am using zmrepo, but my OPT_FAST_DELETE was set to on. Perhaps it was set that way before the upgrade, I cannot recall offhand.

I have it un-ticked now, though...
rockandroller
Posts: 51
Joined: Tue Dec 22, 2015 12:44 am

Re: (solved)Purge when full not working

Post by rockandroller »

It's been a couple of weeks now, and the free space is still at 89% percent (purge limit set at 90).
I'm guessing that means it's working as designed :-)
Locked