Purge disk when full 50/80/95% ?
Purge disk when full 50/80/95% ?
Hi All,
I am running the zoneminder plugin 1.34.21 on TrueNAS Core 12.0-U2
Save JPEGs = Frames + Analysis images(if available)
and later I change to "Disabled" should I expect the 310,091 jpg files to get deleted or do I have to manually delete those?
I do have autit enabled, I do NOT have fast deletes turned on and I have 3 datasets linked in Zoneminder under /mnt so that I can slice a portion of the disks for video and if need be make the dataset larger or smaller. This means I depend on the filter "Purge when full" to actually run on my datasets as well as the default storage. I am betting that the "Purge when full" only looks at defaults or is not looking for the .jpg files.
List Matches in the GUI for the filter shows nothing, I think it should show the .jpg files
when I run the command I do not need to sudo in my jail as I am root:
root@zm:/mnt # /usr/local/bin/zmaudit.pl --force
02/18/2021 21:18:43.252548 zmaudit[83674].INF [main:199] [Auditing All Storage Areas]
Deleted 0 log table entries by time
root@zm:/mnt # find . | grep ".jpg" | wc -l
310094
root@zm:/mnt #
I do not know if I need the JPEG files or Analysis frames but for sure I need the purge when full to actually work. What should I try?
This seems like I am using cave man commands : find . -name "*.jpg" -type f -delete
Thanks,
Joe
I am running the zoneminder plugin 1.34.21 on TrueNAS Core 12.0-U2
Save JPEGs = Frames + Analysis images(if available)
and later I change to "Disabled" should I expect the 310,091 jpg files to get deleted or do I have to manually delete those?
I do have autit enabled, I do NOT have fast deletes turned on and I have 3 datasets linked in Zoneminder under /mnt so that I can slice a portion of the disks for video and if need be make the dataset larger or smaller. This means I depend on the filter "Purge when full" to actually run on my datasets as well as the default storage. I am betting that the "Purge when full" only looks at defaults or is not looking for the .jpg files.
List Matches in the GUI for the filter shows nothing, I think it should show the .jpg files
when I run the command I do not need to sudo in my jail as I am root:
root@zm:/mnt # /usr/local/bin/zmaudit.pl --force
02/18/2021 21:18:43.252548 zmaudit[83674].INF [main:199] [Auditing All Storage Areas]
Deleted 0 log table entries by time
root@zm:/mnt # find . | grep ".jpg" | wc -l
310094
root@zm:/mnt #
I do not know if I need the JPEG files or Analysis frames but for sure I need the purge when full to actually work. What should I try?
This seems like I am using cave man commands : find . -name "*.jpg" -type f -delete
Thanks,
Joe
Re: Purge disk when full 50/80/95% ?
find . -name "*.jpg" -type f -delete
took me from 58% of the volume full to 22%
took me from 58% of the volume full to 22%
Re: Purge disk when full 50/80/95% ?
From my experience, the purge when full will delete all of the files for an event when the event gets purged. I was saving it all for a while, when I disabled saving the frames my event count started to rise because the older events were larger than the newer ones.
I have been running ZM for years and have not felt the need to manually delete anything.
I have been running ZM for years and have not felt the need to manually delete anything.
Andy
o||||o
Ubuntu 22.04
ZM 1.36.33
E5-1650-v4 Xeon
16 GB RAM
6 cameras -> 54 FPS modect
o||||o
Ubuntu 22.04
ZM 1.36.33
E5-1650-v4 Xeon
16 GB RAM
6 cameras -> 54 FPS modect
Re: Purge disk when full 50/80/95% ?
Hi Andy,
Well I am trying to NOT use the default location : /var/db/zoneminder/events
Silly me tried to make mount points:
/mnt/door1
/mnt/door2
/mnt/door3
The events do store in the new location and delete when I view an event and pick the "delete" button. I want to use a mount point so I can add and remove space from the mount point for some cameras and have the purge at 95% just do it's thing. Is there a "normal" place where zoneminder really wants me to make these mount points?
should I be making them at :
/var/db/zoneminder/events1
/var/db/zoneminder/events2
/var/db/zoneminder/events3
Thanks,
Joe
Well I am trying to NOT use the default location : /var/db/zoneminder/events
Silly me tried to make mount points:
/mnt/door1
/mnt/door2
/mnt/door3
The events do store in the new location and delete when I view an event and pick the "delete" button. I want to use a mount point so I can add and remove space from the mount point for some cameras and have the purge at 95% just do it's thing. Is there a "normal" place where zoneminder really wants me to make these mount points?
should I be making them at :
/var/db/zoneminder/events1
/var/db/zoneminder/events2
/var/db/zoneminder/events3
Thanks,
Joe
Re: Purge disk when full 50/80/95% ?
My events are stored in /zm/store1 , /zm/store2 and /zm/store3 (I do not like typing long paths)
The store directories are mounted volumes.
I left the default location alone. It is /var/cache/zoneminder/events - this might be considered the normal place.
ZM is designed to allow you to write the events to any reasonable place.
The store directories are mounted volumes.
I left the default location alone. It is /var/cache/zoneminder/events - this might be considered the normal place.
ZM is designed to allow you to write the events to any reasonable place.
Andy
o||||o
Ubuntu 22.04
ZM 1.36.33
E5-1650-v4 Xeon
16 GB RAM
6 cameras -> 54 FPS modect
o||||o
Ubuntu 22.04
ZM 1.36.33
E5-1650-v4 Xeon
16 GB RAM
6 cameras -> 54 FPS modect
Re: Purge disk when full 50/80/95% ?
Andy,
I am going to rebuild this machine/jail as I had some issue with the volume and at boot have zfs metadata errors. I have no errors with a scrub or status -v but if the boot is unhappy I can re-install in a short time. This install was migrated from a laptop single disk and the laptop disk could have had some issues.
So after tonight we will see if the purge disk when full starts to work.
Thanks,
Joe
I am going to rebuild this machine/jail as I had some issue with the volume and at boot have zfs metadata errors. I have no errors with a scrub or status -v but if the boot is unhappy I can re-install in a short time. This install was migrated from a laptop single disk and the laptop disk could have had some issues.
So after tonight we will see if the purge disk when full starts to work.
Thanks,
Joe
Re: Purge disk when full 50/80/95% ?
fastest way to test streams:
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl
If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl
If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
Re: Purge disk when full 50/80/95% ?
Quick answer - No
However, the "mount points" need to be within the OS file system and have read write permission for www-data (Ubuntu/Debian based systems). For other distros the web server, Apache2, user need to have those permissions.
I have several systems set up with an SSD for the OS and a "spinning rust" hard drive for events. When I set up the OS I set the hard drive to mount in /zmevents and then create another directory /zmevents/events and set this up as storage in Zoneminder. When you add a monitor you must remember to set the storage other than default. I also turn the Purge When Full down to 85% or so as I have had infrequent issues with the purge not working right. But that has not happened in a long time. I also have a 30 day purge to get rid of old events.
Interesting concept to set up event directories for individual monitors. Really is not necessary, though as the events will be placed in sub directories under /zmevents/events in my case. Might also be a maintenance headache...
bb
Re: Purge disk when full 50/80/95% ?
my mount points work fine, I can view and remove events with no issues. The issue is that the purge when full is not getting those other locations. I am wondering if the purge when full ONLY looks at /var/db/zoneminder/events
and not at my other mount points /mnt/doorX to see if they are 95% full
and not at my other mount points /mnt/doorX to see if they are 95% full
Re: Purge disk when full 50/80/95% ?
Purge when full filters need 3 conditions. The 3rd one that is not there by default is the storage pool to purge.
Took me a bit of time to figure it out.
Took me a bit of time to figure it out.
Andy
o||||o
Ubuntu 22.04
ZM 1.36.33
E5-1650-v4 Xeon
16 GB RAM
6 cameras -> 54 FPS modect
o||||o
Ubuntu 22.04
ZM 1.36.33
E5-1650-v4 Xeon
16 GB RAM
6 cameras -> 54 FPS modect
Re: Purge disk when full 50/80/95% ?
I see three options:
1) the default filter should be edited to include the storage area, so that it's intuitive for new users.
2) it should search all storage areas mounts by default.
3) if a new storage mount is created, then a new purgewhenfull filter is generated for that mount.
It's somewhat of a trap as it is, right now. I'd go with #3. This way you can retain existing functionality and also allow different quotas for each.
1) the default filter should be edited to include the storage area, so that it's intuitive for new users.
2) it should search all storage areas mounts by default.
3) if a new storage mount is created, then a new purgewhenfull filter is generated for that mount.
It's somewhat of a trap as it is, right now. I'd go with #3. This way you can retain existing functionality and also allow different quotas for each.
fastest way to test streams:
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl
If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl
If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
Re: Purge disk when full 50/80/95% ?
yes. this is what worked for me as I have my storage on a separate (virtual ) hard drive
Re: Purge disk when full 50/80/95% ?
Yes Andy that did it, not very intuitiave and I assume it is documented that purge when full does not work unless you point to a storage location.
-
- Posts: 1322
- Joined: Sat Aug 31, 2019 7:35 am
- Location: San Diego
Re: Purge disk when full 50/80/95% ?
I find that the default filter defaults to "default" storage.
Anywhere else needs:
And yet Update DiskSpace appears to operate everywhere, evidenced by this:
It's certainly true it's not obvious.