扩展文件共享容量

将 File Storage for VPC 的文件共享容量扩展至32,000 GB,且无需停机或迁移数据。 计费信息会自动更新,以反映新的容量。

文件共享的账单会自动更新,将新价格的按比例计算的差额计入当前计费周期。 在下一个计费周期中将采用新的完整金额记帐。

可扩展文件共享概念

您可以增加文件共享的容量。 文件共享大小不能小于当前文件共享大小。

可以增加处于 stable 状态的文件共享的容量。 在展开文件共享之前,将验证您的用户权限。 您可以使用 UI,CLI,API 或 Terraform 来增加文件共享容量。 您可以多次扩展文件共享,直至达到其最大容量限制。 在扩展文件共享后,无法减少容量。

扩展容量由文件共享概要文件所允许的最大容量确定。

选择可用性 使用 rfs 配置文件创建的区域文件共享可无限制地增加到 32 TB。

使用 dp2 或 已废弃自定义 配置文件创建的区域文件共享,可在该文件共享大小的允许 IOPS 范围内扩展。

使用 已废弃的IOPS 层配置文件 之一创建的区域文件共享可扩展到其 IOPS 层的最大大小:

  • 通用的 3 IOPS/GB 概要文件可扩展至 32,000 GB。
  • 5 IOPS/GB 概要文件最多可扩展至 9,600 GB。
  • 10 IOPS/GB 概要文件可扩展至 4,800 GB。

IOPS 会根据文件共享的大小自动调整,以适应过时的分层文件共享配置文件。 例如,如果将具有 5 IOPS/GB 概要文件的共享从 250 GB 扩展至 1,000 GB,那么它的最大 IOPS 为 5,000 IOPS (1,000 GB 容量 x 5 IOPS)。 由于 5 IOPS/GB 文件共享可能会扩展到 9,600 GB,因此最大 IOPS 会调整为 48,000 IOPS。 容量和 IOPS 会立即更改,而且无需重启实例。

您可以从 UI 或 CLI 监视文件共享扩展的进度。 您还可以检查 活动跟踪事件,以验证文件共享是否已展开。 扩展文件共享后,无法减少容量。

要求

文件共享必须处于 stable 状态,然后才能请求增加容量。

限制

本版本受以下限制条款约束。

  • 文件共享可以扩展,但存在以下限制:
    • 如果文件共享是使用限制容量小于 32,000 GB 的分层配置文件 创建的,则只能扩展到该分层允许的容量。
    • 如果文件共享是在不允许扩展到 16,000 GB 的 IOPS 范围内使用 自定义配置文件 创建的,则共享只能扩展到指定范围的最大容量。
    • 如果文件共享是使用 dp2 配置文件 在不允许扩展到 32,000 GB 的 IOPS 范围内创建的,则共享只能扩展到指定范围的最大容量。
    • 文件共享可以多次扩展,直到达到最大容量为止。
  • IOPS 增加到概要文件允许的最大值。
  • 无法独立修改从 IOPS 层概要文件创建的文件共享的 IOPS。 IOPS 在扩展容量时进行调整。
  • 展开从定制概要文件或 dp2 概要文件创建的文件共享时,容量会增加,但 IOPS 保持不变,除非您选择 调整 IOPS。
  • 如果由一台主机访问,区域文件共享的最大 IOPS 上限为 48,000 IOPS。 对于由多台主机访问的区域文件共享,IOPS 可高达 96,000 IOPS。
  • 扩展文件共享后,无法减小其大小。

在控制台中扩展文件共享容量

