Skip to content

Resize GCP disk

This will be a TL;DR of this documentation

  1. Resize the disk from the "Disks" interface or using gcloud
  2. Tell the system
  3. Get the [DEVICE_ID] and [DEVICE_PARTITION] of the disk using: sudo df -h and sudo lsblk. Example: /dev/sda1 means: [DEVICE_ID]=1 and [DEVICE_PARTITION]=/dev/sda
  4. sudo apt -y install cloud-guest-utils
  5. sudo growpart /dev/[DEVICE_ID] [PARTITION_NUMBER]
  6. sudo resize2fs /dev/[DEVICE_ID][PARTITION_NUMBER]