Home > Net >  In gcp, I changed the size of boot disk after I got [Errno 28] No space left on device, but it keeps
In gcp, I changed the size of boot disk after I got [Errno 28] No space left on device, but it keeps

Time:10-19

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. 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

CodePudding user response:

Since there is no space left on the device, the resized boot disk is not recognized.

I would suggest to:

  1. Create a snapshot from the affected disk.
  2. Create an additional disk using the created snapshot
  3. 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
  4. Then mount the attached disk to a specific directory.
  5. 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.
  6. 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.
  • Related