如何提高Google Compute Engine中根磁盘的大小? [英] How can size of the root disk in Google Compute Engine be increased?

查看:325
本文介绍了如何提高Google Compute Engine中根磁盘的大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

GCE中的根磁盘大小为10千兆字节。如何增加这个?我不能在控制台或gcutil标志中找到该选项。这可以在AWS中轻松完成。

The root disk size in GCE is 10 gigs. How do I increase this? I cant find the option in the console or the gcutil flags. This can be easily done in AWS.

推荐答案


  1. 从快照创建新磁盘,
  2. 使用新的固定磁盘创建新实例

  3. 使用分区来识别新空间( https://cloud.google.com/compute/docs/disks/persistent-disks#repartitionrootpd )(注意:请特别注意启动

  4. sudo resize2fs / dev / sda1(注意,此步骤在google中未提及cloud docs)

  1. create a new disk from snapshot, but increase the size when doing so
  2. create a new instance, using new, embiggened disk
  3. embiggen the partition to recognize the new space (https://cloud.google.com/compute/docs/disks/persistent-disks#repartitionrootpd) (NOTE: pay special attention to the starting sector, don't just blindly hit return, you can, however blindly hit return on the ending sector)
  4. sudo resize2fs /dev/sda1 (note, this step is not mentioned in the google cloud docs)

这篇关于如何提高Google Compute Engine中根磁盘的大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