擴充檔案共用容量

將 File Storage for VPC 的檔案共享容量擴充至最高 32,000 GB,過程中無需停機或進行資料遷移。 計費資訊會自動更新,以反映新的容量。

檔案共享的帳單將自動更新,將新價格的按比例計算差額加入當前計費週期中。 然後在下一個計費週期計算完整的新金額。

可擴充的檔案共用概念

您可以增加檔案共用的容量。 檔案共用大小不能小於現行檔案共用大小。

對於處於 stable 狀態的檔案共用,可以增加容量。 在展開檔案共用之前,會先驗證您的使用者授權。 您可以使用使用者介面、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 會立即變更,您不需要重新啟動實體。

您可以從使用者介面或 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 主控台中,按一下「導航功能表 圖示 > Infrastructure VPC 圖示 > 儲存 > 檔案儲存共用

  2. VPC 的檔案共用清單頁面會顯示在該區域中建立的所有檔案共用。 按一下檔案共用的名稱,以進入詳細資料頁面。

  3. 在檔案共用詳細資料頁面上,展開 動作 功能表。

  4. 選取「展開檔案共用」。 「展開檔案共用大小」畫面會顯示檔案共用的現行大小 (GB),以及與它相關聯的設定檔。 或者,您也可以按一下檔案共用大小資訊旁邊的編輯圖示。

  5. 根據 檔案共用設定檔 容許的上限,輸入較大的檔案共用大小。 預設值是現行大小 + 1 GB。

  6. 檢閱您的地理位置和新定價的預估每月訂單摘要。

  7. 如果您滿意,請按一下 儲存並繼續

您的新檔案儲存空間配額將於數分鐘內啟用。 如果您的需求變更,您可以在檔案共用大小增加之後,以及當它處於 stable 狀態時,再次增加容量。

您無法在擴充檔案共用容量後,將其變更為較小的大小。

從 CLI 展開檔案共用

若要從 CLI 增加檔案共用的容量,請搭配使用 share-update 指令與 --size 選項,並指出檔案共用的新大小 (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} 要求,並指定您要增加其大小之檔案共用的 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

下一步

裝載並使用檔案共用: