• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

Resizing XFS root partition in GCP

July 16, 2021

How to resize a root partition in GCP.

Increase disk size.

gcloud compute disks resize server-boot-disk-name \
--size=50GB \
--zone us-central1-c \
--project your-project-id

gcloud compute disks resize server-boot-disk-name \ --size=50GB \ --zone us-central1-c \ --project your-project-id

Run growpart.

growpart /dev/sda 1

growpart /dev/sda 1

Run xfs_growfs.

xfs_growfs /dev/sda1

xfs_growfs /dev/sda1

To verify, run these.

lsblk
df -Th

lsblk df -Th

Filed Under: Cloud, Linux Tagged With: boot, extend, gcp, growpart, root, xfs, xfs_growfs

Search This Website

Subscribe Via Email

  • Home
  • About
  • Archives

Copyright © 2023