• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

Extend Regional Persistent Disks

September 12, 2020

Here’s the command to extend your regional persistent disks.

gcloud compute disks resize disk-name \
--size 100 \
--project project-id \
--region us-central1

gcloud compute disks resize disk-name \ --size 100 \ --project project-id \ --region us-central1

Or you can specify by zone.

gcloud compute disks resize disk-name \
--size 100 \
--project project-id \
--zone us-central1-c

gcloud compute disks resize disk-name \ --size 100 \ --project project-id \ --zone us-central1-c

Display the updated disk details.

gcloud compute disks list \
--filter="name=disk-name" \
--project project-id

gcloud compute disks list \ --filter="name=disk-name" \ --project project-id

Although you’ve increased disk size, the file system doesn’t know the extra space. Run this (for XFS).

xfs_growfs /dev/sdb

xfs_growfs /dev/sdb

Filed Under: Cloud Tagged With: disks, gcloud, persistent disks, resize

Search This Website

Subscribe Via Email

  • Home
  • About
  • Archives

Copyright © 2023