Skip to Content
Google Cloud Platform for Architects
book

Google Cloud Platform for Architects

by Vitthal Srinivasan, Loonycorn Ravi, Judy Raj
June 2018
Intermediate to advanced
372 pages
8h 44m
English
Packt Publishing
Content preview from Google Cloud Platform for Architects

Resizing a persistent disk

Resizing the disk does not configure the filesystem to use additional space automatically. We have to do it ourselves. If our persistent disk has both a filesystem and partition table, we must edit both:

  1. We can use the gcloud command-line tool for this purpose.
      gcloud compute disk resize [DISK NAME] —size [DISK_SIZE]
  1. Get access of your persistent disk using SSH and determine the partition that you want to modify. You can use lsblk to have a list of your disks and partitions. If your picked partition has a partition table, then we must grow the partition before resizing it:
sudo growpart /dev/sda [PARTITION NUMBER]  
  1. Now, extend the filesystem and provide a disk name or partition name:
sudo resize2fs /dev/sda/[PARTITION_NUMBER] ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Google Cloud Platform Professional Cloud Architect

Google Cloud Platform Professional Cloud Architect

Victor Dantas
Google Cloud Platform for Developers

Google Cloud Platform for Developers

Ted Hunter, Steven Porter

Publisher Resources

ISBN: 9781788834308Other