Skip to content
Advertisement

Unable to connect to SSH on Google Cloud VM Instance

I have run into a problem today where I am unable to connect via SSH to my Google Cloud VM instance running debian-10-buster. SSH has been working until today when it suddenly lost connection while docker was running. I’ve tried rebooting the VM instance and resetting, but the problem still persists. This is the serial console output on GCE, but I am not sure what to look for in that, so any help would be highly appreciated.

Another weird thing is that earlier today before the problem started, my disk usage was fine and then suddenly I was getting a bunch of errors that the disk was out of space even after I tried clearing up a bunch of space. df showed that the disk was 100% full to the point where I couldn’t even install ncdu to see what was taking the space. So then I tried rebooting the instance to see if that would help and that’s when the SSH problem started. Now I am unable to connect to SSH at all (even through the online GCE interface), so I am not sure what next steps to take.

Advertisement

Answer

Your system has run out of disk space for the boot (root) file system.

The error message is:

Root filesystem has insufficient free space

Shutdown the VM, resize the disk larger in the Google Cloud Web GUI and then restart the VM.

Provided that there are no uncorrectable file system errors, your system will startup, resize the partition and file system, and be fine.

If you have modified the boot disk (partition restructuring, added additional partitions, etc) then you will need to repair and resize manually.

I wrote an article on resizing the Debian root file system. My article goes into more detail than you need, but I do explain the low level details of what happens.

Google Cloud – Debian 9 – Resize Root File System

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement