Error in database connectivity

Every now and then my installation (on RPi 5 + SSD) gets totally messed up with indication of disk corruption.

First thing I notice is that in logs you see something like:

You can access some parts of web interface, but you cannot connect via SSH. Addons are not accessible. HACS not accessible.

Logs can be seen but not downloaded.

Attempt to restart system fails:

Failed to restart Home Assistant

The system cannot restart because the configuration is not valid: File configuration.yaml not found.

Reboot fails with

Failed to reboot system

System is not ready with state: shutdown

So far only thing that worked for me is to physically unplug raspberry pi from power or hold power button until it turns off. Turning back on, so far reboots everything to normal state.

Is there any way in this situation that you could force it to reboot no matter what, I don’t think it’s worse than unplugging power anyway?