外部ボリューム
外部ボリュームは、独自のクラウドオブジェクトストレージ(AWS S3、Google Cloud Storage、Azure Blob Storage など)内のバケットまたはパスへの読み取り専用参照であり、データをコピーまたは移動せずに Zilliz Cloud がその場でデータにアクセスできるようにします。
このページでは、Web コンソールと SDK を使用して外部ボリュームを作成および削除する方法について説明します。
考慮事項
-
ボリュームは、プロジェクトのクラウドプロバイダーとリージョンに限定されます。たとえば、プロジェクトが AWS us-west-2 にある場合、ボリュームは AWS us-west-2 でのみ作成できます。
-
ボリュームをクラスターで使用するには、クラスターがボリュームと同じクラウドプロバイダーおよびリージョンにある必要があります。
-
ボリュームを作成および管理するには、Project Admin である必要があります。
-
ボリュームの構成は、作成後に編集できません。ボリュームの設定を変更する場合は、目的の設定で新しいボリュームを作成してください。
-
外部ボリュームでは、データはバケット内に保持されます。そのため、データファイルは外部ボリューム上ではなくクラウドオブジェクトストレージで管理する必要があります。
-
各組織では、最大 100 個の外部ボリュームを作成できます。
事前準備
外部ボリュームを作成する前に、AWS S3 バケット、Google GCS バケット、Azure Storage Blob を統合する必要があります。ストレージ統合は、作成する外部ボリュームと同じクラウドプロバイダーおよびリージョンにある必要があることに注意してください。
外部ボリュームを作成する
-
SDK を使用する場合
- Python
- Java
- Go
- Rust
- C++
- NodeJS
- CSharp
- cURL
pythonfrom pymilvus.bulk_writer.volume_manager import VolumeManager# Initiate a volume managervolume_manager = VolumeManager(cloud_endpoint="https://api.cloud.zilliz.com",api_key="YOUR_API_KEY")volume_name = "external_volume"# Create an EXTERNAL volumevolume_manager.create_volume(project_id="proj-xxxxxxxxxxxxxxxxxxxxxxx",region_id="aws-us-west-2",volume_name=volume_name,volume_type="EXTERNAL",storage_integration_id="integ-xxxx",path="data/")print(f"\nVolume {volume_name} created")# Note: description is not supported by VolumeManager.create_volume as of pymilvus v3.0.2.javaimport io.milvus.bulkwriter.VolumeManager;import io.milvus.bulkwriter.VolumeManagerParam;import io.milvus.bulkwriter.request.volume.CreateVolumeRequest;import com.google.gson.Gson;import io.milvus.bulkwriter.request.volume.ListVolumesRequest;import io.milvus.bulkwriter.response.volume.ListVolumesResponse;import io.milvus.bulkwriter.request.volume.DescribeVolumeRequest;import io.milvus.bulkwriter.response.volume.VolumeInfo;import io.milvus.bulkwriter.request.volume.DeleteVolumeRequest;String cloudEndpoint = "https://api.cloud.zilliz.com";String apiKey = "YOUR_API_KEY";String projectId = "proj-xxxxxxxxxxxxxxxxxxxxxxx";String regionId = "aws-us-west-2";String volumeName = "external_volume";VolumeManagerParam volumeManagerParam = VolumeManagerParam.newBuilder().withCloudEndpoint(cloudEndpoint).withApiKey(apiKey).build();VolumeManager volumeManager = new VolumeManager(volumeManagerParam);CreateVolumeRequest request = CreateVolumeRequest.builder().projectId(projectId).regionId(regionId).volumeName(volumeName).type("EXTERNAL").storageIntegrationId("integ-xxxx").path("data/").build();volumeManager.createVolume(request);System.out.printf("%nVolume %s created%n", volumeName);// Note: description is not supported by CreateVolumeRequest as of milvus-sdk-java-bulkwriter v3.0.10.go// Note: External Volume management with VolumeManager is not supported by milvus-sdk-go as of client/v3.0.0.rust// Note: External Volume management with VolumeManager is not supported in milvus-sdk-rust as of v3.0.2.c++// Note: External Volume management with VolumeManager is not supported in milvus-sdk-cpp as of v3.0.3.javascriptimport { VolumeManager } from "@zilliz/milvus2-sdk-node";const volumeManager = new VolumeManager({cloudEndpoint: "https://api.cloud.zilliz.com",apiKey: "YOUR_API_KEY"});const res = await volumeManager.createVolume({projectId: "proj-xxxxxxxxxxxxxxxxxxxxxxx",regionId: "aws-us-west-2",volumeName: "external_volume",type: "EXTERNAL",storageIntegrationId: "integ-xxxx",path: "data/"});console.log(res.data);// Note: description is not supported by VolumeCreateReq as of @zilliz/milvus2-sdk-node v3.0.6.csharp// Note: External Volume management with VolumeManager is not supported in milvus-sdk-csharp as of v3.0.0.bashexport BASE_URL="https://api.cloud.zilliz.com"export TOKEN="YOUR_API_KEY"curl --request POST \--url "${BASE_URL}/v2/volumes/create" \--header "Authorization: Bearer ${TOKEN}" \--header "Request-Timeout: 5" \--header "Content-Type: application/json" \-d '{"projectId": "proj-xxxxxxxxxxxxxxxxxxxxxxx","regionId": "aws-us-west-2","volumeName": "external_volume","type": "EXTERNAL","storageIntegrationId": "integ-xxxx","path": "data/","description": "A volume for storing collection data."}'# {# "code": 0,# "data": {# "volumeName": "external_volume"# }# }次の表では、パラメーターについて説明します。
パラメーター 説明 projectIdボリュームを作成するプロジェクトの ID です。 regionId作成するボリュームのリージョンは、データをインポートまたは移行する予定のターゲットクラスターのクラウドプロバイダーおよびリージョンと一致する必要があります。 volumeName作成するボリュームの名前は組織全体で一意である必要があり、64 文字以内で、英字またはアンダースコアで始まり、英字、数字、ハイフン、アンダースコアのみを含める必要があります。 type外部ボリュームを作成するには、パラメーターを EXTERNALに設定します。デフォルトはMANAGEDです。storageIntegrationId参照するストレージ統合の ID です。 type=EXTERNALの場合に必須です。選択するストレージ統合は、作成する外部ボリュームと同じ組織およびリージョンに属している必要があります。pathストレージパスです。 type=EXTERNALの場合に必須です。description(オプション)作成するボリュームの説明です。最大 255 文字です。 -
Web コンソールを使用する場合
1左側のナビゲーションで Volumes をクリックします。
2ボリュームページで + Volume をクリックします。
3ボリュームの構成を設定します。
次の表では、外部ボリュームの作成時に使用する各パラメーターについて説明します。
パラメーター 説明 名前 ボリューム名は組織全体で一意である必要があり、64 文字以内で、英字またはアンダースコアで始まり、英字、数字、ハイフン、アンダースコアのみを含める必要があります。 説明 このパラメーターはオプションです。最大 255 文字です。 ボリュームタイプ ボリュームタイプとして「External」を選択します。 クラウドプロバイダーとリージョン ボリュームのクラウドプロバイダーとリージョンは、データをインポートまたは移行する予定のターゲットクラスターのクラウドプロバイダーおよびリージョンと一致する必要があります。 ストレージ統合とパス ストレージ統合(AWS S3 バケット、Google GCS バケット、Azure Blob Storage)は、クラウドストレージへのアクセス構成をカプセル化する認証情報オブジェクトです。
パスは、データが配置される場所へのポインターです。(例:folder/)4Create をクリックします。
ボリュームを一覧表示する
プロジェクト内の既存のボリュームをすべて表示できます。
-
SDK を使用する場合
- Python
- Java
- Go
- Rust
- C++
- NodeJS
- CSharp
- cURL
python# Initiate a volume managervolume_manager = VolumeManager(cloud_endpoint="https://api.cloud.zilliz.com",api_key="YOUR_API_KEY")# List volumesvolume_list = volume_manager.list_volumes(project_id="proj-xxxxxxxxxxxxxxxxxxxxxxx",current_page=1,page_size=10)print("\nlistVolumes results:\n", volume_list.json()["data"])javaVolumeManagerParam volumeManagerParam = VolumeManagerParam.newBuilder().withCloudEndpoint("https://api.cloud.zilliz.com").withApiKey("YOUR_API_KEY").build();VolumeManager volumeManager = new VolumeManager(volumeManagerParam);ListVolumesRequest request = ListVolumesRequest.builder().projectId("proj-xxxxxxxxxxxxxxxxxxxxxxx").currentPage(1).pageSize(10).build();ListVolumesResponse response = volumeManager.listVolumes(request);System.out.println("listVolumes results: " + new Gson().toJson(response));go// Note: External Volume management with VolumeManager is not supported by milvus-sdk-go as of client/v3.0.0.rust// Note: External Volume management with VolumeManager is not supported in milvus-sdk-rust as of v3.0.2.c++// Note: External Volume management with VolumeManager is not supported in milvus-sdk-cpp as of v3.0.3.javascriptconst volumeManager = new VolumeManager({cloudEndpoint: "https://api.cloud.zilliz.com",apiKey: "YOUR_API_KEY"});const res = await volumeManager.listVolumes({projectId: "proj-xxxxxxxxxxxxxxxxxxxxxxx",currentPage: 1,pageSize: 10});console.log(res.data);csharp// Note: External Volume management with VolumeManager is not supported in milvus-sdk-csharp as of v3.0.0.bashexport BASE_URL="https://api.cloud.zilliz.com"export TOKEN="YOUR_API_KEY"curl --request GET \--url "${BASE_URL}/v2/volumes?projectId=proj-xxxxxxxxxxxxxxxxxxxxxxx¤tPage=1&pageSize=10" \--header "Authorization: Bearer ${TOKEN}" \--header "Content-Type: application/json" -
Web コンソールを使用する場合

