OH2 Raspi3, Crash and lost config

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

OK I got it all up and running. My question now would be: can I have an automated complete backup and have openhab copy that to a Synology NAS whenever it becomes available? The NAS isn´t runnig all the time, just at times my mediacenter wakes it up. I would like to make openhab aware of that and have it copy the backup by itself.
Is that possible?

I don’t see openhab doing that by itself so you have to use some other mechanisms.

Heres a quite new topic about backup scripts Backup/Restore scripts for Linux and MacOS. You could make a cron job that runs these scripts and uploads .zip files to another server. Is your nas only online at daytime or could you schedule it to power up during the night and let it run for an hour? Then maybe a python script could ping your nas to be sure it’s online and then upload the backups.

I’m not much of a coder myself so i can’t serve you the final solution but throwing some ideas.

… or use Amanda or raspiBackup.

1 Like