Resize persistent disk of Google Cloud VM: Couldn’t find valid filesystem superblock

google-cloud-platformgoogle-compute-engineubuntu-14.04virtual-machines

I'm trying to follow the official Google Cloud documentation on how to resize the persistent disk of a Compute Engine image.

According to the instructions, after I determine the new disk size in the Web Console I need to run resize2fs to resize the filesystem to the new disk space. However, when I try to run it I get the following error:

resize2fs: Device or resource busy while trying to open /dev/disk/by-id/google-[my-disk-id]
Couldn't find valid filesystem superblock.

My OS is Ubuntu 14.04.3 LTS.

Best Answer

Apparently I just had to restart the instance and it was automatically resized. This behavior was mentioned in another point of the documentation:

If you create or resize a root persistent disk or create a disk from an image or a snapshot, your virtual machine instance can automatically resize the partition to recognize the additional space after you restart the instance.

Related Topic