Hallo zusammen,
ich betreiben einen RPi4b mit 4GB, einer 120GB M1 SSD über USB
(bootbar), Buster und Kernel 5.4.72-v7l+ (SMP) armv7l.
Jetzt hatte ich schon 2 Stromausfälle in diesem Jahr und jedes mal war
das FS defekt. /boot ist vfat und /root ist ext4. OK, es konnte
repariert werden, funktionierte nur nicht automatisch.
Meine Idee ist es nun, den Pi mit einer USV auszurüsten. Mein Interesse
hat der StromPi3 geweckt, habe aber noch ein paar fragen dazu. Eventuell
hat ja jemand von hier ein paar Antworten.
a) Kennt jemand eine Alternative?
b) Auf der Internetseite zum StromPi3 sieht es so aus, als wenn der
Strom-Pi nur über eine GUI konfiguriert werden kann. Bei mir läuft aber >kein Desktop. Kann ich den StromPi3 auch über das Terminal im
Fernzugriff konfigurieren?
c) So wie ich die Anleitung lese, kann der StromPi den Rpi runter
fahren. Das geht aber wohl nur zeitgesteuert und nicht in Abhängigkeit
des Akku Ladezustands. Kann das jemand bestätigen oder kennt eine Lösung >das in Abhängigkeit der Akkuspannung zu machen?
d) Der zugehörige Akkt hat eine Kapazität von 1000 bzw. 2000mAh. Kann
mir jemand sagen, wie lange der RPi damit betrieben werden kann?
Danke und schöne Feiertage
hawe
All my 24/7 on Pis including USB hubs and hardidsks run on a UPS.
Hello, everyone,
I run an RPI4B with 4GB, a 120GB M1 SSD via USB (bootbar), Buster and
Kernel 5.4.72-V7L+ (SMP) ARMV7L.
a) Does anyone know an alternative?
b) On the website to the StromPi3, it looks as if the electricity PI can
only be configured via a GUI. But I don't run a desktop. Can I also
configure the StromPi3 using the terminal in remote access?
c) As I read the instructions, the StromPi can drive down the RPI. But
that is probably only time -controlled and not depending on the battery
of the charge. Can someone confirm this or knows a solution that is
depending on the battery voltage?
d) The associated accommodation has a capacity of 1000 or 2000mAh. Can someone tell me how long the RPI can be operated?
a) Does anyone know an alternative?
On 19/12/2022 08:15, Hans-Werner Kneitinger wrote:
a) Does anyone know an alternative?
One suggestion, Hawe, for a UPS are the so-called "Power Banks". There's no interaction with the RPi, it's just a source of 5V power, but some of those devices will deliver a continuous 5V when the "mains" power is removed. So you
would have:
Wall socket => Power Bank => Raspberry Pi
Perhaps someone can recommend a suitable device - the one I have is long out of
production? This might give a few hours, depending on the load.
Am 19.12.22 um 08:17 schrieb Jan Panteltje:
All my 24/7 on Pis including USB hubs and hardidsks run on a UPS.
Would you like to tell me which one you use?
Is it a regular UPS or a HAT for the Pi?
On a sunny day (Mon, 19 Dec 2022 09:22:35 +0100) it happened Hans-Werner Kneitinger <hans-werner.kneitinger@gmx.de> wrote in <tnp70b$7q6f$1@dont-email.me>:
Am 19.12.22 um 08:17 schrieb Jan Panteltje:
All my 24/7 on Pis including USB hubs and hardidsks run on a UPS.
Would you like to tell me which one you use?
Is it a regular UPS or a HAT for the Pi?
It is a
APC_UPS_700VA
On 19/12/2022 08:15, Hans-Werner Kneitinger wrote:
a) Does anyone know an alternative?
Perhaps someone can recommend a suitable device - the one I have is long
out of production? This might give a few hours, depending on the load.
Power Supply UPS Module HAT Kit for
RPI Raspberry Pi 3 Model B Plus 4 B+...
SKU: Plug Type: EU Plug Total: US $25,99 Objectnumber:
383857720953 Seller: stemdiy(43)
c) So wie ich die Anleitung lese, kann der StromPi den Rpi runter
fahren. Das geht aber wohl nur zeitgesteuert und nicht in Abhängigkeit
des Akku Ladezustands. Kann das jemand bestätigen oder kennt eine Lösung das in Abhängigkeit der Akkuspannung zu machen?
Thank you for your answer and suggestion. It is a very easy solution.
Will have a look, but it seems it is hard to find a powerbank with pass through. One thing I'm missing - save shutdown.
David Taylor <david-taylor@blueyonder.co.uk.invalid> wrote:
On 19/12/2022 08:15, Hans-Werner Kneitinger wrote:If all you want to back up is a single Pi, no.
a) Does anyone know an alternative?
One suggestion, Hawe, for a UPS are the so-called "Power Banks".
There's no interaction with the RPi, it's just a source of 5V power,
but some of those devices will deliver a continuous 5V when the "mains"
power is removed. So you would have:
Wall socket => Power Bank => Raspberry Pi
Perhaps someone can recommend a suitable device - the one I have is
long out of production? This might give a few hours, depending on the
load.
If you want to back up a cluster of devices (modem, router, etc)
it might be worth looking at a standard inverter/charger of the kind
used on boats and RVs. At 120 volts there's a ~250$ one from Ampinvt available on Amazon. The unit includes a transfer switch, inverter,
battery charger and control logic. You connect a standard 12 volt
battery and plug your mains power supplies in to the inverter charger.
This is just a dumb UPS setup, but a 100AH battery (~300$ for LiFePO4)
will keep a 50 watt load running for about a day. It'll allow you to
plug in more if needed. It's a lot more expensive than the StromPi3 but
also more versatile. Pulling the mains plug while the system is running
my refrigerator and a Pi4 with monitor results in a seamless transfer to battery with no disturbance to the Pi4.
I have two such setups, one for computers/network and one for the
kitchen refrigerator. I can't really endorse Ampinvt's tech support but
the devices are useful and relatively cheap.
Not sure what's available at 220 volt, that might be a problem.
I've been using a Riello UPS to power my house server and local LAN since 2014.
It uses a pair of 12v, 7.2 AH SLA batteries as its backup and can be run
UPS configured to tell the house server to shut down after 10 minutes of
no mains power because over here mains outages are generally less than a second, i.e. just long enough to dump a PC, except occasionally when mains power can be out for hours:
This setup is installed in the UK, so it is on 240v mains.
Riello UPSs aren't exactly cheap: but I'm happy I bought mine: it is about the same size and price as the server it provides power for and does
exactly what I bought it to do.
NOTE: The small, cheap UPSs meant to power a single desktop PC are, IMO useless because they don't have the ability to tell a PC to shut down
cleanly after a preset time or when the UPS battery is drained.
On 20/12/2022 05:40, Hans-Werner Kneitinger wrote:
Thank you for your answer and suggestion. It is a very easy solution.
Will have a look, but it seems it is hard to find a powerbank with pass
through. One thing I'm missing - save shutdown.
Yes, Hawe, if save on shutdown matters you need something better.
Martin Gregorie <martin@mydomain.invalid> wrote:
I've been using a Riello UPS to power my house server and local LAN
since 2014.
It uses a pair of 12v, 7.2 AH SLA batteries as its backup and can be
run
For small(ish) loads that sounds good. I had hopes of running my fridge,
and wanted to "borrow" an automotive battery for testing purposes, as I didn't have a great deal of faith in the cheapest inverter charger on
Amazon. The first unit purchased worked exceedingly well, but it quickly became apparent that a lead-acid battery, even though it was deep cycle, didn't perform very well. LiFePO4 is considerably better in terms of
voltage sag and recharge rate.
The second inverter/charger purchased works correctly but seems prone to subtle instability in charging behavior and overload warning. That makes
me hesitant to recommend it, though I've kept the second unit in service
and have so far (6 months) observed no disqualifying behavior. Indeed,
for the price it looks hard to beat.
Outages here are usually caused by trees, which makes restoration
slower.> A half-day is fast, overnight more typical.
This setup is installed in the UK, so it is on 240v mains.
Understood, I'll admit I couldn't find any comparably cheap 220/240 volt inverter chargers, at least not in the US on Amazon. The 220/240 units
on offer are typically over $500, which diminishes the appeal.
The OP only wants to run a Pi4 (but doesn't say how much power the stuff controlled by it uses, but it looks like thats just an SSD, so probably
one of the Pi HAT UPS boards would do the trick, with an SLA as a backup would fit his requirement.
I originally bought the UPS when my (in-town) supply developed the habit
of having sub-second power glitches - needless to say that problem was
fixed about the time my UPS was unstalled.
Understood, but IMO anyway the UPS capability to tell the the system its powering to shut down cleanly if the UPS battery is depleted is well worth paying a bit extra for, particularly if your UPS power requirements and on-battery runtimes are long enough to sorta/somehow justify installing a small IC generator and configuring the UPS to tell your server to power up the generator and going back y sleep once that's running.
After all, a few litres of petrol or diesel fuel is a lot cheaper than the equivalent amount of battery capacity.
Martin Gregorie <martin@mydomain.invalid> wrote:
I've been using a Riello UPS to power my house server and local LAN since
2014.
It uses a pair of 12v, 7.2 AH SLA batteries as its backup and can be run
For small(ish) loads that sounds good. I had hopes of running my fridge,
and wanted to "borrow" an automotive battery for testing purposes, as
I didn't have a great deal of faith in the cheapest inverter charger
on Amazon. The first unit purchased worked exceedingly well, but it
quickly became apparent that a lead-acid battery, even though it was
deep cycle, didn't perform very well. LiFePO4 is considerably better
in terms of voltage sag and recharge rate.
The second inverter/charger purchased works correctly but seems prone
to subtle instability in charging behavior and overload warning. That
makes me hesitant to recommend it, though I've kept the second unit in >service and have so far (6 months) observed no disqualifying behavior. >Indeed, for the price it looks hard to beat.
[snip]
UPS configured to tell the house server to shut down after 10 minutes of
no mains power because over here mains outages are generally less than a
second, i.e. just long enough to dump a PC, except occasionally when mains >> power can be out for hours:
Outages here are usually caused by trees, which makes restoration slower.
A half-day is fast, overnight more typical.
This setup is installed in the UK, so it is on 240v mains.
Understood, I'll admit I couldn't find any comparably cheap 220/240
volt inverter chargers, at least not in the US on Amazon. The 220/240
units on offer are typically over $500, which diminishes the appeal.
Riello UPSs aren't exactly cheap: but I'm happy I bought mine: it is about >> the same size and price as the server it provides power for and does
exactly what I bought it to do.
NOTE: The small, cheap UPSs meant to power a single desktop PC are, IMO
useless because they don't have the ability to tell a PC to shut down
cleanly after a preset time or when the UPS battery is drained.
To my way of thinking it's simpler and easier to just give the UPS
enough endurance so that most outages can be ignored for at least
a few hours or overnight. For small loads it isn't expensive compared
to the equipment being backed up.
Martin Gregorie <martin@mydomain.invalid> wrote:
The OP only wants to run a Pi4 (but doesn't say how much power the stuff
controlled by it uses, but it looks like thats just an SSD, so probably
one of the Pi HAT UPS boards would do the trick, with an SLA as a backup
would fit his requirement.
Indeed, it seems he only wanted to avoid corrupting the filesystem
via an ungraceful shutdown or perhaps an interrupted restart. To
that end it might suffice to just keep the system from restarting
immediately to let the power settle down.
A powerbank seems like a good idea, worth a test.
Save/shutdown could be initiated by a shell script monitoring "low
voltage", from the powerbank. Or possibly using a failing heartbeat
(ping) to another device which is connected to the same power socket,
but without the intermediate powerbank, e.g. a router.
The Pi itself can detect undervoltage with vcgencomd.
Understood. In most of the UK the falling tree problem is a non-issue
because both power and phone lines tend to be in roadside trenches, specifically to avoid the falling tree problem: the 1987 storm accelerated the process of putting mains cables underground.
Am 21.12.22 um 05:23 schrieb bob prohaska:
Martin Gregorie <martin@mydomain.invalid> wrote:
The OP only wants to run a Pi4 (but doesn't say how much power the stuff >>> controlled by it uses, but it looks like thats just an SSD, so probablyIndeed, it seems he only wanted to avoid corrupting the filesystem
one of the Pi HAT UPS boards would do the trick, with an SLA as a backup >>> would fit his requirement.
via an ungraceful shutdown or perhaps an interrupted restart. To
that end it might suffice to just keep the system from restarting
immediately to let the power settle down.
Exactly. Power failure always happens when I was not at home. And then
the FS (ext4, did not recover automaticity at boot. Even it is set via tune2fs to check every boot) is always corrupted so that the Pi cannot
start.
Router and other things are always starting after power failure.
Indeed, it seems he only wanted to avoid corrupting the filesystem via
an ungraceful shutdown or perhaps an interrupted restart. To that end it might suffice to just keep the system from restarting immediately to let
the power settle down.
Whether one wants to maintain service or simply avoid damage makes a big difference. For the OP, who just wants to avoid damage, a manual restart device might be sufficient.
After all, a few litres of petrol or diesel fuel is a lot cheaper than
the equivalent amount of battery capacity.
Fuel consuption on small generators is surprisingly high, around .1 gph
per kW (capacity plus load). The smallest domestically useful generator (~2kW) will burn close to a litre per hour.
To some extent I'm suggesting the OP's original goal is likely to be incomplete: it's simpler ( not cheaper) to back up the entire connected system rather than protect a single element and let the rest go down. To
that end, endurance is a useful feature.
On 20/12/2022 22:28, Martin Gregorie wrote:
Understood. In most of the UK the falling tree problem is a non-issue
because both power and phone lines tend to be in roadside trenches,
specifically to avoid the falling tree problem: the 1987 storm
accelerated the process of putting mains cables underground.
Golly. Where do YOU live?
On Wed, 21 Dec 2022 04:23:34 -0000 (UTC), bob prohaska wrote:
Indeed, it seems he only wanted to avoid corrupting the filesystem viaIndeed, but having the UPS tell the the server to shut down cleanly it its battery gets exhausted would save a certain amount of dosh when it comes
an ungraceful shutdown or perhaps an interrupted restart. To that end it
might suffice to just keep the system from restarting immediately to let
the power settle down.
to replacing UPS batteries: running an SLA flat and not recharging immediately is not good for them.
FWIW, my experience would seem to show that the UPS battery, on my rig anyway, has a very easy life. As I said, its initial set of batteries
(Yuasa 7AH SLA) lasted for 8 years. I also use a pair of YUASA 7.2 AH to
run the instruments, radio and FLARM in my glider. They get charged after each flying day and are cycled to measure their capacity every year. They
get slung when their capacity drops below 65% of the rated value:
generally this means they get replaced every 3 years.
Whether one wants to maintain service or simply avoid damage makes a bigHe might get away with that reasonably cheaply if he's using alkalines or small SLA batteries, but other rechargeable battery types don't like being run flat and left, so could get both annoying and expensive without the backstop of a full shutdown when the UPS batteries are empty.
difference. For the OP, who just wants to avoid damage, a manual restart
device might be sufficient.
This is one reason why I suggested the Pi hat type UPS: most of these can shut the Pi down cleanly when the battery is exhausted.
^^^^^^^Interesting: thanks for the infoAfter all, a few litres of petrol or diesel fuel is a lot cheaper than
the equivalent amount of battery capacity.
Fuel consuption on small generators is surprisingly high, around .1 gph
per kW (capacity plus load). The smallest domestically useful generator
(~2kW) will burn close to a litre per hour.
To some extent I'm suggesting the OP's original goal is likely to be
incomplete: it's simpler ( not cheaper) to back up the entire connected
system rather than protect a single element and let the rest go down. ToIndeed. I do exactly that with my house server: I use a cycle of two of WD Essentials 1TB USB drives to maintain backups of it.
that end, endurance is a useful feature.
Exactly. Power failure always happens when I was not at home. And then
the FS (ext4, did not recover automaticity at boot. Even it is set via tune2fs to check every boot) is always corrupted so that the Pi cannot
start.
On Wed, 21 Dec 2022 12:04:30 +0000, The Natural Philosopher wrote:
On 20/12/2022 22:28, Martin Gregorie wrote:One of the older parts of Harlow, the first postwar New Town.
Understood. In most of the UK the falling tree problem is a non-issue
because both power and phone lines tend to be in roadside trenches,
specifically to avoid the falling tree problem: the 1987 storm
accelerated the process of putting mains cables underground.
Golly. Where do YOU live?
Exactly. Power failure always happens when I was not at home. And then
the FS (ext4, did not recover automaticity at boot. Even it is set via tune2fs to check every boot) is always corrupted so that the Pi cannot
start.
On 21/12/2022 14:02, Martin Gregorie wrote:
On Wed, 21 Dec 2022 12:04:30 +0000, The Natural Philosopher wrote:Well I don't live in as New Town. I live next door to a property
On 20/12/2022 22:28, Martin Gregorie wrote:One of the older parts of Harlow, the first postwar New Town.
Understood. In most of the UK the falling tree problem is a non-issue
because both power and phone lines tend to be in roadside trenches,
specifically to avoid the falling tree problem: the 1987 storm
accelerated the process of putting mains cables underground.
Golly. Where do YOU live?
mentioned in the Domesday book...
Not much has changed here since the 1920s, except broadband, which has
gone all fibre
It doesn't matter how much undergrounding is done when the main trunks
are above ground
And vulnerable to lightning strikes, or, the lines - like the old man
of Madras' balls 'in windy weather they clashed together, and sparks
flew out of his arse'.
Even in towns its usual for substations to be fed from overheads. 33kV
or 66KV. Only Londo undergrounds it's special 22KV network
"National Grid owns the high voltage electricity transmission system in England and Wales and operates the system throughout Great Britain at
275,000 and 400,000 volts (275kV and 400kV). This transmission system is
made up of approximately 7,200 kilometres (4,470 miles) of overhead
line, 1,400 kilometres (870 miles) of underground cable and about 330 substations"
So the very high voltage stuff is predominantly up in the air
As is most of the intermediate 11, 33 and 66kV stuff
BUT it is possible that large towns will get a 175vKV feeder direct into
a substation and then the down conversion to domestic voltage is all
done there.
Sounds like your SD card is past end of life. Either get a new one, or
use an alternative boot device such as a USB stick, or better still a
small SSD with a USB adaptor.
Could you describe in more detail exactly what happens?
Am 21.12.22 um 18:27 schrieb bob prohaska:
Could you describe in more detail exactly what happens?
OK, I don't think that I'm doing some special things.
The Pi is running 24/7 flawless. Why power failures are happening, I
don't know.
developing area. Power failure is mostly short <1h.
Pi is for controlling home environment such as heater and light and controlling my fish tank, too. Both fail save, so no harm has happened
until now, but annoying. And it is running dnsmasq. Other computers are
not running 24/7 but the internet router.
After power recovery the internet router is coming up flawless. The pi
is not cumming up. I have to power down the pi, disconnect.t the m1-ssd
, which is connected via USB and set as boot device, to some other
Linux. Doing fsck -y on the m1-ssd. Finding and repairing some errors.
But don't ask which one. After repairing I connect the m1-ssd to Pi and
power up. All is working fine.
From this I deduce that the mains lines in this part of Harlow have always been under the concrete pavement at the front of the terrace along with
the water mains.
So, as I said, mains drop-outs either take out large chunks of the town
for minutes to hours and are roughly once per decade events.
The rest typically last for milliseconds to (rarely) 30 secs to a couple
of minutes and tend to affect a relatively small part of town.
I think that *may* be relevant.
You might do better to have the booting done from the standard SD card
and map all the moving data (/var and /home mostly) to the SSD, but not
the boot section.
that way you can guarantee the boot device is powered up and almost
certainly (being readonly) free from errors, and the system can fsck the
SSD to its hearts content
Am 22.12.22 um 07:17 schrieb The Natural Philosopher:
I think that *may* be relevant.
You might do better to have the booting done from the standard SD card
and map all the moving data (/var and /home mostly) to the SSD, but
not the boot section.
that way you can guarantee the boot device is powered up and almost
certainly (being readonly) free from errors, and the system can fsck
the SSD to its hearts content
I'm not sure about that. In the past running a P1 on SD-Card. The
SD-Card is destroyed several time because of running 24/7. An other Pi I
used for XBIAN and running on SD-Card only, I switched off by accident without a proper shutdown. It results in a corrupted FS, too.
On this Pi the /boot is vfat (rw, relatime, shortname=mixed, errors=remount-ro) and / is ext4 (rw, noatime, discard and with journal enabled). Set via tune2fs to -c 1 -i 1d.
In my opinion it is unsafe to power off the Pi without a proper shutdown regardless it is running on SD-Card or USB.
Am 22.12.22 um 07:17 schrieb The Natural Philosopher:
I think that *may* be relevant.
You might do better to have the booting done from the standard SD card
and map all the moving data (/var and /home mostly) to the SSD, but
not the boot section.
that way you can guarantee the boot device is powered up and almost
certainly (being readonly) free from errors, and the system can fsck
the SSD to its hearts content
I'm not sure about that. In the past running a P1 on SD-Card. The
SD-Card is destroyed several time because of running 24/7. An other Pi I
used for XBIAN and running on SD-Card only, I switched off by accident without a proper shutdown. It results in a corrupted FS, too.
On this Pi the /boot is vfat (rw, relatime, shortname=mixed, errors=remount-ro) and / is ext4 (rw, noatime, discard and with journal enabled). Set via tune2fs to -c 1 -i 1d.
In my opinion it is unsafe to power off the Pi without a proper shutdown regardless it is running on SD-Card or USB.
Am 21.12.22 um 18:27 schrieb bob prohaska:
Could you describe in more detail exactly what happens?
OK, I don't think that I'm doing some special things.
The Pi is running 24/7 flawless. Why power failures are happening, I
don't know. Maybe it is while I'm living in an industrial region and developing area. Power failure is mostly short <1h.
Pi is for controlling home environment such as heater and light and controlling my fish tank, too. Both fail save, so no harm has happened
until now, but annoying. And it is running dnsmasq. Other computers are
not running 24/7 but the internet router.
After power recovery the internet router is coming up flawless. The pi
is not cumming up. I have to power down the pi, disconnect.t the m1-ssd
, which is connected via USB and set as boot device, to some other
Linux. Doing fsck -y on the m1-ssd. Finding and repairing some errors.
But don't ask which one. After repairing I connect the m1-ssd to Pi and
power up. All is working fine.
On Tue, 20 Dec 2022 21:34:46 +0000, Pancho
<Pancho.Jones@proton.me> wrote:
A powerbank seems like a good idea, worth a test.
It should be rated to deliver 3 Ampere at 5 Volt, without "smart
charging handshake". A Pi does not behave like a charging
smartphone. I hope you can find such a powerbank.
Who knows if that would be the same for all powerbanks?
Am 2022-12-19 hat Hans-Werner Kneitinger geschrieben:Just take a look at github /nanomesher/nanomesher_piswitch_attiny or projects.descan.com/projekt5.html
c) So wie ich die Anleitung lese, kann der StromPi den Rpi runter
fahren. Das geht aber wohl nur zeitgesteuert und nicht in
Abhängigkeit des Akku Ladezustands. Kann das jemand bestätigen
oder kennt eine Lösung das in Abhängigkeit der Akkuspannung zu
machen?
Ja, das stimmt, geht nur nach Zeit.
Aber Du kannst Dir für das Geld (StromPi + Akku) schon fast eine
richtige USV anschaffen. Das muß ja keine mit mehreren kW Leistung
sein, da reicht eine kleine die aussieht wie eine etwas dickere Steckdosenleiste.
Die hat den Vorteil, daß auch andere Geräte überbrückt werden, beispielsweise ein Switch oder Peripherie, die am Raspi hängt. Die meisten USVs haben eine Schnittstelle, über die sie ihren Zustand preisgeben. Die läßt sich mit dem Raspi verbinden und Du hast eine Lösung, die Du nach eigenem Ermessen konfigurieren kannst.
Abseits davon:
Wenn Du Akkuspannungsgesteuert runterfahren willst würde mir als
erstes ein AD-Wandler einfallen, den man alle paar Sekunden nach der
Akku- spannung fragen kann (max. 3.3V-Pegel der Raspi-Eingänge beachten!). Sinkt der Wert unter eine gewisse Schwelle -> "shutdown -h now". Dürfte mit ein paar Zeilen Python erledigt sein. Aber
vermutlich gibt's auch hier fertige Lösungen, ich kann Dir
leider mangels Kenntnis gerade keine nennen.
[out of signatures error]Bye/2 Torsten
Sysop: | Coz |
---|---|
Location: | Anoka, MN |
Users: | 2 |
Nodes: | 4 (0 / 4) |
Uptime: | 140:10:16 |
Calls: | 166 |
Files: | 5,389 |
Messages: | 223,236 |