Issue
I wanted to connect to my gcp vm instance via ssh, but I couldn't connect.
At first, I saw the message "[Errno 28] No space left on device", so I searched at this site. href="https://stackoverflow.com/questions/24671621/no-space-left-on-device">No space left on device <- this link didn't help me because I can't even open ssh. and answers to other related questions couldn't help me because they are premised on the possibility to use sudo or other commands. What should I do in gcp page to solve this? Error codes are below. (I wrote down the error I saw first.)
OSError: [Errno 28] No space left on device: '/var/tmp/cloud-init/cloud-init-dhcp-2e4eit3d'
ERROR non_windows_accounts.go:142 gpasswd: /etc/group.1894: No space left on device
Solution
Since there is no space left on the device, the resized boot disk is not recognized.
I would suggest to:
- Create a snapshot from the affected disk.
- Create an additional disk using the created snapshot
- After creating the disk from the snapshot, attach it to an another working Linux VM Instance "instance-1" for example, as additional disk, not as the boot disk
- Then mount the attached disk to a specific directory.
- After mounting, You need to free up some space from the mounted disk, to have space for the services needed to recognize the resizing of the disk.
- After freeing up some space, you need to re-attach the disk as the boot disk to test if you had regain control of the VM Instance.
Answered By - Siegfred V. Answer Checked By - Timothy Miller (WPSolving Admin)