Hyperdisk 存储池是一种新的块存储资源,可帮助您以汇总方式管理 Hyperdisk 块存储。Hyperdisk 存储池在 Hyperdisk Throughput 存储池和 Hyperdisk Balanced 存储池变体中提供。
创建存储池时,您必须指定以下属性:
- 可用区
- 存储池类型
- 容量预配类型
- 池预配的容量
- 性能预配类型
- 池预配的 IOPS 和吞吐量
您可以将标准容量、高级容量、标准性能或高级性能预配类型与 Hyperdisk 存储池搭配使用:
- 标准容量:在存储池中创建的每个磁盘的预配容量会从存储池的预配总容量中扣减。
- 高级容量:存储池受益于精简预配和数据缩减。仅会从存储池的预配总容量中扣减实际写入的数据量。
- 标准性能:在存储池中创建的每个磁盘的预配性能会从存储池的预配总性能中扣减。
- 高级性能:为每个磁盘预配的性能受益于精简预配。只会从存储池的配置总性能中扣减磁盘使用的性能量。
准备工作
-
如果您尚未设置身份验证,请进行设置。身份验证是通过其进行身份验证以访问 Google Cloud 服务和 API 的过程。如需从本地开发环境运行代码或示例,您可以通过选择以下选项之一向 Compute Engine 进行身份验证:
Select the tab for how you plan to use the samples on this page:
Console
When you use the Google Cloud console to access Google Cloud services and APIs, you don't need to set up authentication.
gcloud
-
After installing the Google Cloud CLI, initialize it by running the following command:
gcloud init
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
- Set a default region and zone.
-
Install the Google Cloud CLI.
-
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
-
To initialize the gcloud CLI, run the following command:
gcloud init
-
If you're using a local shell, then create local authentication credentials for your user account:
gcloud auth application-default login
You don't need to do this if you're using Cloud Shell.
If an authentication error is returned, and you are using an external identity provider (IdP), confirm that you have signed in to the gcloud CLI with your federated identity.
-
Install the Google Cloud CLI.
-
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
-
To initialize the gcloud CLI, run the following command:
gcloud init
-
If you're using a local shell, then create local authentication credentials for your user account:
gcloud auth application-default login
You don't need to do this if you're using Cloud Shell.
If an authentication error is returned, and you are using an external identity provider (IdP), confirm that you have signed in to the gcloud CLI with your federated identity.
-
Install the Google Cloud CLI.
-
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
-
To initialize the gcloud CLI, run the following command:
gcloud init
-
If you're using a local shell, then create local authentication credentials for your user account:
gcloud auth application-default login
You don't need to do this if you're using Cloud Shell.
If an authentication error is returned, and you are using an external identity provider (IdP), confirm that you have signed in to the gcloud CLI with your federated identity.
-
Compute Instance Admin (v1) (
roles/compute.instanceAdmin.v1
) -
若要连接到能够以服务账号的身份运行的虚拟机实例:Service Account User (v1)(
roles/iam.serviceAccountUser
角色) -
针对项目的
compute.storagePools.create
权限 -
针对项目的
compute.storagePools.setLabels
权限 - 您可以创建预配容量高达 5 PiB 的 Hyperdisk 存储池。
- 您每小时最多可以创建 5 个存储池。
- 您每天最多可以创建 10 个存储池。
- 您最多可以为每个项目创建 10 个存储池。
- 您无法更改池的预配模型;您无法将标准容量存储池更改为高级容量存储池,也无法将高级性能存储池更改为标准性能存储池。
- 存储池是可用区级资源。
- 您最多可以在一个存储池中创建 1,000 个磁盘。
- 您只能将 Hyperdisk 存储池与 Compute Engine 搭配使用。Cloud SQL 实例无法使用 Hyperdisk 存储池。
- 在 24 小时内,您最多可以更改两次存储池的预配容量或性能。
- 只能在存储池中创建位于同一项目和同一可用区的新磁盘。
- 不允许将磁盘移入或移出存储池。如需将磁盘移入或移出存储池,您必须通过快照重新创建磁盘。如需了解详情,请参阅更改磁盘类型。
- 如需在存储池中创建启动磁盘,您必须使用 Hyperdisk Balanced 存储池。
- 存储池不支持区域级磁盘。
- 您无法对存储池中的磁盘进行克隆、创建即时快照或配置异步复制等操作。
- 前往 Google Cloud 控制台的创建存储池页面。
前往“创建存储池”页面 - 在名称字段中,为存储池输入具有唯一性的名称。
- 可选:在说明字段中,输入存储池的说明。
- 选择要在其中创建存储池的区域和可用区。
- 在存储池类型部分选择一个值。
在容量类型字段中选择预配类型,然后在存储池容量字段中指定要为存储池预配的容量。您可以指定 10 TiB 到 1 PiB 的大小。
如需创建容量较大的存储池,您可能需要申请配额调整。
在性能类型字段中选择预配类型。
对于 Hyperdisk Balanced 存储池,在预配 IOPS 字段中,输入要为存储池预配的 IOPS。
对于 Hyperdisk Throughput 存储池或 Hyperdisk Balanced 存储池,在预配吞吐量字段中,输入要为存储池预配的吞吐量。
点击提交以创建存储池。
- NAME:具有唯一性的存储池名称。
- ZONE:要在其中创建存储池的可用区,例如
us-central1-a
。 - STORAGE_POOL_TYPE:要在存储池中存储的磁盘类型。允许的值包括
hyperdisk-throughput
和hyperdisk-balanced
。 - CAPACITY_TYPE:可选:存储池的容量预配类型。允许的值包括
advanced
和standard
。如果未指定,则系统会使用值advanced
。 - POOL_CAPACITY:要为新存储池预配的总容量,默认以 GiB 为单位。
- PERFORMANCE_TYPE(可选):存储池的性能预配类型。允许的值包括
advanced
和standard
。如果未指定,则系统会使用值advanced
。 - IOPS:要为存储池预配的 IOPS。此标志只能用于 Hyperdisk Balanced 存储池。
- THROUGHPUT:要为存储池预配的吞吐量(以 MBps 为单位)。
- DESCRIPTION:可选:描述存储池的文本字符串。
- PROJECT_ID:项目 ID
- ZONE:要在其中创建存储池的可用区,例如
us-central1-a
。 - NAME:存储池具有唯一性的名称。
- DESCRIPTION:可选:描述存储池的文本字符串。
- POOL_CAPACITY:要为新存储池预配的总容量,默认以 GiB 为单位。
- STORAGE_POOL_TYPE:要在存储池中存储的磁盘类型。允许的值包括
hyperdisk-throughput
和hyperdisk-balanced
。 - IOPS:可选:要为存储池预配的 IOPS。此标志只能用于 Hyperdisk Balanced 存储池。
- THROUGHPUT:可选:要为存储池预配的吞吐量(以 MBps 为单位)。
- CAPACITY_TYPE:可选:存储池的容量预配类型。允许的值包括
advanced
和standard
。如果未指定,则系统会使用值advanced
。 - PERFORMANCE_TYPE(可选):存储池的性能预配类型。允许的值包括
advanced
和standard
。如果未指定,则系统会使用值advanced
。
Go
如需在本地开发环境中使用本页面上的 Go 示例,请安装并初始化 gcloud CLI,然后使用您的用户凭证设置应用默认凭证。
如需了解详情,请参阅 Set up authentication for a local development environment。 如需了解详情,请参阅身份验证文档中的为本地开发环境设置 ADC。
Java
如需在本地开发环境中使用本页面上的 Java 示例,请安装并初始化 gcloud CLI,然后使用您的用户凭证设置应用默认凭证。
如需了解详情,请参阅 Set up authentication for a local development environment。 如需了解详情,请参阅身份验证文档中的为本地开发环境设置 ADC。
Node.js
如需在本地开发环境中使用本页面上的 Node.js 示例,请安装并初始化 gcloud CLI,然后使用您的用户凭证设置应用默认凭证。
如需了解详情,请参阅 Set up authentication for a local development environment。 如需了解详情,请参阅身份验证文档中的为本地开发环境设置 ADC。
REST
如需在本地开发环境中使用本页面上的 REST API 示例,请使用您提供给 gcloud CLI 的凭据。
After installing the Google Cloud CLI, initialize it by running the following command:
gcloud init
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
如需了解详情,请参阅 Google Cloud 身份验证文档中的使用 REST 时进行身份验证。
所需的角色和权限
如需获得创建存储池所需的权限,请让管理员向您授予项目的以下 IAM 角色:
如需详细了解如何授予角色,请参阅管理对项目、文件夹和组织的访问权限。
这些预定义角色包含创建存储池所需的权限。如需查看所需的确切权限,请展开所需权限部分:
所需权限
创建存储池需要以下权限:
限制
创建 Hyperdisk 存储池时,请注意以下限制:
资源限制:
存储池中的磁盘限制:
容量范围和预配的性能限制
创建存储池时,预配的容量、IOPS 和吞吐量受到存储池限制中所述的限制的约束。
创建 Hyperdisk 存储池
如需创建新的 Hyperdisk 存储池,请使用 Google Cloud 控制台、Google Cloud CLI 或 REST。
控制台
gcloud
如需创建 Hyperdisk 存储池,请使用
gcloud compute storage-pools create
命令。gcloud compute storage-pools create NAME \ --zone=ZONE \ --storage-pool-type=STORAGE_POOL_TYPE \ --capacity-provisioning-type=CAPACITY_TYPE \ --provisioned-capacity=POOL_CAPACITY \ --performance-provisioning-type=PERFORMANCE_TYPE \ --provisioned-iops=IOPS \ --provisioned-throughput=THROUGHPUT \ --description=DESCRIPTION
替换以下内容:
REST
使用
storagePools.insert
方法构建POST
请求以创建 Hyperdisk 存储池。POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/storagePools { "name": "NAME", "description": "DESCRIPTION", "poolProvisionedCapacityGb": "POOL_CAPACITY", "storagePoolType": "projects/PROJECT_ID/zones/ZONE/storagePoolTypes/STORAGE_POOL_TYPE", "poolProvisionedIops": "IOPS", "poolProvisionedThroughput": "THROUGHPUT", "capacityProvisioningType": "CAPACITY_TYPE", "performanceProvisioningType": "PERFORMANCE_TYPE" }
替换以下内容:
Go
Java
Node.js
后续步骤
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-22。
-