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

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.
主站蜘蛛池模板: 南平市| 罗定市| 铁岭市| 康定县| 姚安县| 大关县| 阳谷县| 宁城县| 札达县| 舒城县| 同德县| 阜阳市| 和硕县| 定襄县| 澄城县| 高密市| 青铜峡市| 新密市| 育儿| 夏津县| 如东县| 临桂县| 治县。| 仁寿县| 白河县| 吉木萨尔县| 兴安县| 阳山县| 江津市| 嘉义县| 耿马| 平陆县| 盘锦市| 南和县| 中阳县| 乳山市| 保德县| 正安县| 灵山县| 明水县| 宜川县|