Cross-posting this from Lemmy world where it seems my post coming from piefed.ca is not federating.
This is something that seems to happen randomly to my little RaspberryPi 4B homeserver, like once every few months maybe.
What happens is that out of nowhere (meaning I didn't make any change to config or installation) I cannot reach any services I host on it (i.e. Jellyfin, Anchor notes...). I cannot access it via SSH at all, connection keeps timing out.
Ping however gives a signal. I can see/hear its running and doing something, since I hear the external HDD working. It is running headless and I have no monitor and/or keyboard I could connect.
So far my only way out is to just switch its power off, which is obviously not good for the hard drive. It has happened now like half a dozen times over the past few years, so I am wondering what a better way is to handle this. This was on RPI OS and now its happening on DietPi, so seems not related to the OS version.
I tried sending a shutdown signal via SSH but that also just times out, so how do I get it to shutdown properly?
Secondly, what kind of logs could I look at or start collecting to make sense of this?
The OS is on a SD card, the HDD is a spinning disc connected via USB and I actually never had any issues with its connectivity.
There are however issues sometimes if I connect a second drive, where I assume it does have something to do with not getting enough power for 2 external HDDs, but I only ever connect a second drive for backing up.
Don't think this is connected, but if more people here feel like yes then I am happy to check in that direction.
Are you powering the spinning disc off the pi? High draw can cause funky stuff too.
Any under voltage warnings?
Yes, disk is powered via USb. I had however a different disk before that was separately powered and I think I also ran into this issue.
Where would I see under voltage warnings? I kind of doubt this is it because for months everything is fine, this sounds like it would cause issues more regularly.
The under voltage might just be in the TTY 1 or whichever is the main console when you plug a monitor in.
I think it's two different issues that are compounding, one being the maybe a bit too high power draw from the exterior drive, and the second being the different power sources being funky. The vexing part was the infrequency.
Sorry I can't be more useful with diagnostics, my problems all went away when I went with a low power USB drive IE a USB SSD.
Oh no worries. I wrote this post with no expectations whatsoever since I myself have no clue about this.
I'll make a note on checking power consumption, also when I am planning to buy the next drive, which won't be for a while though. Until then I will just make sure to do regular backups.