我正在尝试在Google Cloud上创建一个附加了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
2 回答
对于大多数机器类型,每个VM最多可以附加64TB标准持久磁盘,有关详细信息,请参阅this blogpost . 您需要调整文件系统的大小,以便操作系统可以访问磁盘上的其他空间 . 您可以参考this link了解调整磁盘大小的步骤 .
我'd say it'不是磁盘大小,而是分区大小(您可以通过运行
fdisk -l
并检查磁盘大小来确认) . 根据磁盘的分区方式,最大大小为2 TB . 也许它'd be better to use a smaller disk for the system and attach another one that is bigger to store the data (this new one you'能够像你想的那样进行分区)