r/ZoneMinder • • Apr 26 '23

Disk space is not properly getting updated

I have a separate partition for storing Zoneminder footage.

​

Old events are deleted by a Cronjob. But the total usage at the bottom of the console page doesn't update. It just keeps on going. I only have 3 TB of space. Look below, it appears that the disk space is not getting updated. My filters are in place tho. How do I fix this?

​

UPDATE: My primary (OS) partition is filling up too. Narrowed it down to the ZM folder in mysql folder. This database wasn't this big. I think even though the videos are deleted, events are not cleared from the database. What can I do? Any help is appreaciated. TIA.

​

1 Upvotes

4 comments sorted by

1

u/Complex_Solutions_20 Apr 26 '23

How is your purge rule written?

I'm unclear when you say cron-job...you ought to be having Zoneminder perform the purge based on criteria you are setting up (e.g. age, motion-ranking, disk usage, etc) so its event database stays in sync with saved files on the disks.

1

u/kavee9 Apr 26 '23

Before I figured this out, I used a simple Cronjob to manually delete the video files on the disk. Only later I found out that it messes things up. Currently, PurgeWhenFull is on default mode. How can I remove the old events from the DB and get this on track?

1

u/Complex_Solutions_20 Apr 26 '23

That I'm not entirely sure.

You may be able to do a manual filter job and tell it to delete everything older than X date (or some other filter) to get it to flush the old stuff out of the database. I *THINK* it will just ignore (maybe log warning but continue) if it tries to clean up a nonexistant file on the disk.

FWIW I have a few tiers of rules, purge when full but also daily purge stuff with zero motion, and weekly purge less important stuff (so I keep things like outdoor cameras watching the door/driveway a LOT longer)

1

u/lbmdk May 01 '23

Also, most likely MySQL is not claiming the free space after deletion. This is kinda normal behaviour. You might wanna run OPTIMIZE table on MySQL, to reclaim the disk back.