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

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.
主站蜘蛛池模板: 汝城县| 榕江县| 洪湖市| 民丰县| 天柱县| 天台县| 乐亭县| 绥化市| 万载县| 乌兰县| 进贤县| 大荔县| 邯郸县| 洪泽县| 金沙县| 体育| 张家口市| 灵台县| 富宁县| 佛山市| 吉木乃县| 商洛市| 福州市| 吴忠市| 新巴尔虎左旗| 河曲县| 龙山县| 石景山区| 五河县| 塔城市| 临城县| 丹巴县| 元江| 安吉县| 开平市| 稷山县| 闻喜县| 马边| 沈阳市| 化州市| 拜城县|