Google 云附加磁盘大小不正确
Google Cloud attached disk size incorrect
我正在尝试在 Google 云上创建一个连接了 20TB 磁盘的计算实例,但我看到了一些奇怪的东西。当我在 gcloud 命令中指定磁盘大小时,我在检查实例大小时看不到相同的磁盘大小。我也试过创建新磁盘并附加它们,调整附加磁盘的大小,但它不会达到 2TB。 2TB 是计算实例的最大磁盘大小吗?
$ gcloud compute instances create instance --boot-disk-size 10TB --scopes storage-rw
Created [https://www.googleapis.com/compute/v1/projects/project/zones/us-central1-a/instances/instance].
NAME ZONE MACHINE_TYPE PREEMPTIBLE INTERNAL_IP EXTERNAL_IP STATUS
instance us-central1-a n1-standard-1 10.240.0.2 104.154.45.175 RUNNING
$ gcloud compute ssh gm-vcf
Warning: Permanently added 'compute.8994721896014059218' (ECDSA) to the list of known hosts.
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
user@instance:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 2.0T 880M 1.9T 1% /
udev 10M 0 10M 0% /dev
tmpfs 743M 8.3M 735M 2% /run
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
我会说这不是磁盘大小,而是分区大小(您可以通过 运行 fdisk -l
并检查磁盘大小来确认)。根据磁盘的分区方式,最大大小为 2 TB。也许系统用小一点的盘,再接一个大一点的盘来存数据更好(这个新盘你可以随意分区)
对于大多数机器类型,每个 VM 最多可以附加 64TB 的标准永久磁盘,您可以参考this blogpost for details. You need to resize the file system so that the operating system can access the additional space on your disk. You can refer to this link调整磁盘大小的步骤。
我正在尝试在 Google 云上创建一个连接了 20TB 磁盘的计算实例,但我看到了一些奇怪的东西。当我在 gcloud 命令中指定磁盘大小时,我在检查实例大小时看不到相同的磁盘大小。我也试过创建新磁盘并附加它们,调整附加磁盘的大小,但它不会达到 2TB。 2TB 是计算实例的最大磁盘大小吗?
$ gcloud compute instances create instance --boot-disk-size 10TB --scopes storage-rw
Created [https://www.googleapis.com/compute/v1/projects/project/zones/us-central1-a/instances/instance].
NAME ZONE MACHINE_TYPE PREEMPTIBLE INTERNAL_IP EXTERNAL_IP STATUS
instance us-central1-a n1-standard-1 10.240.0.2 104.154.45.175 RUNNING
$ gcloud compute ssh gm-vcf
Warning: Permanently added 'compute.8994721896014059218' (ECDSA) to the list of known hosts.
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
user@instance:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 2.0T 880M 1.9T 1% /
udev 10M 0 10M 0% /dev
tmpfs 743M 8.3M 735M 2% /run
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
我会说这不是磁盘大小,而是分区大小(您可以通过 运行 fdisk -l
并检查磁盘大小来确认)。根据磁盘的分区方式,最大大小为 2 TB。也许系统用小一点的盘,再接一个大一点的盘来存数据更好(这个新盘你可以随意分区)
对于大多数机器类型,每个 VM 最多可以附加 64TB 的标准永久磁盘,您可以参考this blogpost for details. You need to resize the file system so that the operating system can access the additional space on your disk. You can refer to this link调整磁盘大小的步骤。