Signs of a dying SD card? sqlite errors in log, slow stats/history,

Hey everyone,

just to doublecheck, because I think my sd card is dying, so I want to save as much as possible.
I cannot access my addon page anymore, just stays white and after a while shows this:

Loading the history/stats of devices sometimes takes ages, and I found this in my logs:

Logger: homeassistant.components.hassio
Source: components/hassio/__init__.py:1015
Integration: Home Assistant Supervisor (documentation, issues)
First occurred: November 9, 2022 at 04:02:39 (3197 occurrences)
Last logged: 19:18:40

Could not fetch stats for a0d7b954_sqlite-web:
Could not fetch stats for 15d21743_samba_backup:
Could not fetch stats for a0d7b954_vscode:
Could not fetch stats for a0d7b954_esphome:
Could not fetch stats for core_mosquitto:
Logger: homeassistant.components.hassio.handler
Source: components/hassio/handler.py:42
Integration: Home Assistant Supervisor (documentation, issues)
First occurred: November 3, 2022 at 18:35:26 (3236 occurrences)
Last logged: 19:54:57

Timeout on /addons/a0d7b954_sqlite-web/stats request
Timeout on /addons/15d21743_samba_backup/stats request
Timeout on /addons/a0d7b954_vscode/stats request
Timeout on /addons/a0d7b954_esphome/stats request
Timeout on /addons/core_mosquitto/stats request

The installation is running since february, on a Pi3 with a pretty good sandisk sd card.

I’m hesitant to just reboot the Pi, as I’d like to rescue as much as possible while it’s still responsive.
What bugs me the most is that I cannot access the sqlite addon to pull old stats :-/ Is there another way to directly access the sqlite addon except via the addon overview page? My last automated backup is from this morning, hopefully not too corrupted yet…

Is there anything else I can do in this situation besides trying to pull as much as possible while the thing is still responsive?

Thanks in advance! :slight_smile:

If you suspect the SD card to be dying, then the most important thing to do is immediately stop writing to it. Every write access will make the situation worse and will increase the likelihood of data loss. That means shutting down the system asap, not rebooting it and then mounting the card as readonly to save as much data as you can. This can usually be done from a PC, possibly using a Linux bootdisk or VM (not sure what fileformat HAOS formats the card with). You can then pull the sqlite db file directly from the card and hope it’s not too damaged (but realistically, it probably is).

Next time, don’t put the database on the SD card.

I hope the backup is not on the SD card…

2 Likes

Nope, on a usb drive connected to my router, linked to HA via smb backup. Just pulled the last file, unpacked everything, and I can read the db with a viewer on my laptop. So I have data at least until today, that addresses my biggest worries…

Good. That gives you a safety net to fall back to if you can’t save the db file from the SD card. Shows the importance of regular backups.

But yeah, don’t put the db on the SD in the future :slight_smile:

Just ordered an USB2SSD adapter board and an SSD :slight_smile:

1 Like