外部ボリュームの詳細を表示する
特定のボリュームの詳細を確認できます。
-
SDK を使用する場合
- Python
- Java
- Go
- Rust
- C++
- NodeJS
- CSharp
- cURL
python# Initiate a volume managervolume_manager = VolumeManager(cloud_endpoint="https://api.cloud.zilliz.com",api_key="YOUR_API_KEY")volume_name = "external_volume"# Describe an external volumevolume_info = volume_manager.describe_volume(volume_name=volume_name)print("\ndescribeVolume result:\n", volume_info.json()["data"])javaString cloudEndpoint = "https://api.cloud.zilliz.com";String apiKey = "YOUR_API_KEY";String volumeName = "external_volume";VolumeManagerParam volumeManagerParam = VolumeManagerParam.newBuilder().withCloudEndpoint(cloudEndpoint).withApiKey(apiKey).build();VolumeManager volumeManager = new VolumeManager(volumeManagerParam);DescribeVolumeRequest request = DescribeVolumeRequest.builder().volumeName(volumeName).build();VolumeInfo volumeInfo = volumeManager.describeVolume(request);System.out.println("describeVolume result: " + new Gson().toJson(volumeInfo));go// Note: External Volume management with VolumeManager is not supported by milvus-sdk-go as of client/v3.0.0.rust// Note: External Volume management with VolumeManager is not supported in milvus-sdk-rust as of v3.0.2.c++// Note: External Volume management with VolumeManager is not supported in milvus-sdk-cpp as of v3.0.3.javascriptconst volumeManager = new VolumeManager({cloudEndpoint: "https://api.cloud.zilliz.com",apiKey: "YOUR_API_KEY"});const res = await volumeManager.describeVolume({volumeName: "external_volume"});console.log(res.data);csharp// Note: External Volume management with VolumeManager is not supported in milvus-sdk-csharp as of v3.0.0.bashexport BASE_URL="https://api.cloud.zilliz.com"export TOKEN="YOUR_API_KEY"export VOLUME_NAME="external_volume"curl --request GET \--url "${BASE_URL}/v2/volumes/${VOLUME_NAME}" \--header "Authorization: Bearer ${TOKEN}" \--header "Content-Type: application/json"# {# "code": 0,# "data": {# "volumeName": "external_volume",# "type": "EXTERNAL",# "regionId": "aws-us-west-2",# "storageIntegrationId": "integ-xxxx",# "path": "data/",# "status": "RUNNING",# "createTime": "2024-04-15T12:00:00Z"# }# } -
Web コンソールを使用する場合

外部ボリュームを削除する
外部ボリュームが不要になった場合は、いつでも削除できます。
外部ボリュームを削除すると、Zilliz Cloud からボリュームのメタデータのみが削除されます。データはクラウドオブジェクトストレージ内にそのまま残ります。
-
SDK を使用する場合
- Python
- Java
- Go
- Rust
- C++
- NodeJS
- CSharp
- cURL
python# Initiate a volume managervolume_manager = VolumeManager(cloud_endpoint="https://api.cloud.zilliz.com",api_key="YOUR_API_KEY")volume_name = "external_volume"# Delete an external volumevolume_manager.delete_volume(volume_name=volume_name)print(f"\nVolume {volume_name} deleted")javaString cloudEndpoint = "https://api.cloud.zilliz.com";String apiKey = "YOUR_API_KEY";String volumeName = "external_volume";VolumeManagerParam volumeManagerParam = VolumeManagerParam.newBuilder().withCloudEndpoint(cloudEndpoint).withApiKey(apiKey).build();VolumeManager volumeManager = new VolumeManager(volumeManagerParam);DeleteVolumeRequest request = DeleteVolumeRequest.builder().volumeName(volumeName).build();volumeManager.deleteVolume(request);System.out.printf("%nVolume %s deleted%n", volumeName);go// Note: External Volume management with VolumeManager is not supported by milvus-sdk-go as of client/v3.0.0.rust// Note: External Volume management with VolumeManager is not supported in milvus-sdk-rust as of v3.0.2.c++// Note: External Volume management with VolumeManager is not supported in milvus-sdk-cpp as of v3.0.3.javascriptconst volumeManager = new VolumeManager({cloudEndpoint: "https://api.cloud.zilliz.com",apiKey: "YOUR_API_KEY"});const res = await volumeManager.deleteVolume({volumeName: "external_volume"});console.log(res.data);csharp// Note: External Volume management with VolumeManager is not supported in milvus-sdk-csharp as of v3.0.0.bashexport BASE_URL="https://api.cloud.zilliz.com"export TOKEN="YOUR_API_KEY"export VOLUME_NAME="external_volume"curl --request DELETE \--url "${BASE_URL}/v2/volumes/${VOLUME_NAME}" \--header "Authorization: Bearer ${TOKEN}" \--header "Content-Type: application/json"# {# "code": 0,# "data": {# "volumeName": "external_volume"# }# } -
Web コンソールを使用する場合
1左側のナビゲーションで Volumes をクリックします。
2Actions 列の ... をクリックし、Delete を選択します。
3ボリューム名を入力し、Delete をクリックします。
課金
外部ボリュームの作成および使用には Zilliz Cloud の料金はかかりません。支払い方法は必要ありません。
ただし、インポートまたは移行中に Zilliz Cloud がバケットから読み取る際、クラウドプロバイダーからデータリクエスト料金が請求される場合があります。詳細は、Amazon S3 の料金、Google Cloud Storage の料金、Azure Blob Storage の料金 を参照してください。
FAQ
請求書の未払いにより組織が凍結されると、ボリュームはどうなりますか?
組織が凍結されると、無料トライアルと従量課金の両方を含むすべてのマネージドボリューム、およびそれらに保存されているすべてのファイルが削除され、復元できなくなります。外部ボリュームも凍結され、新しい操作には使用できなくなりますが、独自のバケット内のデータは影響を受けません。
ボリュームの使用を継続するには、まず未払いの請求書をすべて決済してください。
外部ボリュームと外部ストレージからの直接インポートの違いは何ですか?
どちらも、独自の S3 バケットまたは GCS バケットからデータをインポートできます。主な違いは次のとおりです。
-
外部ボリュームでは、認証情報管理のために AWS S3 バケット、Google Cloud Storage バケット、または Microsoft Azure BLOB ストレージコンテナー を Zilliz Cloud と統合する必要があります。認証情報は一度設定すると、複数のボリュームと操作で再利用されます。データエンジニアはクラウドストレージのキーに直接アクセスする必要がありません。
-
外部ストレージからの直接インポートでは、インポートリクエストごとに認証情報(アクセスキーとシークレットキー)を指定する必要があります。これは 1 回限りのインポートには簡単ですが、認証情報の分離や再利用はできません。
作成後に外部ボリュームのストレージ統合またはパスを変更できますか?
いいえ。外部ボリュームの作成後は、ストレージ統合とパスを変更できません。別のストレージ統合またはパスを使用するには、新しい外部ボリュームを作成してください。
アクティブなジョブまたは外部コレクションによって参照されている外部ボリュームを削除できますか?
いいえ。ダウンストリームの外部コレクションまたはアクティブなジョブがボリュームを参照している場合、削除はブロックされます。
外部ボリュームを使用するとデータ転送料金が請求されますか?
いいえ。外部ボリュームは、クラスターと同じクラウドプロバイダーおよびリージョンにある必要があります。すべてのデータアクセスは同じリージョン内で行われるため、Zilliz Cloud ではリージョン間のデータ転送料金は発生しません。
ボリュームのステータスにはどのような意味がありますか?
次の表に、ボリュームのステータスの一覧を示します。
ステータス | 説明 |
|---|---|
Available | ボリュームはアクティブで、使用可能です。 |
Frozen | 請求書の未払いにより組織が凍結されています。ボリュームは新しい操作には使用できません。ボリュームの使用を継続するには、請求書をお支払いください。 |
Error | ストレージ統合の検証に失敗しました。構成を確認して再試行してください。 該当するストレージ統合は次のとおりです。 |