How to resize a root partition in GCP.

Increase disk size.

<pre lang="bash">
gcloud compute disks resize server-boot-disk-name \
--size=50GB \
--zone us-central1-c \
--project your-project-id

Run growpart.

<pre lang="bash">
growpart /dev/sda 1

Run xfs_growfs.

<pre lang="bash">
xfs_growfs /dev/sda1

To verify, run these.

<pre lang="bash">
lsblk
df -Th