Resize GCP disk
This will be a TL;DR of this documentation
- Resize the disk from the "Disks" interface or using
gcloud
- Tell the system
- Get the
[DEVICE_ID]
and[DEVICE_PARTITION]
of the disk using:sudo df -h
andsudo lsblk
. Example:/dev/sda1
means:[DEVICE_ID]=1
and[DEVICE_PARTITION]=/dev/sda
sudo apt -y install cloud-guest-utils
sudo growpart /dev/[DEVICE_ID] [PARTITION_NUMBER]
sudo resize2fs /dev/[DEVICE_ID][PARTITION_NUMBER]