• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

growpart

GCP Extend ext4 Boot Volume

July 28, 2022

Here’s how to extend an ext4 boot volume.

gcloud compute disks resize DISK_NAME --size DISK_SIZE --zone ZONE --project PROJECTID

gcloud compute disks resize DISK_NAME --size DISK_SIZE --zone ZONE --project PROJECTID

Resize the file system. Example / is on sda3.

growpart /dev/sda 3
resize2fs /dev/sda3

growpart /dev/sda 3 resize2fs /dev/sda3

Filed Under: Cloud, Linux Tagged With: boot, ext4, extend, gcloud, gcp, growpart, resize2fs, volume

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

  • Home
  • About
  • Archives

Copyright © 2023