このコンテンツは選択した言語では利用できません。

Chapter 10. Volumes


The volumes collection provides information about volumes in a Red Hat Gluster Storage environment.
The following table shows specific elements contained in a volume resource representation.
Expand
Table 10.1. Volume elements
Element Type Description Properties
volumeName relationship Name of the volume to be created.
volumeType relationship DISTRIBUTE, REPLICATE, DISTRIBUTED_REPLICATE.
replicaCount complex replicaCount is mandatory if volumeType is REPLICATE or DISTRIBUTED_REPLICATE
bricks complex list of bricks of a volume. You can add/remove bricks to/from a volume.
options complex list of options of the volume  

Example 10.1. An XML representation of a volume

  <gluster_volume href="/api/clusters/419590b8-5aa0-473b-9651-aa41f1372c59/glustervolumes/6d4bc7ed-4278-45e1-973e-e9a5e061de50" id="6d4bc7ed-4278-45e1-973e-e9a5e061de50">
    <actions>
        <link href="/api/clusters/419590b8-5aa0-473b-9651-aa41f1372c59/glustervolumes/6d4bc7ed-4278-45e1-973e-e9a5e061de50/rebalance" rel="rebalance"/>
        <link href="/api/clusters/419590b8-5aa0-473b-9651-aa41f1372c59/glustervolumes/6d4bc7ed-4278-45e1-973e-e9a5e061de50/stoprebalance" rel="stoprebalance"/>
        <link href="/api/clusters/419590b8-5aa0-473b-9651-aa41f1372c59/glustervolumes/6d4bc7ed-4278-45e1-973e-e9a5e061de50/resetoption" rel="resetoption"/>
        <link href="/api/clusters/419590b8-5aa0-473b-9651-aa41f1372c59/glustervolumes/6d4bc7ed-4278-45e1-973e-e9a5e061de50/resetalloptions" rel="resetalloptions"/>
        <link href="/api/clusters/419590b8-5aa0-473b-9651-aa41f1372c59/glustervolumes/6d4bc7ed-4278-45e1-973e-e9a5e061de50/setoption" rel="setoption"/>
        <link href="/api/clusters/419590b8-5aa0-473b-9651-aa41f1372c59/glustervolumes/6d4bc7ed-4278-45e1-973e-e9a5e061de50/start" rel="start"/>
        <link href="/api/clusters/419590b8-5aa0-473b-9651-aa41f1372c59/glustervolumes/6d4bc7ed-4278-45e1-973e-e9a5e061de50/stop" rel="stop"/>
    </actions>
    <name>newVol</name>
    <link href="/api/clusters/419590b8-5aa0-473b-9651-aa41f1372c59/glustervolumes/6d4bc7ed-4278-45e1-973e-e9a5e061de50/bricks" rel="bricks"/>
    <cluster href="/api/clusters/419590b8-5aa0-473b-9651-aa41f1372c59" id="419590b8-5aa0-473b-9651-aa41f1372c59"/>
    <volume_type>distribute</volume_type>
    <transport_types>
        <transport_type>tcp</transport_type>
    </transport_types>
    <replica_count>0</replica_count>
    <options/>
    <status>
        <state>down</state>
    </status>
</gluster_volume>
Copy to Clipboard Toggle word wrap

10.1. Creating a Volume

Creation of a new volume requires the volumeName, volumeType,transportType and brick elements. The API creates a new volume with a POST request to the URI containing a representation of the new volume
.

Example 10.2. Creating a volume

POST /api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes HTTP/1.1
Accept: application/xml
Content-type: application/xml

<gluster_volume>
  <name>data</name>
  <volume_type>distribute</volume_type>
  <bricks>
    <brick>
      <server_id>fcb46b88-f32e-11e1-918a-0050568c4349</server_id>
      <brick_dir>/export/data/brick1</brick_dir>
    </brick>
    <brick>
      <server_id>de173e6a-fb05-11e1-a2fc-0050568c4349</server_id>
      <brick_dir>/export/data/brick2</brick_dir>
    </brick>
  </bricks>
</gluster_volume>
Copy to Clipboard Toggle word wrap
cURL command:
curl -X POST -H "Accept: application/xml" -H "Content-Type: application/xml" -u [USER:PASS] --cacert [CERT] https://[RHGSC HOST]/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes -d "<gluster_volume><name>data</name><volume_type>DISTRIBUTE</volume_type><bricks><brick><server_id>fcb46b88-f32e-11e1-918a-0050568c4349</server_id><brick_dir>/export/data/brick1</brick_dir></brick><brick><server_id>de173e6a-fb05-11e1-a2fc-0050568c4349</server_id><brick_dir>/export/data/brick2</brick_dir></brick></bricks></gluster_volume>"
The API returns the following representation of the newly created volume resource:
HTTP/1.1 201 Created
Content-Type: application/xml

<gluster_volume href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes/83101900-2f12-4855-838e-36b8a9e04554" id="83101900-2f12-4855-838e-36b8a9e04554">
    <name>data</name>
    <actions>
        <link href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes/83101900-2f12-4855-838e-36b8a9e04554/start" rel="start"/>
        <link href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes/83101900-2f12-4855-838e-36b8a9e04554/stop" rel="stop"/>
        <link href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes/83101900-2f12-4855-838e-36b8a9e04554/setOption" rel="setOption"/>
        <link href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes/83101900-2f12-4855-838e-36b8a9e04554/rebalance" rel="rebalance"/>
        <link href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes/83101900-2f12-4855-838e-36b8a9e04554/resetOption" rel="resetOption"/>
        <link href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes/83101900-2f12-4855-838e-36b8a9e04554/resetAllOptions" rel="resetAllOptions"/>
    </actions>
    <link href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes/83101900-2f12-4855-838e-36b8a9e04554/bricks" rel="bricks"/>
    <cluster href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95" id="99408929-82cf-4dc7-a532-9d998063fa95"/>
    <volume_type>distribute</volume_type>
    <transport_types>
        <transport_type>TCP</transport_type>
    </transport_types>
    <replica_count>0</replica_count>
    <options/>
    <state>DOWN</state>
</gluster_volume>
Copy to Clipboard Toggle word wrap
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat