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

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.
主站蜘蛛池模板: 根河市| 涞水县| 威远县| 迭部县| 都江堰市| 罗平县| 应城市| 乌兰察布市| 平阴县| 和林格尔县| 伊春市| 龙口市| 铜梁县| 古蔺县| 阿图什市| 寿光市| 安阳市| 百色市| 安顺市| 韶山市| 盐城市| 开原市| 宁国市| 娄烦县| 陈巴尔虎旗| 长子县| 抚州市| 澎湖县| 麦盖提县| 孝感市| 界首市| 榆树市| 大港区| 洛宁县| 屯留县| 松原市| 京山县| 杂多县| 哈尔滨市| 贵港市| 达州市|