Hi Doug,DougieLawson wrote:How do you plan to redundently share your data from Pi A to Pi B? What failover support do you plan to use for your data server?
Thanks - i'll take a look at that!peterlite wrote:An SD card can look bad after a momentary power fluctuation. It is usually a corrupt write. Reloading the system from your backup image usually fixes it. A UPS is one answer.
Actually, I was planning to have them cold redundant - i.e. only one on at a time. Their GPIOs would be joined which I guess could cause all manner of issues if they're on at the same time. My idea was to have the Arduino (which I'm assuming is more reliable than the RPi/SD Card combo) controlling 3 relays as attached. One to select between PiA and PiB, and then one each to independently control power.peterlite wrote:If you have two machines running from one mains power, they can both die at the same time
You're right and that was my original idea...but the changeover relay means that this is ensured at a H/W level which is safer, especially considering who will be writing the S/W! It'll also help during testing, or any software updates etc. Putting the power relay before the changeover relay would mean I just have 2 relays and can still do the same job though.davidcoton wrote: However, if you do still want redundancy, two power relays (one for each Pi) is enough -- the changeover relay is redundant. The Arduino can make sure that both are not simultaneously active.
This is the real crux I think - I was wondering how important it would be to isolate the un-powered Pi from the system, but now I realise the "un-powered" Pi would actually be powered via the 5V and GND pins of the other Pi.davidcoton wrote: Yopu will also need some way to safely combine the Pi outputs, so that a failed or unpowered Pi will not prevent correct operation of the system.
First things first -- unless you connect the 5V (or 3V3) rails, one Pi will not power the other through GPIO connections.richdyer_2000 wrote:m guessing that means a changeover relay for every GPIO pin I'm using....
My personal preference with fighting numerous SD card corruptions is to use read-only root (either CF or USB) / ramdisks for tmp, log & lock files and have a data partition on a USB stick in RW mode. Very important to have 2 physically different pieces of hardware for root mounded ro and data mounted rw, do not use one disk with two different partitions (unless you are using a spinning hard disk).richdyer_2000 wrote: - Is there anyway to improve my SD card reliability? The only thing I can think of is that I'm using a pair of DS18B20 Temperature sensors which are continuously writing to a file, other than that there's very little activity.
It seems the sdcard is a common point of failure for Pi. Many embedded processors and control systems that have been commercially designed rely on flash memory. However, during normal operation the flash memory is read only. The flash memory is written only when the firmware is updated or the settings changed. If you've ever updated the firmware in a DVD player or router you will notice ask sorts of warning not to turn of the power during the update.richdyer_2000 wrote:I got hit by a corrupt SD Card.
The method in this link dates back to before writable overlay support in the Linux kernel was reliable. Using a writable overlay is much easier with no special cases to be considered on an application by application level. There appears to be a link to using Aufs on Ubuntu at the end of the howto. I recommend overlayfs with a recent kernel.Heater wrote:It's pretty straight forward: https://wiki.debian.org/ReadonlyRoot
Worse is that the ESD diodes on GPIO lines may well end up conducting, because what is normally at 3.3V or 5V is now at 0V. You need to really know the internals of each pin before you hold them high with the device off.davidcoton wrote:First things first -- unless you connect the 5V (or 3V3) rails, one Pi will not power the other through GPIO connections.
But an unpowered Pi connected to a powered one is not a good idea. The GPIOs of the unpowered Pi are not guaranteed to be in a high impedance state.
While read-only root may be beyond most Pi users, it should be normal for anyone developing embedded applications. It appears overlayfs is already compiled into the kernel. I've just created a thread describing how to do use overlayfs with a read-only sdcard.Heater wrote:ejolson,
It's true that newer file systems can do what we want without the hassle of the instructions I linked to. Which are not much hassle actually.
I was thinking that a change of root file system type is a bit beyond most Pi users new to Linux. Especially if it needs a kernel update.