Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 10. Volumes
The
volumes
collection provides information about volumes in a Red Hat Storage environment.
The following table shows specific elements contained in a volume resource representation.
Element | Type | Description | Properties |
---|---|---|---|
volumeName | relationship | Name of the volume to be created. | ![]() ![]() |
volumeType | relationship | DISTRIBUTE,REPLICATE, DISTRIBUTED_REPLICATE, STRIPE, DISTRIBUTED_STRIPE. | ![]() |
replicaCount | complex | replicaCount is mandatory if volumeType is REPLICATE or DISTRIBUTED_REPLICATE | ![]() |
stripeCount | complex | stripeCount is mandatory if volumeType is STRIPE or DISTRIBUTED_STRIPE | ![]() |
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
22632%2C+Console+Developer+Guide-322-09-2014+17%3A11%3A35Report a bug
10.1. Creating a Volume Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
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
cURL command:
curl -X POST -H "Accept: application/xml" -H "Content-Type: application/xml" -u [USER:PASS] --cacert [CERT] https://[RHSC 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:
22632%2C+Console+Developer+Guide-322-09-2014+17%3A11%3A35Report a bug