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

10.4. Managing Bricks


This section describes the brick operations of the Red Hat Gluster Storage Console API such as adding and removing them from a volume.

10.4.1. Listing of Bricks

A listing of bricks in a volume is obtained by issuing a GET request on the volume URI.
GET /api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes/83101900-2f12-4855-838e-36b8a9e04554/bricks HTTP/1.1
Accept: application/xml
Copy to Clipboard Toggle word wrap
The API returns the following representation:
HTTP/1.1 200 OK
Accept: application/xml

<bricks>
    <brick href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes/83101900-2f12-4855-838e-36b8a9e04554/bricks/29311ecf-d8db-4912-902b-b31dba8803d2" id="29311ecf-d8db-4912-902b-b31dba8803d2">
        <actions>
            <link href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes/83101900-2f12-4855-838e-36b8a9e04554/bricks/29311ecf-d8db-4912-902b-b31dba8803d2/replace" rel="replace"/>
        </actions>
        <gluster_volume href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes/83101900-2f12-4855-838e-36b8a9e04554" id="83101900-2f12-4855-838e-36b8a9e04554"/>
        <server_id>fcb46b88-f32e-11e1-918a-0050568c4349</server_id>
        <brick_dir>/tmp/data-brick1</brick_dir>
        <state>UP</state>
    </brick>
    <brick href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes/83101900-2f12-4855-838e-36b8a9e04554/bricks/33f04f44-c78c-4c76-a23c-fe9d750c2fd3" id="33f04f44-c78c-4c76-a23c-fe9d750c2fd3">
        <actions>
            <link href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes/83101900-2f12-4855-838e-36b8a9e04554/bricks/33f04f44-c78c-4c76-a23c-fe9d750c2fd3/replace" rel="replace"/>
        </actions>
        <gluster_volume href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes/83101900-2f12-4855-838e-36b8a9e04554" id="83101900-2f12-4855-838e-36b8a9e04554"/>
        <server_id>de173e6a-fb05-11e1-a2fc-0050568c4349</server_id>
        <brick_dir>/tmp/data-brick2</brick_dir>
        <state>UP</state>
    </brick>
</bricks>
Copy to Clipboard Toggle word wrap

10.4.2. Adding a Brick

The API adds a new brick to a volume in your cluster with a POST request to its URI.
POST /api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes/83101900-2f12-4855-838e-36b8a9e04554/bricks HTTP/1.1
Accept: application/xml
Content-type: application/xml

<bricks>
  <brick>
<server_id>fcb46b88-f32e-11e1-918a-0050568c4349</server_id>
    <brick_dir>/export/data/brick3</brick_dir>
  </brick>
</bricks>
Copy to Clipboard Toggle word wrap
cURL command:
curl -X POST -H "Accept: application/xml" -H "Content-Type: application/xml" -u [USER:PASS] https://[RHGSC HOST]/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes/83101900-2f12-4855-838e-36b8a9e04554/bricks -d "<bricks><brick><server_id>fcb46b88-f32e-11e1-918a-0050568c4349</server_id><brick_dir>/export/data/brick3</brick_dir></brick></bricks>"
The API returns the following representation:
HTTP/1.1 201 Created
Content-Type: application/xml

<bricks>
    <brick href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes/83101900-2f12-4855-838e-36b8a9e04554/bricks/a2a496fc-9df0-446f-b632-da808d65d501" id="a2a496fc-9df0-446f-b632-da808d65d501">
        <actions>
            <link href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes/83101900-2f12-4855-838e-36b8a9e04554/bricks/a2a496fc-9df0-446f-b632-da808d65d501/replace" rel="replace"/>
        </actions>
        <gluster_volume href="/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes/83101900-2f12-4855-838e-36b8a9e04554" id="83101900-2f12-4855-838e-36b8a9e04554"/>
        <server_id>fcb46b88-f32e-11e1-918a-0050568c4349</server_id>
        <brick_dir>/export/data/brick3</brick_dir>
        <state>UP</state>
    </brick>
</bricks>
Copy to Clipboard Toggle word wrap

10.4.3. Removing a Brick

The API removes a brick(s) from a volume with a DELETE request sent to its URI. Before removing a brick, data must be migrated to ensure there is no data loss with a POST request sent to its URI.
POST /api/clusters/44571c63-a110-4fba-9a8c-7b30446ba8bf/glustervolumes/380474af-360b-48fa-a210-9c08b913ffa3/bricks/migrate -d "<action><bricks><brick><name>host:brick_dir</name></brick></bricks></action>"
Copy to Clipboard Toggle word wrap
cURL command:
curl -X POST -H "Accept: application/xml" -H "Content-Type: application/xml" [USER:PASS] https://[RHGSC HOST]/api/clusters/44571c63-a110-4fba-9a8c-7b30446ba8bf/glustervolumes/380474af-360b-48fa-a210-9c08b913ffa3/bricks/migrate -d "<action><bricks><brick><name>host:brick_dir</name></brick></bricks></action>"
The API returns the following representation:
<action>
    <bricks>
        <brick>
            <name>host:brick_dir</name>
        </brick>
    </bricks>
    <job href="/api/jobs/5d070f64-2f9b-44d7-8c44-64829355422d" id="5d070f64-2f9b-44d7-8c44-64829355422d"/>
    <status>
        <state>complete</state>
    </status>
</action>
Copy to Clipboard Toggle word wrap
The status of remove brick (with data migration) is monitored using the job ID and its corresponding step ID by looking at the remove brick step.
/api/jobs/<job_id>/steps
/api/jobs/<job_id>/steps/<step_id> --for step type remove brick
/api/jobs/<job_id>/steps/<step_id>/statistics -- for detail information of remove brick
Copy to Clipboard Toggle word wrap
Now, you can delete the migrated bricks by issuing a DELETE request for a brick(s).
DELETE /api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes/83101900-2f12-4855-838e-36b8a9e04554/bricks
Copy to Clipboard Toggle word wrap
cURL command:
curl -X DELETE -u [USER:PASS] https://[RHGSC HOST]/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95/glustervolumes/83101900-2f12-4855-838e-36b8a9e04554/bricks -d "<bricks><brick><name>host:brick_dir</brick></bricks>"
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

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

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

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

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

会社概要

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

Theme

© 2025 Red Hat