With the latest version of zoneminder came a 'new' feature where by default events you select to delete are only removed from the database and zmaudit is left to clean up the files. This works well when deleting events using the web interface since it keeps the interface snappy and quick.
However I seem to be running into a problem with it in relation to purge when full.
I will try to explain what I think is happening.
The filter is ran and the used amount of space is above 98% therefore it deletes 5 events.
ZMAudit runs and finds that some files on the hard disk are no longer in the database and sets about removing these files. However it doesnt remove them before the neft filter run...
The filter runs again and notes that diskspace is still over 98% used and deletes 5 more events.
This seems to repeat on my 1.22.3 test box, by the time diskspace is cleared back by 1% the filter has removed about 20% of the files on the box.
By the time zmaudit finishes removing all the files my box is only about 85% used. Which basically boils down to a week of footage being removed when it neednt have been.
Any ideas?
Purge when full a bit aggressive?
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
98% is running things a bit tight!
The normal way the PWF filter operates is that as disk usage just nips above the threshold a handful of events are deleted, which is enough to take things back under so it is a continuous process. If you start the filter when you are way over your threshold then yes probably more events than expected will be deleted because of the lag in the file deletions. However you can turn off fast deletes in which case everything is just deleted at the time and not deferred so you would not hit that issue.
The normal way the PWF filter operates is that as disk usage just nips above the threshold a handful of events are deleted, which is enough to take things back under so it is a continuous process. If you start the filter when you are way over your threshold then yes probably more events than expected will be deleted because of the lag in the file deletions. However you can turn off fast deletes in which case everything is just deleted at the time and not deferred so you would not hit that issue.
Phil
It is behaving as designed. However, as you've ascertained, the effect of a non-immediate deletion at the filesystem level can result in further deletion requests that may otherwise not be required.
Have you adjusted the timings as suggested? You will likely find the audit interval is geater than the filter execution interval.
Mathew
Have you adjusted the timings as suggested? You will likely find the audit interval is geater than the filter execution interval.
Mathew
OK ive edited them, lets see what happens tonight when it goes over 98% I set audit every 600 seconds and filters to run every 900 seconds and it removed over 40% of the recorded files :-O What are the recommended settings?
If its relevant im using deep storage. Secondly its removed all the images from 2 channels and none from the other ones :-S
If its relevant im using deep storage. Secondly its removed all the images from 2 channels and none from the other ones :-S
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact: