OH2 Raspi3, Crash and lost config

Sorry, forgot to write in English :wink:

My OH2 on Raspi3 recently developed a kind of an amnesia.
After updating to OH2.1 via openhabian-config it just stopped working after a couple of hours of running.
This happened twivce within the past 24 hours. It just does not respond and I can´t Putty into it anymore. So I pulled the plug and restarted.
The log showed that an Evohome binding had trouble with Java somehow and I hope I have this one fixed. But what really bothers me: the system forgot all the changes made to the items, sitemaps etc after each restart.
While fiddeling with the Evohome binding I as about to try and reinstall Java, which in the end I dit not. But as a precaution I copied all settings and whatnot to a Backup.
After I noticed that all my items where gone I tried copying them bacl only to realize that they where not backed up. It was the old settings that I copied without knowing.
Somehow my OH2 seems to not save anything anymore. What could it be?

Hallo Christian,
bitte beachte dass dieses Forum rein englisch geführt wird. Bitte lass uns wissen wenn das ein Problem ist und wir finden sicher eine Lösung.

Hello Christian,
you didn’t state it but I suspect you are using a normal openHABian installation? Everything you said (freezes, restarts, lost configuration files) clearly points to a damaged SD card or problems with your RPi. I’d suspect the SD card. Do a backup of your important files NOW, get a new SD card (32GB should be a good choice), install openHABian, then restore your settings.

Good luck!

Hi Thom Dietrich,

I´m really sorry. Did not write in English! Rectified it :wink:
It seems that this behaviour is related to the update to 2.1. It was working perfectly before that. I did the update because something did not seem right after installing RRD4J. It would not start logging, but after the update it worked.

I just tried it again and added some elements to sitemap. Then a manual reboot … changes gone.
A newly created sitemap also just disappeared after reboot. What the heck?

That is known behavior. Files are not actually written to disk immediately but cached on your system, then written to disk in the background. Now it can happen that an SD card gets damaged in a way where you can still read but write operations are not possible. On your Linux system changes seem to take effect when they actually are just written to cache and lost upon reboot. You could test that by powering down the RPi, then plugging the SD card to your normal PC. Try to create a file and write content to it. Windows will yield an error (I think).

Anyhow. If your system can’t write to the SD card, I’m almost sure it’s because of a damaged card and the solution is to buy a new one. :v:

I had same symptoms with openhabian + RPi3 + usb flash drive. First errors came after updating through apt-get: Read only filesystem!

Uptime counter stopped at 51 days :wink:

After I was able to confirm the death of the SD card (flagged as read-only even on my WIn machine) I was finally able to move and boot everything from a USB thumb drive.
But this time my uptime counter did not make it past 48 hours. This morning I couldn´t connect to the Pi again. Plugged it to a screen and got a nice device descriptor read error -110.
As far as I have googled it points to a power supply error to the USB port or something.
It is really wierd. I´m not doing very much with my OH2 Pi at the moment other than running a few test sensors around the house with rrd4j persistence causing new data points every 5 minutes.
I have a small SSD around that I would like to try next and see if I can get the uptime to at least a week :wink:
Would you suggest runing it of of a USB hub?

I’m pretty sure it won’t run directly from the RPi usb port. Mine is attached to a hub and works fine …

Thanks. I´ll give it a try. Otherwise I might own a defect Pi3? It is eating through my memory devices like a beast. That definitly won´t suit a home automation system.

Don’t think so. Extensive persistence service could cause that problem.
There are many hints here in this forum to move the tmp and other folders via tmpfs into memory.

During the two years I have used my Pi with a sd card I had to replace it twice. Since one year I’m running from USB SSD and no problems anymore (even with extensive influx db persistence).

Just use a usb hub that has external power suply to be sure that your ssd gets enough power.

I bought a powered Sata-USB adaptor and again followed this writeup to move everything to the new drive: http://www.makeuseof.com/tag/make-raspberry-pi-3-boot-usb/
But I run into trouble as the system becomes unresponsive after about an hour.
Last time I couldn´t even log in via Putty. Now it let me log in and it gave me these errors.

/opt/FireMotD/FireMotD: line 306: cannot create temp file for here-document: Read-only file system
/opt/FireMotD/FireMotD: line 308: cannot create temp file for here-document: Read-only file system
/opt/FireMotD/FireMotD: line 310: cannot create temp file for here-document: Read-only file system
Runtime error (func=(main), adr=23): Divide by zero
/opt/FireMotD/FireMotD: line 320: cannot create temp file for here-document: Read-only file system
/opt/FireMotD/FireMotD: line 323: cannot create temp file for here-document: Read-only file system
/opt/FireMotD/FireMotD: line 325: cannot create temp file for here-document: Read-only file system
/opt/FireMotD/FireMotD: line 329: cannot create temp file for here-document: Read-only file system
/opt/FireMotD/FireMotD: line 330: cannot create temp file for here-document: Read-only file system
/opt/FireMotD/FireMotD: line 331: cannot create temp file for here-document: Read-only file system

As I´m a noob I have a clue about the issue, but not about the solution.

Read this link through carefully. https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md

You do not have to move or copy whole os but just to format your new ssd and copy new raspian image to the ssd. Just like installing to sd card.

Those read only warnings, did they come after fresh install done following that link you posted? Or did you copy your old allready corrupted file system?

I just fiddled around with an earlier install on SD card and used the Move root to USB option in the openhabian-config in hopes it will do all the persistence and whatnot from the USB drive now and just to the bootup process from the SD.

So now you might have those corrupted files on your new ssd. I’d suggest that you do a full clean install starting from rasbian.

I would guess that during the process as described in the writeup it was not taken into account that openhab2 runtime would like to have a tempfs somewhere and the partitions on the disks where just spanning the whole disk with no room for a temp. Just my wild guess.

But ok. A fresh install seems inevitable. I did the move to usb, but again after an hour I get the same errors.
Or someone can point me in the right direction?

Seems I´m outta luck. Did a fresh install on a new SD card. Moved Root to USB via the config menu. Rebooted. Came home after a couple of hours … ext4 error. Now rebooting ends in a kernel panic. Let´s just say I´m a bit out of ideas.

Why are you still trying to copy through config menu? After you have changed RPis bootmode you don’t even need the whole sd card anymore. Just burn raspian image to your usb ssd and power up. Have you tried this?

P.S I’d suggest to use Etcher for burning those images.

Yes I did. Can´t remember the errors it gave me and so I dumped it again.
Just as I suspected I can´t get my head around why mqtt was not working the first time I tried it. Now its the same and I would like to trash the whole project again. Aarrrrrrg