Increase Storage of a VM

Increase the Storage of a VM in Google Cloud Platform (GCP)

This way helps to increase the VM disk size without STOP.

Resize the Persistent Disk

  1. Go to the Google Cloud Console.
  2. Navigate to Compute Engine → VM instances.
  3. Click on the VM instance where the disk is attached.
  4. Scroll down to the Boot disk and additional disks section.
  5. Click on the disk name you want to resize.
  6. Click Edit.
  7. Increase the size (e.g., from 50GB to 100GB).
  8. Click Save.

After resizing the disk in GCP, run the following commands inside your VM:

Check the disk size by lsblk

Resize the filesystem:

If using ext4 : sudo resize2fs /dev/sdb1

If using XFS : sudo xfs_growfs /mnt/disk (replace with the actual disk mount directory)

Scroll to Top