On 07/12/10 02:05, Peter Bako wrote:
...
2) Setting up a RO system gives a level of redundancy in the case of power
outages (or more likely in my neck of the world) or brownouts.  I've had a
case in the past where a normal OpenBSD install, on a micro-drive, was in a
situation where due to an electrical storm, in the span of about 15 minutes
the power blinked a number of times (and who knows how many brownouts).
This caused the system to repeatedly reboot and then get shutdown suddenly.
I was out of the house at the time and could not pull the plug on the
system, and due to an oversight this unit was not plugged into a UPS.  The
next morning, when I tried to bring it back up the system was badly
scrambled.  Both the hardware and the micro-drive were not damaged, but the
OS needed a lot of help.  I would like to be able to deploy systems away
from my personal control, where having a system be able to came back up in a
similar situation would be useful.

Usually, ffs responds quite well to power-down while mounted, primary exception to this is when you are writing to the disk (I power-down and reboot systems all the time using the power switch :).

But, now that we understand the problem you are actually trying to solve, I would suggest attacking this problem from that perspective rather than from a Frankenstein solution.

I'm guessing this is a firewall app, I can't think of too many other apps where you will try to cram everything onto a 64M RO flash drive. So, about the only thing normally writing to disk is logging.

So...put your logging partition on its own file system. Minimize it as much as you can. MAYBE make it an MFS. RO what you can easily (i.e., /usr, /home, but think about how you will do upgrades!). Keep all your partitions as small as reasonably possible (smaller = faster fsck), and if you end up with a 4G flash device, expect to have _most_ of it unallocated.

In short, start with the most basic install, and make the fewest and smallest customizations needed to fix the actual problems you see or reasonably anticipate.

Also...as this is a Soekris device, a simple UPS can be made by simply putting a gel-cell battery and an appropriate charger, and a fairly small battery will give you hours of run time. I'm making this sound a bit simpler than it really is -- your charger has to both supply enough power to run the computer and trickle charge the battery, but not fry the battery by overcharging it...and you probably want some way to disconnect the computer from the battery to force a reboot when the battery voltage drops low enough that the computer crashes, but not low enough that the system resets (and yes, that was the voice of experience). The battery will help filter the power supply somewhat, and should help with surge handling.

Nick.

Reply via email to