Deleting events not freeing space

Support and queries relating to all previous versions of ZoneMinder
Locked
wilso027
Posts: 90
Joined: Wed Feb 21, 2007 10:38 pm

Deleting events not freeing space

Post by wilso027 »

I have a filter turned on to start deleting events from oldest to newest when the disk gets over 90% full. When I checked it this morning zm was down and the hard drive is full. I stopped the zm service and tried to search for events by dates and checked the box to delete the events it finds but it does not delete them.

I then search by date and check the box to delete the events and I have successfully deleted all the events for the first recorded day. When I go and check to make sure the images directory got deleted I found that they had not. Deleting the events does not free up space.

Am I doing something wrong or am I missing something. Thanks

Allan
wilso027
Posts: 90
Joined: Wed Feb 21, 2007 10:38 pm

Post by wilso027 »

I was deleting events with the service stopped since the hard drive was full and I didn't want it to fill it up as fast as I deleted it. Now that I have started the zm service back up it is starting to clear space on the hard drive. Can someone explain a little more about how this process works. Thanks

Allan
KegRaider
Posts: 25
Joined: Mon Sep 05, 2005 5:06 am
Location: Townsville/Queensland/Australia

Post by KegRaider »

I have a pretty old PC handling my ZoneMinder system. I found that if i set the Purge when full option too high (>= 93%) it would sometimes not purge the data out of the drive in time. What would then happen is, my PC would run out of HDD space and consequently blow a valve. :P

So, I would guess, that the Purge function is not instantaneous, but rather run when it gets a chance. I'm sure that when you delete events that it sends the request to another process to do the actual deletion.

I have set my Purge to 87% and have not seen a problem in about 12 months of stable operation.
wilso027
Posts: 90
Joined: Wed Feb 21, 2007 10:38 pm

Post by wilso027 »

Thanks, I noticed that to that was why I had it set to 90%. I should have read better through the forums but it looks like there is a new patch out there to fix this problem or at least one close to it.

http://www.zoneminder.com/forums/viewtopic.php?p=31779

Just in case anyone needs any extra notes about how to apply the patch this is what I did on my Ubuntu Edgy system.

cd /var/www/zm
sudo wget http://www.zoneminder.com/downloads/zm- ... lter.patch
sudo patch -p0 < zm-1.22.3-filter.patch
sudo chown www-data:www-data zm_actions.php
sudo chmod 644 zm_actions.php

Not sure if it will fix the deleting problem which started working before I fixed the problem but should allow me to delete events from the filter view.

Allan
wilso027
Posts: 90
Joined: Wed Feb 21, 2007 10:38 pm

Post by wilso027 »

I can delete the events no problem now but I don't see the space free on my hard drive. How do you know if when you delete events if it deletes the images?

Allan
kevin_robson
Posts: 247
Joined: Sun Jan 16, 2005 11:26 am

Post by kevin_robson »

Under SYSTEM in options there is a ZM_OPT_FAST_DELETE option, which might help. I may be wrong but does this not remove event files there and then rather than waiting for the restart?
wilso027
Posts: 90
Joined: Wed Feb 21, 2007 10:38 pm

Post by wilso027 »

Thanks for pointing out the fast delete. It is like my filter is never run although I did a ps aux and zmfilter.pl -c is running. To delete events I have to run the purge filter and choose execute. I do this for a few days worth of events then I have to run zmaudit.pl and it goes through and frees up the space.

Any ideas why this wouldn't be working? Thanks

Allan
wilso027
Posts: 90
Joined: Wed Feb 21, 2007 10:38 pm

Post by wilso027 »

I deleted all other filters I had created just leaving the purge filter and rebooted the system and it seems to be back working. I'll give it a little time and see how it does.
Locked