- Google Cloud Platform for Architects
- Vitthal Srinivasan Janani Ravi Judy Raj
- 135字
- 2021-06-25 20:48:30
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:
- We can use the gcloud command-line tool for this purpose.
gcloud compute disk resize [DISK NAME] —size [DISK_SIZE]
- 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]
- Now, extend the filesystem and provide a disk name or partition name:
sudo resize2fs /dev/sda/[PARTITION_NUMBER]
- You can use the df -h command to verify your resizing.
推薦閱讀
- 公有云容器化指南:騰訊云TKE實戰(zhàn)與應(yīng)用
- ETL數(shù)據(jù)整合與處理(Kettle)
- SQL Server入門經(jīng)典
- Java Data Science Cookbook
- Oracle RAC 11g實戰(zhàn)指南
- 深入淺出MySQL:數(shù)據(jù)庫開發(fā)、優(yōu)化與管理維護(第2版)
- Hadoop大數(shù)據(jù)實戰(zhàn)權(quán)威指南(第2版)
- 數(shù)據(jù)庫原理與應(yīng)用(Oracle版)
- MySQL 8.x從入門到精通(視頻教學(xué)版)
- INSTANT Apple iBooks How-to
- Mastering LOB Development for Silverlight 5:A Case Study in Action
- Unreal Engine Virtual Reality Quick Start Guide
- 信息融合中估計算法的性能評估
- 利用Python進行數(shù)據(jù)分析(原書第2版)
- Microsoft Dynamics NAV 2015 Professional Reporting