power outage safe zoneminder
power outage safe zoneminder
Hi,
What is the best way to make zoneminder power outage safe? I know that the customer is going to have power outages and i will go crazy if i have to go there and run fsck or similar everytime.
I thought about two alternatives:
1.
using the live-cd and just recording to hd, this way the risk of corruption would be smaller. But I have had really lots of trouble getting it to work properly.
2.
Making a hd-read only, except events and mysql.
Anyone with similar struggles?
What is the best way to make zoneminder power outage safe? I know that the customer is going to have power outages and i will go crazy if i have to go there and run fsck or similar everytime.
I thought about two alternatives:
1.
using the live-cd and just recording to hd, this way the risk of corruption would be smaller. But I have had really lots of trouble getting it to work properly.
2.
Making a hd-read only, except events and mysql.
Anyone with similar struggles?
-
- Posts: 374
- Joined: Wed Nov 07, 2007 1:59 am
- Location: Huntington Beach, California
- Contact:
With a journaling filesystem like ext3 you should really not have any issues.
edit: If you are really worried about power failures just run a large UPS and have the server shutdown gracefully when it gets to the last few minutes of power. Then the only time any disk checks will need to be done will be once they hit the maximum mount count, which you can inflate to such a ridiculous number that it will never run, but I would not really advise that since it would be a rare occasion for fsck to require input from a check like that on a healthy system. Decent UPS, journaled FS, your good.
edit: If you are really worried about power failures just run a large UPS and have the server shutdown gracefully when it gets to the last few minutes of power. Then the only time any disk checks will need to be done will be once they hit the maximum mount count, which you can inflate to such a ridiculous number that it will never run, but I would not really advise that since it would be a rare occasion for fsck to require input from a check like that on a healthy system. Decent UPS, journaled FS, your good.
-
- Posts: 374
- Joined: Wed Nov 07, 2007 1:59 am
- Location: Huntington Beach, California
- Contact:
Yes, but very rarely. I admin over 100 large Linux boxes and I almost never need to run fsck by hand.henke wrote:I use ext3 but even that needs to run e2fsck to fix things sometimes.
Hmm. Well, frankly, if they cant spend $100 for a UPS then they are just out of luck then Its foolish to run any important system without a UPS especially if you are worried about FS corruption from power failures.henke wrote: ups is out of budget. how do all these embedded things work?
Tnx, have to check up this UPS. My info seems to be from the dinosaur-age when they were at least some 1000 USD.
I thought about fixing the mysql-table thing with adding to nightly cron:
mysqcheck -r --all-databases
Then it would fix it within a day from power up again and it would reduce maintenance-visits.
I thought about fixing the mysql-table thing with adding to nightly cron:
mysqcheck -r --all-databases
Then it would fix it within a day from power up again and it would reduce maintenance-visits.
-
- Posts: 374
- Joined: Wed Nov 07, 2007 1:59 am
- Location: Huntington Beach, California
- Contact:
Nah...these days you can get surprisingly good UPS' for under $100. Even those little APC powerstrip/UPS combos that you can get for close to $50 work pretty well, just make sure you get one that can communicate with Linux so it can tell the system to shutdown. I always go with APC so I can use apcupsd, see here for supported UPS':henke wrote:Tnx, have to check up this UPS. My info seems to be from the dinosaur-age when they were at least some 1000 USD.
http://www.apcupsd.org/manual/Supported ... ables.html
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
I second all the comments about UPSs. I currently use Belkin ones, such as this one, http://catalog.belkin.com/IWCatProductP ... _Id=153777. I tend to use Belkin as I know I can get it working with Linux even if the software is a little prehistoric looking to administer. I have never taken the plunge and tried the APC ones as I wasn't sure how well they integrated with Linux (better the devil you know kind of situation). I may try one next time though.
I would also stress that you run deep battery tests on your UPS regularly. I just replaced a set of batteries on one of the Belkin boxes (though they aren't supposed to be consumer replaceable) as the batteries had gone almost totally dead even though the monitor and LEDs etc all said they were good. I got about 2 seconds of uptime on them! They can go off quicker than you imagine especially if they stay topped up all the time and never get drained.
I would also stress that you run deep battery tests on your UPS regularly. I just replaced a set of batteries on one of the Belkin boxes (though they aren't supposed to be consumer replaceable) as the batteries had gone almost totally dead even though the monitor and LEDs etc all said they were good. I got about 2 seconds of uptime on them! They can go off quicker than you imagine especially if they stay topped up all the time and never get drained.
Phil
-
- Posts: 5111
- Joined: Wed Jun 08, 2005 8:07 pm
- Location: Midlands UK
Phil
If your using NP type Yuasa batteries in your UPS (most do) then a deep discahrge cycle will damage them. NP series are designed for non cyclic standby use, ie they are ideal for ups lol. We use a lot of them in intruder alarm panels. Assuming you rarly use them, ie very very few power fails then you may get 3 yrs out of them. I doubt it and we usually replace batteries in UPS as part of the 12 month maint.
James
If your using NP type Yuasa batteries in your UPS (most do) then a deep discahrge cycle will damage them. NP series are designed for non cyclic standby use, ie they are ideal for ups lol. We use a lot of them in intruder alarm panels. Assuming you rarly use them, ie very very few power fails then you may get 3 yrs out of them. I doubt it and we usually replace batteries in UPS as part of the 12 month maint.
James
James Wilson
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
-
- Posts: 5111
- Joined: Wed Jun 08, 2005 8:07 pm
- Location: Midlands UK
lol agreed (on the middle bit not the end lol)
James Wilson
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
- lazyleopard
- Posts: 403
- Joined: Tue Mar 02, 2004 6:12 pm
- Location: Gloucestershire, UK
Yeah, I have one UPS which shows full battery until the power goes. It does seem to have just enough left in it to keep the system powered long enough for an immediate shutdown. Trouble is, I'd not have discovered that without a power-off test...
It'd be good to get a new battery... if they were still available... :/
It'd be good to get a new battery... if they were still available... :/
Rick Hewett
-
- Posts: 5111
- Joined: Wed Jun 08, 2005 8:07 pm
- Location: Midlands UK
you should be able to put any battery in. Stick with a good brand. Yuasa aint as good as they were but still one of the best imho. What size is the one you have? (capacity not physical?)
James Wilson
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk