Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Failed SSH after Resize Boot Disk over console

Hello,

I tried to resized boot disk over console, after resized it, I can't login through ssh, with error message 

Feb  6 11:17:53 ls-001 systemd[1]: Condition check resulted in Load Kernel Module drm being skipped.
Feb  6 11:17:53 ls-001 systemd[1]: systemd-logind.service: Failed to run 'start' task: No space left on device
Feb  6 11:17:53 ls-001 systemd[1]: systemd-logind.service: Failed with result 'resources'.
Feb  6 11:17:53 ls-001 systemd[1]: Failed to start Login Service.

 Looks like resized disk not affected, but if I see over console disk space already in resized size. How to solved this?

Solved Solved
2 10 875
2 ACCEPTED SOLUTIONS

Did you've performed needed steps regarding FS extension for you boot device? Or you did only fsck ?

View solution in original post

Hmm

parted /dev/sdX resizepart N SIZE

and after that resize2fs /dev/sdXN should help. Partition must be unmounted. 

 or https://gist.github.com/jornane/71edf07363706898bc78cf2032b124b2

 

View solution in original post

10 REPLIES 10

Hi @da_root 
Welcome to the Google Cloud Community. I'm assuming that connection with serial console is not able. You could try to detach boot device from powered off VM. Attached this bootVM as additional disk into any kind of VM created within region on broken one.  Then boot new VM and perform repair work with filesystem (growpart or any similar , depends what FS type you have). Also worth to perform fsck to check bad sectors and repair FS on boot disk.

cheers,
DamianS

Following your steps mentioned above, with below information

fsck from util-linux 2.38.1
e2fsck 1.47.0 (5-Feb-2023)
Pass 1: Checking inodes, blocks, and sizes
Inode 5057 extent tree (at level 1) could be narrower. Optimize<y>? yes
Pass 1E: Optimizing extent trees
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

cloudimg-rootfs: ***** FILE SYSTEM WAS MODIFIED *****
cloudimg-rootfs: 860955/25804800 files (18.2% non-contiguous), 52396282/52400379 blocks

what should I do next?

DId you've checked the size of this boot device ? fdisk -l should say how big is this partition.

checked it 
Device Start End Sectors Size Type

da_root_0-1707225054344.png

sdb1 is disk need to make it as boot, if can not. at least I need to access the data on this disk 😞




Hmm

parted /dev/sdX resizepart N SIZE

and after that resize2fs /dev/sdXN should help. Partition must be unmounted. 

 or https://gist.github.com/jornane/71edf07363706898bc78cf2032b124b2

 

and also, when I run as boot device again, still got

Feb  6 12:43:41 ls-001 systemd[1]: Condition check resulted in Load Kernel Module drm being skipped.
Feb  6 12:43:41 ls-001 systemd[1]: systemd-logind.service: Failed to run 'start' task: No space left on device
Feb  6 12:43:41 ls-001 systemd[1]: systemd-logind.service: Failed with result 'resources'.
Feb  6 12:43:41 ls-001 systemd[1]: Failed to start Login Service.

Did you've performed needed steps regarding FS extension for you boot device? Or you did only fsck ?

Hey, can i know what FS extension is and what I have to do? I have the exact same problem as da_root, but I don't understand the method you mentioned or where I have to input the commands

Hello @hidrostix  ,Welcome on Google Cloud Community.


@hidrostix wrote:

r where I have to input the commands


commands should be performed on VM terminal.

 


@hidrostix wrote:

Hey, can i know what FS extension is and what I have to do?


Extensions means filesystem type. My apologize for misunderstanding here. 

--
cheers,
Damian Sztankowski
LinkedIn medium.com Cloudskillsboost Sessionize Youtube

Thanks @DamianS solved.