Corrupt FileSystems every 2-3 month?

I’ve bough a 15000mAh powerbank (RAVpower) and the Pi is only connected to the network through ethernet. The powerbank lasts at least 24 hours.
I’ve never experienced power outages that long.
Therefore I’ve not set up any battery monitoring script.
Best
LionHe

1 Like

@Benjy:
If others can state how long their RPi systems have lasted, that’d be useful.

My system is running for a year now. I had a corrupt SD after 8 months.

Indeed, I had that too. And then suddenly it stopped. I have suspicion it was because in the beginning I was often working on OpenHab, adding things etc. Whether that is the reason and whether it is the reason in your case I do not know.

I run a Raspi3 with a Sandisk Ultra 32GB card now for about 1 year without problems with my Openhabian installation.

How to find out if the powerbank provides this function!?

Put in an energy meter?

So there is not a kind of spec like “simultaneously charging and supplying”
Anyway, I will look around if I can find a proper power bank.
Or I just buy a real UPS from APC for all my server stuff :slight_smile:

That’s what I did. Got one for 80€ that has 4+4 plugs. They include surge protection, too, even for the DSL line, and you can put all other devices on that are as important to your smart home operations, such as the NAS or router.
Still, to have a power bank in the loop will allow you to run around the house with your Pi in your hands.

Yep it could be good to have a list of power bank that are able to supply power while charging.
If someone as some devices to recommend

I googled on Internet and found the following link
https://tech.scargill.net/tag/ideal-ups-for-raspberry-pi/
I bought a similar model on amazon
I find that I have to use the 2.1A and not the 2.4A output.

1 Like

Does anyone know what causes everything to start, and then stop after a fresh install and then backup?

[11:55:36] openhabian@openHABianPi:~$ sudo systemctl start openhab2
[11:55:41] openhabian@openHABianPi:~$ tail -f /var/log/openhab2/openhab.log
2018-01-19 11:23:49.002 [INFO ] [.dashboard.internal.DashboardService] - Started                                                                            dashboard at https://192.168.1.100:8443
2018-01-19 11:24:12.493 [INFO ] [thome.model.lsp.internal.ModelServer] - Started                                                                            Language Server Protocol (LSP) service on port 5007
2018-01-19 11:24:15.845 [INFO ] [basic.internal.servlet.WebAppServlet] - Started                                                                            Basic UI at /basicui/app
2018-01-19 11:24:16.011 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started                                                                            Paper UI at /paperui
2018-01-19 11:24:16.129 [INFO ] [panel.internal.HABPanelDashboardTile] - Started                                                                            HABPanel at /habpanel
2018-01-19 11:34:17.437 [INFO ] [basic.internal.servlet.WebAppServlet] - Stopped                                                                            Basic UI
2018-01-19 11:34:27.324 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Stopped                                                                            Paper UI
2018-01-19 11:34:27.348 [INFO ] [panel.internal.HABPanelDashboardTile] - Stopped                                                                            HABPanel
2018-01-19 11:34:27.360 [INFO ] [er.internal.HomeBuilderDashboardTile] - Stopped                                                                            Home Builder
2018-01-19 11:34:27.384 [INFO ] [.dashboard.internal.DashboardService] - Stopped                                                                            dashboard

I got the basic screen up and then moved the OS to a new USB stick and then restored my userdata and conf folders.

Thanks.

Does the bottom of

sudo journalctl -u openhab2.service -b

show any problems?

I’m afraid I don’t have that information.
I gave up, did a fresh install to a SSD and restored my config/user data files to that and everything’s been working fine since then which was around eight days ago.

Hi
Just wonder where is the post where all the steps are defined ? I could apply that as I just moved my openHab from my synology to a Pi3
Thanks

see post #20.

It’s been an old topic but I gathered a lot of useful information here, hence the reason I signed up to ask a (hopefully not too silly) question regarding the failing sd-cards issue.

I ordered my raspberry pi 3B+ but don’t actually have it yet. So it’s theory for now, but I was wondering if someone has experimented with raid for this config before?

I have experimented with mdadm soft-raid in linux before, has it been attempted to run openhab on a raid 6 or raid 61 (6+1) array of SD-cards or USB-sticks before, using mdadm?
The raid array can notify one in case of a disk-failure and the sd cards or usb stick might be hot-swapable with self-recovery?

Is it possible to put a boot loader onto the sd-card and then start openhab from the raid 61 (6+1) array, or a raid 6 array with an automatic dd backup to a backup usb-drive?

“Raid 6 means it requires at least 4 drives and can withstand 2 drives dying simultaneously.”

So out of a 6+1 array (8 USB sticks or sd-cards) 6 drives can fail (all drives in one array and 2 out of the other one) and I still will be able to recover all of my data.

Please do yourself a favor and buy a small ssd or hdd. It is a bout 30€ and the Pi 3B+ can boot from it without an sd card.

It’s the devices which are the problem, so creating a raid array from constantly failing devices is clearly nonsense. Sorry, but it is.

It doesn’t matter if you use sd-cards or usb sticks, these devices are not made to be constantly written to, like an operating system does.

Not quite right. Re-read my post. There’s 2 ingredients to a long-life SD card: UPS and reduction of writes.
If you already have a UPS (power outages would affect ALL connected devices at the same time), going for a SW RAID might be more reliable than to use a single device (even if that’s a SSD).
Then again it’s adding complexity and if you also have applied the write tweaks AND have backup in place it’s probably not worth/required any more.

I’m doubtful. SD cards don’t implement SMART. There is nothing there to report that a card is failing. With SD cards they work until they don’t and the only way you can tell that they are not working anymore is when weird stuff starts to happen (e.g. you try to delete a log file but the file remains or comes back at reboot). And in cases of corruption caused by loss of power, it isn’t a case where the SD card failed. It is a case where the SD card doesn’t have protections for power loss to prevent file system corruption.

So you will be in a situation where file system corruption can occur even on perfectly fine SD cards and a situation where the drives fail silently giving no information to the RAID controller that anything is wrong. Linux and the RAID will continue to happily write and replicate corruption across the RAID because there is nothing telling it that what you intended to write didn’t actually get written to the SD card.

This will be far more expensive, far more complex, and likely far less reliable than just a single external SSD or HDD so I can’t recommend it. I’m not certain it would address the SD card corruption and wear out problem at all actually.

2 Likes

As others have said, just get yourself an external SSD case, and run the Pi from that. My most recent install, I used Etcher to burn the openhabian image directly to the SSD. Worked great.

As with any system you want to be reliable, put it on a UPS. Make backups of the important files.