官术网_书友最值得收藏!

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] 
  1. You can use the df -h command to verify your resizing.
主站蜘蛛池模板: 三门县| 云阳县| 怀来县| 都兰县| 九台市| 衡南县| 田林县| 喜德县| 西宁市| 景泰县| 安康市| 城固县| 开阳县| 贵港市| 孟州市| 延寿县| 互助| 土默特左旗| 三台县| 青岛市| 佳木斯市| 奉新县| 临海市| 亚东县| 固镇县| 米脂县| 泰和县| 华阴市| 来宾市| 九龙城区| 洱源县| 漾濞| 利津县| 江达县| 达尔| 常熟市| 衡阳市| 靖江市| 信丰县| 什邡市| 黎城县|