Creating a Gluster Volume

Format

MethodPOST
URL

/tasks/create

Request contentsGlusterVolumeCreate Object
Successful answerTaskResult Object
Unexpected errorHTTP 500

GlusterVolumeCreate Object

Schema

typeStringTask type identifier. In this case, "gvolume_create"
volume_idStringUnique identifier for the new Gluster Volume
image_storage_idStringID of the parent Image Storage
gvolume_nameStringName of the Gluster volume as seen by the OS. If it is the empty string, the volume will be named ${image_storage_id}_${volume_id}
redundancyString

Relation of the number of data bricks to redundant bricks. E.g. "2:1", "4:1", "1:1", etc... The following conditions must be met:

  • The special values "1:1" and "1:2" mean Replica 2 and Replica 3, respectively. Replica 2 volumes are allowed when the number of bricks is even. Replica 3 volumes are allowed when the number of bricks is a multiple of 3.
  • Other values mean creating a Dispersed volume. Redundant bricks must be greater than 0.
  • Data bricks and redundant bricks added must be the number of hosts in the Image Storage. The resulting brick configuration is automatically selected based on this relation and the total number of bricks, so that the access is optimized. E.g. with 3 hosts, a relation of data bricks to redundant bricks of "2:1" and 2 bricks per host would result in a Gluster configuration of "1 x (4 + 2)", but with 3 bricks per host it would result in "3 x (2 + 1)" so that the number of data bricks in each subvolume is a power of 2.
brick_pathsString Array

List of paths where bricks will be found in each host of the Image Storage. The resulting number of bricks of the volume is the length of this list times the number of hosts. Brick paths must:

  • Already exist in every host.
  • Be a directory whose parent is a mount point other than /.

JSON example

{
    "type": "gvolume_create",
    "volume_id": "templates",
    "image_storage_id": "local",
    "gvolume_name": "",
    "redundancy": "2:1",
    "brick_paths": [ "/data/brick1", "/data/brick2", "/data/brick3" ]
}