I had my as card go out apparently, assuming this was the real issue. My logs quit updating I thought it was initially a permissions issue. When I fixed the permissions I logged for 24hrs then stopped again.
Yesterday all my automation quit working. Logging in again is what reveled the log problem.
Anyway for a quick fix if your sd is not toast, I installed a sad drive and executed the move to root function. Rebooted and all is well.
I don’t suggest this fox for everyone but it was a quick way to get going again for me. I have backups, but a bad sad card is still a bad as so I needed a way to avoid the writes.
The only reason this will work is because the /boot partition is generally read only and all my openhab system files are read only. What appears to have killed the system is me clearing the cache yesterday. This being said I am confident that my card is good except the area that cache and logs were written as everything else is read only except for updates.
Long term i will just boot from sad but that recovery would have taken longer tonight and I plan on migrating to 2.4. Thought I would pass this along! Maybe it’s worth a try for someone else. Although be careful this method could bite you depending on what was corrupted. In addition the sd card could completely fail. However it could be a quick fix in a pinch.
It was a lesson in my book to have a backup sd card on hand. I have backups but not that type.
We all learn this lesson sooner or later - and some of us are more resistant to learning than others (it took me 2 failed SD cards/lost configs before I switched to a USB flash drive … I haven’t had any issues since then… I’m also more strict about backing up my configs now, too.
Here’s is the problem with that. Files don’t stay put on flash memory. Think of flash like a series of buckets. Each bucket can contain all or part of many files. So part if your kernel binary and openhab.log might be sharing the same bucket.
When you change a file, everything in the bucket gets moved to a new bucket with the changes applied in transit.
This does a great job of wear leveling the buckets. But it means that no file is safe on the SD card from corruption. It also means that one the SD card shows wearout problems it means that it much all of the buckets are worn out.
So there really is no such thing as read only on an SD card, even if the file system is set as read only. As long as any files on the card are changing, everything is moving around all the time.
A while back I moved everything to an SSD hard drive and it works great. Comparing the price of a good SD card to a 120 gig SSD w/case its hard not to advise making the move. My SSD was $25 but you can get smaller/cheaper dirves and the case w/usb SATA connection was $10. You probably know this but Etcher can flash openhabian image to SSD by clicking the gear icon, top right corner, and selecting “unsafe mode”. Just make sure you know the correct drive before flashing.
Don’t be mistaken. SSD are flash, too, so in principle the same problem applies as does for SD cards !
SSDs just happen to (usually!) have another DRAM cache layer so effectively they’re writing to flash less often than without. But if you buy the cheapest you can get (and who does not ?) I wouldn’t bet my life on the manufacturer having built that in…
H102 I have a cable and a case currently but when I go to booting to sad I will have to purchase a cable to dedicate to my pi.
Markus, yes agree! I am using an intel ssd. It’s similiar to what they use at my day job. The machine I deal with write gigs of data per day to these. With the hundreds we have installed only aware of one or two failure in last 5 years.
So you need a working backup/restore procedure in place anyway.
Then why move to SSD at all and not stick with SD ?
Yes agree you need to apply some measures so SDs don’t wear out too quickly so it does not happen too often. But for that see my post I linked.
I accept the curiosity argument, but cost ? It’s more expensive to have the same amount of memory in SSD than in SD, plus there’s a minimum SSDs start at (32GB?) while you can get away with 4G for a SD.
I wasn’t aware you could run OH with a 4M card. Reading various post most new OH users start with 16G and those can be bought for $10, but cross your fingers that it’s not a fake. The more expensive SD card’s are roughly the price as SSD but with less memory. Either route, following your link above and taking precautions is best.
Do you know of any plans for openhabian config option to auto configure something like this?
Well 4G obviously not 4M (typo) but still under normal conditions if comparing apples to apples, SDs are cheaper than SSDs of the same size. And no need to hassle with enclosure space, cabling, power, OS boot tweaks etc etc.
It’s been discussed but there’s no consensus there. My pov is that it’s not needed.
Either way it would be a tricky thing to build that all the way right that’s why probably noone will take on that task.
Manually - yes, it’s one of the suggestions contained in the post I linked to already.
Building that into openHABian ? No I don’t think so. It’s way too risky and complicated to automate tasks like that in a universal but foolproof manner.
Huh ? Less cost than what ? One 4G SD card plus one 4G stick will likely still be cheaper than any single SSD, but the main point here is it’s TWO devices then, and the one being written to (the stick) may fail without that that’s killing your whole server.
EDIT: I think I misunderstood your intention. If you meant to have a SINGLE SSD w/ 2 partitions instead of system on SD plus all write-intensive stuff on an external medium then I think I should have answered “NO”. That’s NOT an option because even with different partitions, you cannot be sure that ‘under the hood’ these aren’t mapped to the same place in flash so persistence/logging/swapping may still corrupt your system.
It’s likely better than to have a single SD card only, but for this to be on the safe side, you need 2 devices.
That was more the point I wanted to clarify. I should have just asked, are two devices needed to be safe.
Not to complain, both 8G and 16G are cheap enough, but 4G USB sticks are hard to find. Last time I looked (in Best Buy) the smallest thing in the store was 8G. Just something I’ve noticed, no big deal, I’m sure I could find 4G on the web if needed.