【问题标题】:I resized my GCP instance but the new size isn't showing up when I run "df"我调整了 GCP 实例的大小,但运行“df”时未显示新大小
【发布时间】:2018-10-31 07:13:00
【问题描述】:

我调整了 GCP 实例的大小并添加了几百个 gig,但是当我在控制台中运行 df 时,我没有看到磁盘大小发生了变化。为什么新空间没有出现?

编辑:所以我一直在关注这里的指南:https://cloud.google.com/compute/docs/disks/add-persistent-disk

但我的分区表看起来不一样:

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 600G 0 disk `-sda1 8:1 0 100G 0 part /

我尝试了以下命令来扩大分区,但它抛出了一个错误:

JTa:~$ sudo growpart /dev/sda1 1 WARN: unknown label failed [sfd_dump:1] sfdisk --unit=S --dump /dev/sda1 /dev/sda1: device contains a valid 'ext4' signature; it is strongly recommended to wipe the device with wipefs(8) if this is unexpected, in order to avoid possible collisions sfdisk: failed to dump partition table: Success FAILED: failed to dump sfdisk info for /dev/sda1

【问题讨论】:

  • 这篇文章超出了 StackOverflow 社区的范围,请在 ServerFault 论坛上提问。只是为了帮助,看看这个页面:cloud.google.com/compute/docs/disks/add-persistent-disk
  • 哪个操作系统?您是否重新启动了 VM 实例?我写了一篇关于这个主题的指南文章:jhanley.com/google-cloud-debian-9-resize-root-file-system
  • 我正在使用 ubuntu。根据文档,我们不需要重新启动 VM。我尝试按照@Tzigan 发布的指南中的步骤操作,但我被卡住了。我的分区表看起来与指南中的不同,我编辑了 OP

标签: google-cloud-platform


【解决方案1】:

尝试使用 sudo growpart /dev/sda 1

【讨论】:

    猜你喜欢
    • 2014-04-22
    • 1970-01-01
    • 2013-05-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多