按照以下步骤在控制台中扩展文件共享容量:

  1. 在 IBM Cloud 控制台中,单击导航菜单图标菜单图标 > 基础架构 VPC 图标 > 存储 > 文件存储共享。

  2. “VPC 的文件共享”列表页面显示在该区域中创建的所有文件共享。 单击文件共享的名称以进入详细信息页面。

  3. 在“文件共享详细信息”页面上,展开 操作 菜单。

  4. 选择“展开文件共享”。 “扩展文件共享大小”面板显示文件共享的当前大小 (以 GB 为单位) 以及与其关联的概要文件。 或者,您还可以单击文件共享大小信息旁边的“编辑”图标。

  5. 根据 文件共享概要文件 所允许的最大大小,输入更大的文件共享大小。 缺省值为当前大小 + 1 GB。

  6. 查看地理位置和新定价的每月估算订单摘要。

  7. 如果满意,请单击 保存并继续。

您的新文件存储配额将在几分钟内生效。 如果您的需求发生更改,那么可以在文件共享大小增大并且处于 stable 状态后再次增加容量。

扩展文件共享容量后,无法将其更改为较小的大小。

从 CLI 展开文件共享

要从 CLI 增加文件共享的容量,请使用带有 --size 选项的 share-update 命令,并指示文件共享的新大小 (以 GB 计)。

  1. 通过使用 ibmcloud is shares 命令列出区域中的文件共享,在 CLI 中找到您的共享。

    ibmcloud is shares
    
    Listing shares in all resource groups and region us-south under account Test Account as user test.user@ibm.com...
    ID                                          Name                    Lifecycle state   Zone         Profile   Size(GB)   Resource group   Replication role   Accessor binding role   Snapshot count   Snapshot size
    r006-a8d6af48-0c97-4c6b-bab1-fbefdc1e1e03   my-file-share           stable            us-south-2   dp2       10         defaults         none               none                    0                0
    r006-aaf4bfe9-358c-4faa-a4ec-0b955090b940   my-file-share-2         stable            us-south-2   dp2       10         defaults         none               none                    0                0
    r006-a60bfa90-a893-40ad-be34-28ab51a963f9   replica-dal-2           stable            us-south-2   dp2       10         defaults         replica            none                    0                0
    r006-3f21e3c3-e12d-425f-ab77-810cabfde8df   source-dal-1            stable            us-south-1   dp2       10         defaults         source             none                    0                0
    r006-455b601c-8fc1-4476-8771-4708c49c8ef7   my-replica-share-dal-1  stable            us-south-1   dp2       10         defaults         replica            none                    0                0
    r006-4dadac27-cd17-42df-a5fe-1388705d33e0   my-source-share-dal-2   stable            us-south-2   dp2       10         defaults         source             none                    0                0
    
  2. 查看要使用 ibmcloud is share 命令修改的文件共享的详细信息。

    ibmcloud is share my-file-share
    
 ```sh {: screen}
 Getting file share my-file-share under account Test Account as user test.user@ibm.com...
 ID                           r006-b696742a-92ee-4f6a-bfd7-921d6ddf8fa6
 Name                         my-file-share
 CRN                          crn:v1:bluemix:public:is:us-south-2:a/a1234567::share:r006-b696742a-92ee-4f6a-bfd7-921d6ddf8fa6
 Lifecycle state              stable
 Access control mode          security_group
 Accessor binding role        none
 Zone                         us-south-2
 Profile                      dp2
 Size(GB)                     1000
 IOPS                         1000
 User Tags                    docs:test
 Encryption                   provider_managed
 Mount Targets                ID                                          Name
                              r006-dd497561-c7c9-4dfb-af0a-c84eeee78b61   my-cli-share-mount-target-1
 Resource group               ID                                 Name
                              db8e8d865a83e0aae03f25a492c5b39e   Default
 Created                      2023-10-18T22:15:15+00:00
 Replication role             none
 Replication status           none
 Replication status reasons   Status code   Status message
                              -             -
 Snapshot count               0
 Snapshot size                0
 Source snapshot              -
 Allowed Access Protocols     nfs4
 Availability Mode            zonal
 Bandwidth(Mbps)              1
 Storage Generation           1
  1. 运行 ibmcloud is share-update 命令以增加文件共享的容量。
ibmcloud is share-update my-file-share --size 1500
Updating file share my-file-share under account Test Account as user test.user@ibm.com...
ID                           r006-b696742a-92ee-4f6a-bfd7-921d6ddf8fa6
Name                         my-file-share
CRN                          crn:v1:bluemix:public:is:us-south-2:a/a1234567::share:r006-b696742a-92ee-4f6a-bfd7-921d6ddf8fa6
Lifecycle state              updating
Access control mode          security_group
Accessor binding role        none
Zone                         us-south-2
Profile                      dp2
Size(GB)                     1500
IOPS                         1000
Encryption                   provider_managed
Mount Targets                ID                                          Name
                             r006-dd497561-c7c9-4dfb-af0a-c84eeee78b61   my-cli-share-mount-target-1
Resource group               ID                                 Name
                             db8e8d865a83e0aae03f25a492c5b39e   Default
Created                      2023-10-18T22:15:15+00:00
Latest job                   Job status   Job status reasons
                             succeeded    -
Replication share            ID                                          Name               Resource type
                             r006-6d1719da-f790-45cc-9f68-896fd5673a1a   my-replica-share   share
Replication role             source
Replication status           active
Replication status reasons   Status code   Status message
                             -             -
Snapshot count               0
Snapshot size                0
Source snapshot              -
Allowed Access Protocols     nfs4
Availability Mode            zonal
Bandwidth(Mbps)              1
Storage Generation           1

有关命令选项的更多信息,请参阅 ibmcloud is share-update my-file-share。

使用 API 扩展文件共享容量

您可以通过调用 VPC API 来扩展现有文件共享。 发出 PATCH /shares/{id} 请求并指定要增大其大小的文件共享的标识。

此请求示例扩展了 5 IOPS/GB 概要文件的容量为 50 GB 到 2500 GB 的文件共享。

curl -X PATCH \
 "$vpc_api_endpoint/v1/shares/$share_id?version=2023-08-08&generation=2" \
 -H "Authorization: Bearer $iam_token" \
 -d '{
      "size": 2500
    }'

当容量增加时,文件共享状态会显示 updating。 当前容量在更新时显示。

{
  "created_at": "2023-08-08T23:31:59Z",
  "crn": "crn:[...]",
  "encryption": "provider_managed",
  "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/199d78ec-b971-4a5c-a904-8f37ae710c63",
  "id": "199d78ec-b971-4a5c-a904-8f37ae710c63",
  "iops": 12500,
  "lifecycle_state": "updating",
  "name": "share-name1",
    .
    .
	"size": 2500,
    .
    .
    .
}

当文件共享扩展完成时,将显示新值,状态为 stable。

{
  "created_at": "2023-08-08T23:31:59Z",
  "crn": "crn:[...]",
  "encryption": "provider_managed",
  "href": "https://us-south.iaas.cloud.ibm.com/v1/shares/199d78ec-b971-4a5c-a904-8f37ae710c63",
  "id": "199d78ec-b971-4a5c-a904-8f37ae710c63",
  "iops": 12500,
  "lifecycle_state": "stable",
  "name": "share-name1",
  "profile": {
    "href": "https://us-south.iaas.cloud.ibm.com/v1/share/profiles/dp2",
    "name": "dp2",
    "resource_type": "share_profile"
  },
  "resource_group": {
    "crn": "crn:[...]",
    "href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/875623bcde2b4ebda924d32640908845",
    "id": "875623bcde2b4ebda924d32640908845",
    "name": "Default"
  },
  "resource_type": "share",
  "size": 2500,
  .
  .
  .
}

使用 Terraform 扩展文件共享

要增加文件共享的容量,请使用 ibm_is_share 资源。 应用后,以下示例会将共享容量更新为 300 GB。

resource "ibm_is_share" "example" {
  name    = "my-new-share"
  size    = 300
  iops    = 5000
  profile = "dp2"
  zone    = "us-south-2"
}

有关自变量和属性的更多信息,请参阅 ibm_is_share。

后续步骤

安装并使用文件共享: