I have a box sitting with the events directory on a completly separate partition. The PurgeWhenFull option was NOT working for some god awful reason - so I investigated.
Turns out that the code that checks dis percentage doesn't check it on the events folder (as it should - see df in web output), it checks it on the zm server directory.
Quick fix:
The code for checking disk percentage (zmfilter.pl:307):
Doesn't zmfilter always run with the events directory as its current directory? Or perhaps a better question is what are the circumstances that cause zmfilter to run with a directory other than the events directory as its current directory?
zmfilter.pl should be in the events directory when it checks the space on the current disk so it should work as advertised. However making the check explicit would certainly not hurt so I will probably do that as well.
The check needs to be explicit for the following scenario:
Primary hard drive contains OS + ZM files
Secondary hard drive contains just the events dir, in case of HD failure on the events HD, the system doesn't go down, and vice versa. Therefore if zmfilter.pl doesn't check for space on the second hard drive (or partition slice), then the system will not see that drive fill up.
zherebet wrote:Primary hard drive contains OS + ZM files
Secondary hard drive contains just the events dir
That's exactly how my system's set up, and I've not had zmfilter.pl mis-behave on the capacity check. I presume the problems only show themselves if the events file system mis-behaves or vanishes.
I have events directroy under my /var partition and everything is reporting correctly. Although I haven't tried to setup an events partition.
Regards,
Cordel
/var/www/localhost/htdocs/events --> is a symlink to /mnt/data/events
/mnt/data = /dev/sdb1, a raid 10 array running on 3Ware controller
OS (root) is on /dev/sda3
OS (boot) is on /dev/sda1
swap is on /dev/sda2
Older versions of ZM dealt with this just fine. The newer PurgeWhenFull filter does not.
zherebet wrote:Gents,
I have a box sitting with the events directory on a completly separate partition. The PurgeWhenFull option was NOT working for some god awful reason - so I investigated.
Turns out that the code that checks dis percentage doesn't check it on the events folder (as it should - see df in web output), it checks it on the zm server directory.
Quick fix:
The code for checking disk percentage (zmfilter.pl:307):
In addition, I can tell zm that the events dir lives on /mnt/data/events, and still come away with a full disk. Looking into it further now, I'll post what I find.
subliminal_boy_9 wrote:I can duplicate this on my box.
/var/www/localhost/htdocs/events --> is a symlink to /mnt/data/events
/mnt/data = /dev/sdb1, a raid 10 array running on 3Ware controller
OS (root) is on /dev/sda3
OS (boot) is on /dev/sda1
swap is on /dev/sda2
Older versions of ZM dealt with this just fine. The newer PurgeWhenFull filter does not.
zherebet wrote:Gents,
I have a box sitting with the events directory on a completly separate partition. The PurgeWhenFull option was NOT working for some god awful reason - so I investigated.
Turns out that the code that checks dis percentage doesn't check it on the events folder (as it should - see df in web output), it checks it on the zm server directory.
Quick fix:
The code for checking disk percentage (zmfilter.pl:307):
This part hasn't really changed in 1.22.0 and it works fine for here so I'm unsure why it shouldn't work for everyone. The zmfilter scripts cd's to the events directory and then does a 'df .' to get the current device. Unless the events directory is on one partition and the individual camera dires are simlinked elsewhere this should work.