Page 1 of 1

PurgeWhenFull not working

Posted: Fri Mar 29, 2019 3:04 am
by Andyrh
After a clean Ubuntu 18.04 install and ZM 1.32.3 install I have filled my data disk. The Purge when full filter returns no results.
I have 2 HDs, 1 OS and programs and 1 Video only. The console page show 3TB (video drive) at 99% and Default at 9%. Testing tends to indicate that those numbers are put together for the purge filter. If I set the filter to 10% it returns results.
Default is not defined and I do not know how to remove it.

Where should I look to either make the Purge work per storage area or to remove Default?

Thank you
ZM2.JPG
ZM2.JPG (52.75 KiB) Viewed 9856 times
Edit:
PurgeWhenFull only returns results when set to 9. It then returns all. There must be a setting somewhere that I missed on the setup.
Capture.JPG
Capture.JPG (62.53 KiB) Viewed 9841 times

Re: PurgeWhenFull not working

Posted: Fri Mar 29, 2019 9:40 pm
by bbunge
Try 85%

Re: PurgeWhenFull not working

Posted: Fri Mar 29, 2019 10:18 pm
by Andyrh
It returns 0 until I Set it to 9 then it returns all.

Re: PurgeWhenFull not working

Posted: Sat Mar 30, 2019 1:06 am
by bbunge
In the past when the disk got too full the system would hang. I had to manually delete a bunch of events to get it working again. I've also found that 95% to start the purge is too much. 85% for a single drive system gives a bit of a cushion to let the system work.

Re: PurgeWhenFull not working

Posted: Sat Mar 30, 2019 1:33 am
by Andyrh
I wish it was a simple performance problem. The system has an OS drive and a video only drive. My previous install worked well with previous ZM version at 97%. This one does not return any events to delete until I set the percent to 9. For now I am running a purge by date which is just to get by until the fix is found.
I should have mentioned there are only 2 cameras.

Thank you

Re: PurgeWhenFull not working

Posted: Sat Mar 30, 2019 7:38 pm
by Andyrh
Further information:
Using the "Disk Blocks" filter "Greater than or equal" I have confirmed that it is retrieving only the usage of "/" not of "/zmvideo" When I use the Used block number the filter returns events. If I change the number to less blocks it returns no events.

What did I set wrong?
Is there any other information I need to share?

Re: PurgeWhenFull not working

Posted: Sun Mar 31, 2019 3:05 pm
by kitkat
Andyrh wrote: Sat Mar 30, 2019 7:38 pm I have confirmed that it is retrieving only the usage of "/" not of "/zmvideo"

What did I set wrong?
Permissions?

Try

Code: Select all

chmod 755 /zmvideo

Re: PurgeWhenFull not working

Posted: Sun Mar 31, 2019 4:15 pm
by Andyrh
Excellent suggestion, but unfortunately not the answer.

Thank you,

Screenshot with the typo.

Re: PurgeWhenFull not working

Posted: Tue Apr 02, 2019 10:05 am
by kitkat
Shame - But it was probably worth a try.

I wouldn't expect to see the permissions of the files and folders under /zoneminder change after the chmod though, just the directory itself, but maybe chmod-ing the entire tree would work?

I, too, use a separate drive for ZM, but I didn't do it according to any of the HowTos or by altering storage paths within ZM - I mounted the drive elsewhere and then used 'mount --bind' to make it appear as ZM's default storage, something like this...

Code: Select all

mount --bind /zmvideo /var/lib/zoneminder
If you want to retain access to any existing files in /var/lib/zoneminder then you'll need to copy them to the mounted drive first.

Re: PurgeWhenFull not working

Posted: Tue Apr 02, 2019 3:27 pm
by Andyrh
My previous install had the 2nd drive mounted strategically in the tree also.
I wanted to use the storage option to be able to place different cameras on different drives.

With no apparent solution and no ability to Purge specific locations I will be moving the mount point and resetting some defaults.

Perhaps a future enhancement will add location to the purge when full filter.

Thank you,

Re: PurgeWhenFull not working

Posted: Fri Apr 19, 2019 12:30 am
by Andyrh
I solved the problem. The PurgeWhenFull default rule does not account for Storage Areas. I added a condition and it now returns what it should.

:D
ZM6.JPG
ZM6.JPG (77.65 KiB) Viewed 9444 times

Re: PurgeWhenFull not working

Posted: Wed May 01, 2019 8:37 pm
by mr.goose
Thank you @Andyrh - that was a very useful post and has fixed my problem too. I have been agonising over this for almost a week! :-)

Re: PurgeWhenFull not working

Posted: Wed Nov 06, 2019 3:05 pm
by Kennethhuber1
term papers wrote:

Shame - But it was probably worth a try.

I wouldn't expect to see the permissions of the files and folders under /zoneminder change after the chmod though, just the directory itself, but maybe chmod-ing the entire tree would work?
I, too, use a separate drive for ZM, but I didn't do it according to any of the HowTos or by altering storage paths within ZM - I mounted the drive elsewhere and then used 'mount --bind' to make it appear as ZM's default storage, something like this...

Code: Select all

mount --bind /zmvideo /var/lib/zoneminder
If you want to retain access to any existing files in /var/lib/zoneminder then you'll need to copy them to the mounted drive first.
By mounting the drive as you suggested I managed to solve my issue. Thanks!