After A Few Weeks It(The Latest ZMLARCH) Crashed
After A Few Weeks It(The Latest ZMLARCH) Crashed
The system was having problems logging. I thought is was because there were to many people connected to the console, but I rebooted it and checked and saw no outbound connection but I still couldn't log in. Then rebooted it again and the system said the HDD was full and couldn't start the hardware abstraction layer. Now I could have swore that purge when full was enabled, but it just won't start now. For the moment I am trying a live bootable disk to erase some events.
If this is all the info you are going to provide, what do you want me to do? Guess?Any answers?
You delete data on the disk and it is still full? I have no idea, I didn't think that was possible.I went in and started erasing previous events manually and the disk is still full.
Is the PurgeWhenFull filter actually deleting events?
Is the disk filling with saved events or something else?
How do you have your partitions set up, and which one is full?
-
- Posts: 381
- Joined: Sat Jan 17, 2009 7:49 pm
- Location: Germany
I'm seeing the same thing on a fresh install of SVN 1.24. I thought for sure by default this purge when full filter runs by default. Maybe I misunderstood. I have a KVM machine going with 10 gigs of space and ran 10 IP cam's on Record and watched it hit 100%. It just set there and I waited. I got alittle impatient so I went into the purge filter and hit save and selected the run in background tab and then hit save again. After a couple seconds the browser stopped responding. The machine was still on so I went to the desktop and did df -h. I could see there was 0% left for storage on SDA 1. I tried to restart Zoneminder and eventually got it to start.
Went back to the web interface and the login screen had errors below it indicating the device was full. I went into the events folder and did rm -r Monitor-1 to free up some space. As soon as I did that the web interface was fine. It's sitting back at 95% so I guess I'll see what happens this time since I clicked on the run in background option. I would think this should be the default from the get go but we'll see what happens this time.
edit: I now notice in [] off to the right side of the purge filter the words background. I don't recall seeing that from the get go so it must not be setup like that by default. We'll see what happens this time now that it's saying that.
Went back to the web interface and the login screen had errors below it indicating the device was full. I went into the events folder and did rm -r Monitor-1 to free up some space. As soon as I did that the web interface was fine. It's sitting back at 95% so I guess I'll see what happens this time since I clicked on the run in background option. I would think this should be the default from the get go but we'll see what happens this time.
edit: I now notice in [] off to the right side of the purge filter the words background. I don't recall seeing that from the get go so it must not be setup like that by default. We'll see what happens this time now that it's saying that.
-
- Posts: 381
- Joined: Sat Jan 17, 2009 7:49 pm
- Location: Germany
It doesn't look like the default purge when full is working at all. It's now set for background and my system started back at 90% and went all the way to 100%. I verified there is no space left yet zoneminder continues to run, although i'm sure if I tried to restart it it would fail. I went into the filter and hit execute on the purge when full, still nothing. Very strange, other then this bug everything else is working perfect. I'll figure it out eventually unless you guys come up with something.
I've found a fix and added it to my DVD install section. I'm sure the same can be done with ZMlarch. I now have 10 IP camera's online recording. As soon as disk usage gets to 95% the filter kicks in and starts removing the oldest 5 events. It continues to do so in increments of 5 until it drops below 95%.
I've found a fix and added it to my DVD install section. I'm sure the same can be done with ZMlarch. I now have 10 IP camera's online recording. As soon as disk usage gets to 95% the filter kicks in and starts removing the oldest 5 events. It continues to do so in increments of 5 until it drops below 95%.
Last edited by newvisionantenna on Sat Apr 18, 2009 8:19 pm, edited 1 time in total.
-
- Posts: 381
- Joined: Sat Jan 17, 2009 7:49 pm
- Location: Germany
It's not really a patch. I set there for hours today letting my machine fill up and found the exact issue you were having. This was on my DVD and not Zmlarch. I thought, this is strange. The default purge filter does not appear it's active and possible setup wrong by default. This was leading to the machine filling up and basically killing Zoneminder.
I found that the following does exactly what it says and seems like it's what the default filter should be doing but is failing to do. Right at 95% the filter kicked in and started doing it's job. I checked the logs and it was working perfect. I would only assume that this same setup will work just fine on ZMlarch. I posted it in my DVD section for people that might be having the same problem.
If you want to make sure your purge when full filter is going to work, adjust it as follows.
-- ZM DISK SPACE - AUTOMATIC PURGE WHEN FULL --
login to http://(your host name) as an admin user
click "Filters"
for "Use Filter:" select "PurgeWhenFull"
set options to include
"Archive Status" "Unarchived Only"
"and" "Disk Percent" "greater than or equal to" "95"
"Sort by" "Id" "Asc" "Limit to first" "5" "results only"
then click "Save" up at the top ("Submit" will not save your options)
on the next screen, place a check next to "Automatically delete all matches", then click "Save"
this will now be set to delete the first 5 events (the oldest 5 events) in the ZM database when disk usage reaches 95%
the filter will keep deleting events in increments of 5 events until disk usage is under 95%
I found that the following does exactly what it says and seems like it's what the default filter should be doing but is failing to do. Right at 95% the filter kicked in and started doing it's job. I checked the logs and it was working perfect. I would only assume that this same setup will work just fine on ZMlarch. I posted it in my DVD section for people that might be having the same problem.
If you want to make sure your purge when full filter is going to work, adjust it as follows.
-- ZM DISK SPACE - AUTOMATIC PURGE WHEN FULL --
login to http://(your host name) as an admin user
click "Filters"
for "Use Filter:" select "PurgeWhenFull"
set options to include
"Archive Status" "Unarchived Only"
"and" "Disk Percent" "greater than or equal to" "95"
"Sort by" "Id" "Asc" "Limit to first" "5" "results only"
then click "Save" up at the top ("Submit" will not save your options)
on the next screen, place a check next to "Automatically delete all matches", then click "Save"
this will now be set to delete the first 5 events (the oldest 5 events) in the ZM database when disk usage reaches 95%
the filter will keep deleting events in increments of 5 events until disk usage is under 95%
I know I done exactly what you said step by step. Although it couldn't kill me to try it again before moving on to other software. I would like it to just work, ZMLARCH is an amazingly well done system, thanks for all the work put into that distro. After I'am 100% with this job I'd like to donate more time and some of my own money to keep this project going for others. The possibilities with this and other FOSS are endless. I would try newvisionatennas version agin, but if I have to reinstall the whole system I might as well use NUUO's software.
treesloth, try setting the PurgeWhenFull to a lower %.
The system may be maxing out at about the same time as the filter is trying to kick in. On many filesystems linux will not allow the last 5% to be used.
This is actually a good thing since if the filesystem has a little breathing room there is less file fragmentation.
I'm guessing that you have no separate partition for /var. It's always a good idea to have /var and thus zoneminder events on a different partition from /. That way zm cannot fill up / and bring the system down. This is only a guess since you didn't provide this info.
It would still be very helpful if you would tell us if the logs indicate whether the filter is working. One click in the zoneminder menu will give you a realtime view of the system logs.
The system may be maxing out at about the same time as the filter is trying to kick in. On many filesystems linux will not allow the last 5% to be used.
This is actually a good thing since if the filesystem has a little breathing room there is less file fragmentation.
I'm guessing that you have no separate partition for /var. It's always a good idea to have /var and thus zoneminder events on a different partition from /. That way zm cannot fill up / and bring the system down. This is only a guess since you didn't provide this info.
It would still be very helpful if you would tell us if the logs indicate whether the filter is working. One click in the zoneminder menu will give you a realtime view of the system logs.
/usr/lib/zm/bin/zmdbbackupIs there a way to back up the setting(or current config) for ZM?
Run as root, or sudo
Backup is saved as /var/lib/zm/zm_backup.sql
You can run this manually, but it is also done automatically at weekly intervals by logrotate.
/usr/lib/zm/bin/zmdbrestore will restore from /var/lib/zm/zm_backup.sql so if you reinstall put the saved backup there.
zmdbrestore will also search your events path for saved events and reload them into the database.
If you symlinked a partiton for events storage this may confuse the PurgeWhenFull filter.I know I had difficulties setting up symlinks.
I use ~3GB partition for / add a small swap partition and then use the biggest part of my storage for /var. I also set my PurgeWhenFull to about 80% because of the less file fragmentaion over time. I think I will change to this % on future ZMLarch releases just to be safe. But the filter is active by default on ZMLarch, not on a default source install though.