StorPool API Reference
Copyright (c) 2014 - 2016 StorPool. All rights reserved.
This reference document describes the StorPool API version 18.01 and
the supported API calls.
- General
- Peers
- List the network peers
- Tasks
- List tasks
- Services
- List all StorPool services
- List all blocked StorPool servers
- Servers
- List all disks on a server
- Describe a disk on a server
- Clients
- Get the current status of all the clients
- Wait until a client updates to the current configuration
- List all the active requests on a client
- Disks
- List all disks
- Describe a disk
- Get disk info
- Eject a disk
- Forget a disk
- Ignore a disk
- Soft-eject a disk
- Pause a disk's soft-eject operation
- Cancel a disk's soft-eject operation
- Set a disk's description
- List all the active requests on a disk
- Start scrubbing process
- Pause scrubbing process
- Continue paused scrubbing process
- Retrim disk
- Volumes
- List all volumes
- Get volume and snapshot status
- List total used space by each volume
- List a single volume
- Describe a volume
- Get volume info
- List the parent snapshots of a volume
- Create a new volume
- Update a volume
- Freeze a volume
- Rebase a volume
- Abandon disk
- Delete a volume
- Backup a volume to a remote location
- Backup a group of volumes to a remote location
- Snapshots
- List all snapshots
- List snapshots space estimations
- List a single snapshot
- Describe a snapshot
- Get snapshot info
- Snapshot a volume
- Update a snapshot
- Rebase a snapshot
- Abandon disk
- Delete a snapshot
- Delete a snapshot by global id
- Create consistent snapshots of a group of volumes
- Copy a snapshot from a remote location
- Allow a remote location to access a local snapshot
- Revoke a remote location's access to a local snapshot
- List exported snapshots
- List the available remote snapshots
- Instruct the remote location that we will no longer use those snapshots
- Attachments
- List all attachments
- Reassign volumes and/or snapshots
- Reassign volumes and/or snapshots with confirmation from the clients
- Placement Groups
- List all placement groups
- Describe a single placement group
- Create and/or update a placement group
- Delete a placement group
- List all fault sets
- Volume Templates
- List all volume templates
- List the status of all volume templates
- Describe a single volume template
- Create a volume template
- Update a volume template
- Delete a volume template
- Volume Relocator
- Get the relocator's status
- List total per disk relocation estimates
- List per disk relocation estimates for a given volume
- List per disk relocation estimates for a given snapshot
- Balancer
- Get the balancer's status
- Set the balancer's status
- List balancer volume and snapshot status
- List total per disk rebalancing estimates
- List per disk rebalancing estimated for a given volume
- List per disk rebalancing estimates for a given snapshot
- Get the disk sets computed by the balancer for a given volume
- Get the disk sets computed by the balancer for a given snapshot
- List balancer allocation groups
- iSCSI
- Get the StorPool iSCSI configuration
- Modify the StorPool iSCSI configuration
- Remote
- List the registered remote locations
- Data Types
General
The StorPool API can be used with any tool that can generate HTTP requests with the GET and POST methods.
The only requirement is to supply the Authorization header and, if required by the request, valid JSON data.
For each call there is an explanation of the HTTP request and response
and an example in raw format as it should be sent to the StorPool management service.
Here are two examples using curl using the GET and POST methods respectively and their counterparts as issued by the StorPool CLI:
curl -H "Authorization: Storpool v1:1556129910218014736" 192.168.42.208:81/ctrl/1.0/DisksList
storpool disk list
curl -d '{"addDisks":["1"]}' -H "Authorization: Storpool v1:1556129910218014736" 192.168.42.208:81/ctrl/1.0/PlacementGroupUpdate/hdd
storpool placementGroup hdd addDisk 1
Python programs may use the API by importing the Python StorPool bindings (use 'pypi install storpool' to install them):
# Use the default StorPool configuration settings
>>>import spapi
>>>api=spapi.Api.fromConfig()
# Use an already-created spconfig.SPConfig object
>>>api=spapi.Api.fromConfig(cfg=cfg)
# Explicitly specify the hostname, port, and authentication string
>>>api=spapi.Api(host='192.168.0.5', port=80, auth='1556560560218011653')
# Use the created API access object
>>>api.peersList()
{
1: {
'networks': {
0: {
'mac': '00:4A:E6:5F:34:C3'
}
}
},
2: {
'networks': {
0: {
'mac': '52:54:E6:5F:34:DF'
}
}
},
3: {
'networks': {
0: {
'mac': '52:57:5F:54:E6:3A'
}
}
}
}
The calls that may be used may be found in the file spapi.py
Note: Requests will sometimes use GET instead of POST and consequently,
will not require JSON. Responses on the other hand always produce JSON content.
Peers
List the network peers (NetworkPeersList)
List the network nodes running the StorPool beacon including information
such as the ID of the node,
the networks it communicates through and the corresponding MAC addresses.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"PeerID": {
"beaconStatus": BeaconNodeStatus,
"clusterStatus": BeaconClusterStatus,
"joined": bool,
"networks": {
"NetID": {
"mac": MAC Address
}, ...
} /* Optional */,
"nonVoting": bool,
"rdma": {
"NetID": {
"guid": GUID,
"state": RdmaState
}, ...
}
}, ...
}
}
- Response Data:
A dict from PeerID to PeerDesc
- Key type: PeerID
- Value type: PeerDesc
- beaconStatus: (BeaconNodeStatus): Whether a beacon is running at all on this node.
- clusterStatus: (BeaconClusterStatus): Whether we consider this node a part of the cluster quorum.
- joined: (bool): Whether the node considers itself a part of the cluster quorum.
- networks: (Optional {NetID: NetDesc}): List of the Ethernet networks that StorPool communicates through on this node.
- nonVoting: (bool): Whether this is a non-voting StorPool node (e.g. client only).
- rdma: List of the RDMA networks that StorPool communicates through on this node.A dict from NetID to RdmaDesc
- Key type: NetID
- Value type: RdmaDesc
Tasks
List tasks (TasksList)
List the currently active recovery tasks. This call will return JSON
data only when there is a relocation in progress. Under normal operation
of the cluster it will return no data.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": [{
"allObjects": int,
"completedObjects": int,
"diskId": DiskID,
"dispatchedObjects": int,
"transactionId": long,
"unresolvedObjects": int /* Internal */
}, ...]
}
- Response Data:
Element type: Task
- allObjects: (int): The number of all the objects that the task is performing actions on.
- completedObjects: (int): The number of objects that the task has finished working on.
- diskId: (DiskID): The disk ID this task is on.
- dispatchedObjects: (int): Objects that the task has started working on.
- transactionId: (long): An ID associated with the currently running task. This ID is the same for all the tasks running on different disks but initiated by the same action (e.g. when reallocating a volume, all tasks associated with that volume will have the same ID).
- unresolvedObjects: (Internal int)
Services
List all StorPool services (ServicesList)
List all the services in the cluster (StorPool servers, clients, management, etc).
If the whole cluster is
not operational this call will return an error.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"bridges": {
"BridgeId": {
"id": BridgeId,
"nodeId": NodeID,
"startTime": Either(null, int),
"status": BridgeStatus,
"version": string
}, ...
},
"clients": {
"ClientID": {
"id": ClientID,
"nodeId": NodeID,
"startTime": Either(null, int),
"status": ClientStatus,
"version": string
}, ...
},
"clusterStatus": ClusterStatus,
"mgmt": {
"MgmtID": {
"active": bool,
"id": MgmtID,
"nodeId": NodeID,
"prio": int /* Internal */,
"startTime": Either(null, int),
"status": ClientStatus,
"version": string
}, ...
},
"servers": {
"ServerID": {
"id": ServerID,
"missingDisks": [DiskID, ...],
"nodeId": NodeID,
"pendingDisks": [DiskID, ...],
"startTime": Either(null, int),
"status": ServerStatus,
"version": string
}, ...
}
}
}
- Response Data:
ClusterStatus
- bridges: A dict from BridgeId to Bridge
- Key type: BridgeId
- Value type: Bridge
- id: (BridgeId): The ID of the service.
- nodeId: (NodeID): The ID of the node on which the service is running.
- startTime: The start time of this service (UNIX timestamp).The value must be of one of the following types: null, int.
- status: (BridgeStatus): The current status of the remote cluster bridge.
- version: (string): The version of the running StorPool service.
- clients: A dict from ClientID to Client
- Key type: ClientID
- Value type: Client
- id: (ClientID): The ID of the service. Currently this is the same as the ID of the node.
- nodeId: (NodeID): The ID of the node on which the service is running.
- startTime: The start time of this service (UNIX timestamp).The value must be of one of the following types: null, int.
- status: (ClientStatus): The current status of the client.
- version: (string): The version of the running StorPool service.
- clusterStatus: (ClusterStatus): The current status of the whole cluster. running - At least one running server; a cluster is formed. waiting - In quorum but negotiations between servers are not over yet. down - No quorum; most likely because more beacons are needed.
- mgmt: A dict from MgmtID to Mgmt
- Key type: MgmtID
- Value type: Mgmt
- active: (bool): If the instance is currently active. For a given cluster one mgmt instance will be active at any given time.
- id: (MgmtID): The ID of the service.
- nodeId: (NodeID): The ID of the node on which the service is running.
- prio: (Internal int)
- startTime: The start time of this service (UNIX timestamp).The value must be of one of the following types: null, int.
- status: (ClientStatus): The current status of the mgmt instance.
- version: (string): The version of the running StorPool service.
- servers: A dict from ServerID to Server
- Key type: ServerID
- Value type: Server
- id: (ServerID): The ID of the service. Currently this is the same as the ID of the node.
- missingDisks: The cluster will remain down until these disks are seen again. This happens in the case of simultaneous failure of the whole cluster (power failure); the servers keep track of where the most recent configuration and data was stored.
- nodeId: (NodeID): The ID of the node on which the service is running.
- pendingDisks: Similar to missingDisks, these are the disks that are ready and waiting for the missing ones.
- startTime: The start time of this service (UNIX timestamp).The value must be of one of the following types: null, int.
- status: (ServerStatus): down - There is no storpool_server daemon running or it is still recovering its drives from a crashed state. waiting - storpool_server is running but waiting for some disks to appear to prevent split-brain situations. booting - No missing disks; the server is in the process of joining the cluster ...
- version: (string): The version of the running StorPool service.
List all blocked StorPool servers (ServersListBlocked)
List the currently active StorPool servers even before the cluster has become
operational, along with information about any missing disks that the cluster
is waiting for.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"bridges": {
"BridgeId": {
"id": BridgeId,
"nodeId": NodeID,
"startTime": Either(null, int),
"status": BridgeStatus,
"version": string
}, ...
},
"clients": {
"ClientID": {
"id": ClientID,
"nodeId": NodeID,
"startTime": Either(null, int),
"status": ClientStatus,
"version": string
}, ...
},
"clusterStatus": ClusterStatus,
"mgmt": {
"MgmtID": {
"active": bool,
"id": MgmtID,
"nodeId": NodeID,
"prio": int /* Internal */,
"startTime": Either(null, int),
"status": ClientStatus,
"version": string
}, ...
},
"servers": {
"ServerID": {
"id": ServerID,
"missingDisks": [DiskID, ...],
"nodeId": NodeID,
"pendingDisks": [DiskID, ...],
"startTime": Either(null, int),
"status": ServerStatus,
"version": string
}, ...
}
}
}
- Response Data:
ClusterStatus
- bridges: A dict from BridgeId to Bridge
- Key type: BridgeId
- Value type: Bridge
- id: (BridgeId): The ID of the service.
- nodeId: (NodeID): The ID of the node on which the service is running.
- startTime: The start time of this service (UNIX timestamp).The value must be of one of the following types: null, int.
- status: (BridgeStatus): The current status of the remote cluster bridge.
- version: (string): The version of the running StorPool service.
- clients: A dict from ClientID to Client
- Key type: ClientID
- Value type: Client
- id: (ClientID): The ID of the service. Currently this is the same as the ID of the node.
- nodeId: (NodeID): The ID of the node on which the service is running.
- startTime: The start time of this service (UNIX timestamp).The value must be of one of the following types: null, int.
- status: (ClientStatus): The current status of the client.
- version: (string): The version of the running StorPool service.
- clusterStatus: (ClusterStatus): The current status of the whole cluster. running - At least one running server; a cluster is formed. waiting - In quorum but negotiations between servers are not over yet. down - No quorum; most likely because more beacons are needed.
- mgmt: A dict from MgmtID to Mgmt
- Key type: MgmtID
- Value type: Mgmt
- active: (bool): If the instance is currently active. For a given cluster one mgmt instance will be active at any given time.
- id: (MgmtID): The ID of the service.
- nodeId: (NodeID): The ID of the node on which the service is running.
- prio: (Internal int)
- startTime: The start time of this service (UNIX timestamp).The value must be of one of the following types: null, int.
- status: (ClientStatus): The current status of the mgmt instance.
- version: (string): The version of the running StorPool service.
- servers: A dict from ServerID to Server
- Key type: ServerID
- Value type: Server
- id: (ServerID): The ID of the service. Currently this is the same as the ID of the node.
- missingDisks: The cluster will remain down until these disks are seen again. This happens in the case of simultaneous failure of the whole cluster (power failure); the servers keep track of where the most recent configuration and data was stored.
- nodeId: (NodeID): The ID of the node on which the service is running.
- pendingDisks: Similar to missingDisks, these are the disks that are ready and waiting for the missing ones.
- startTime: The start time of this service (UNIX timestamp).The value must be of one of the following types: null, int.
- status: (ServerStatus): down - There is no storpool_server daemon running or it is still recovering its drives from a crashed state. waiting - storpool_server is running but waiting for some disks to appear to prevent split-brain situations. booting - No missing disks; the server is in the process of joining the cluster ...
- version: (string): The version of the running StorPool service.
Servers
List all disks on a server (ServerDisksList)
Return detailed information about each disk on the given server.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"DiskID": Either({
"agAllocated": int /* Internal */,
"agCount": int /* Internal */,
"agFree": int /* Internal */,
"agFreeing": int /* Internal */,
"agFull": int /* Internal */,
"agMaxSizeFull": int /* Internal */,
"agMaxSizePartial": int /* Internal */,
"agPartial": int /* Internal */,
"aggregateScore": {
"entries": int,
"space": int,
"total": int
} /* Internal */,
"description": DiskDescritpion,
"device": string,
"empty": bool,
"entriesAllocated": int,
"entriesCount": int,
"entriesFree": int,
"generationLeft": -1,
"id": DiskID,
"isWbc": bool,
"journaled": bool,
"lastScrubCompleted": int,
"model": string,
"noFlush": bool,
"noFua": bool,
"noTrim": bool,
"objectsAllocated": int,
"objectsCount": int,
"objectsFree": int,
"objectsOnDiskSize": long,
"scrubbedBytes": int,
"scrubbingBW": int,
"scrubbingFinishAfter": int,
"scrubbingPaused": bool,
"scrubbingPausedFor": int,
"scrubbingStartedBefore": int,
"sectorsCount": long,
"serial": string,
"serverId": ServerID,
"softEject": DiskSoftEjectStatus,
"ssd": bool,
"wbc": Either(null, {
"maxPages": int,
"pages": int,
"pagesPending": int
}) /* Internal */
}, {
"description": DiskDescritpion,
"generationLeft": long,
"id": DiskID,
"model": string,
"serial": string,
"serverId": ServerID,
"softEject": DiskSoftEjectStatus,
"ssd": bool
}), ...
}
}
- Response Data:
A dict from DiskID to Either(UpDiskSummary, DownDiskSummary)
- Key type: DiskID
- Value type: The value must be of one of the following types: UpDiskSummary, DownDiskSummary.
Subtypes:
- UpDiskSummary
- agAllocated: (Internal int)
- agCount: (Internal int)
- agFree: (Internal int)
- agFreeing: (Internal int)
- agFull: (Internal int)
- agMaxSizeFull: (Internal int)
- agMaxSizePartial: (Internal int)
- agPartial: (Internal int)
- aggregateScore: (Internal DiskAggregateScores)
- description: (DiskDescritpion): A user-defined description of the disk for easier identification of the device.
- device: (string): The name of the physical disk device on the server.
- empty: (bool): True if no volumes or snapshots are on this disk.
- entriesAllocated: (int): Used entries of the disk.
- entriesCount: (int): The maximum amount of entries that can exists on the disk.
- entriesFree: (int): The remaining number of entries that can be stored on the disk.
- generationLeft: (-1): The last cluster generation when the disk was active on a running server, or -1 if the disk is currently active.
- id: (DiskID): The ID of this disk. It is set when the disk is formatted to work with StorPool.
- isWbc: (bool): Whether write-back cache is enabled for this device.
- journaled: (bool): Whether StorPool journaling is enabled for this device.
- lastScrubCompleted: (int): Unix time in seconds when last scrubbing job was completed.
- model: (string): The drive's model.
- noFlush: (bool): Whether write-back cache flushing is disabled for this device.
- noFua: (bool): Whether to issue FUA writes to this device.
- noTrim: (bool): Whether trim-below is disabled for this device.
- objectsAllocated: (int): Used objects of the disk.
- objectsCount: (int): The maximum amount of object that can exists on the disk.
- objectsFree: (int): The remaining number of objects that can be stored on the disk.
- objectsOnDiskSize: (long): Total size occupied by objects. In essence, this is the estimated disk usage by StorPool.
- scrubbedBytes: (int): For current scrubbing job run.
- scrubbingBW: (int): Estimate of the disk BS used for scrubbing B/s.
- scrubbingFinishAfter: (int): Extimate of when the scrubbing job is expected to finish based on scrubbingBW and current disk usage.
- scrubbingPaused: (bool): Is scrubbing currently paused
- scrubbingPausedFor: (int): How many seconds has the current scrubbing job been paused.
- scrubbingStartedBefore: (int): In seconds.
- sectorsCount: (long): The amount of 512-byte sectors on the disk.
- serial: (string): The drive's serial.
- serverId: (ServerID): The ID of the server this disk is currently on. In case the disk is currently down, the last known server ID is reported.
- softEject: (DiskSoftEjectStatus): The status of the soft-eject process.
- ssd: (bool): Whether the device is an SSD.
- wbc: (Internal Either(null, DiskWbcStats))
- DownDiskSummary
- description: (DiskDescritpion): A user-defined description of the disk for easier identification of the device.
- generationLeft: (long): The last cluster generation when the disk was active on a running server, or -1 if the disk is currently active.
- id: (DiskID): The ID of this disk. It is set when the disk is formatted to work with StorPool.
- model: (string): The drive's model.
- serial: (string): The drive's serial.
- serverId: (ServerID): The ID of the server this disk is currently on. In case the disk is currently down, the last known server ID is reported.
- softEject: (DiskSoftEjectStatus): The status of the soft-eject process.
- ssd: (bool): Whether the device is an SSD.
Describe a disk on a server (ServerDiskDescribe)
Return detailed information about a disk on the given server and the
objects on it.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"agAllocated": int /* Internal */,
"agCount": int /* Internal */,
"agFree": int /* Internal */,
"agFreeing": int /* Internal */,
"agFull": int /* Internal */,
"agMaxSizeFull": int /* Internal */,
"agMaxSizePartial": int /* Internal */,
"agPartial": int /* Internal */,
"aggregateScore": {
"entries": int,
"space": int,
"total": int
} /* Internal */,
"description": DiskDescritpion,
"device": string,
"empty": bool,
"entriesAllocated": int,
"entriesCount": int,
"entriesFree": int,
"generationLeft": -1,
"id": DiskID,
"isWbc": bool,
"journaled": bool,
"lastScrubCompleted": int,
"model": string,
"noFlush": bool,
"noFua": bool,
"noTrim": bool,
"objects": {
"int": {
"generation": long,
"objectId": int /* Internal */,
"onDiskSize": int,
"parentVolume": string,
"state": ObjectState,
"storedSize": int,
"version": long,
"volume": string,
"volumeId": long /* Internal */
}, ...
},
"objectsAllocated": int,
"objectsCount": int,
"objectsFree": int,
"objectsOnDiskSize": long,
"scrubbedBytes": int,
"scrubbingBW": int,
"scrubbingFinishAfter": int,
"scrubbingPaused": bool,
"scrubbingPausedFor": int,
"scrubbingStartedBefore": int,
"sectorsCount": long,
"serial": string,
"serverId": ServerID,
"softEject": DiskSoftEjectStatus,
"ssd": bool,
"wbc": Either(null, {
"maxPages": int,
"pages": int,
"pagesPending": int
}) /* Internal */
}
}
- Response Data:
Disk
- agAllocated: (Internal int)
- agCount: (Internal int)
- agFree: (Internal int)
- agFreeing: (Internal int)
- agFull: (Internal int)
- agMaxSizeFull: (Internal int)
- agMaxSizePartial: (Internal int)
- agPartial: (Internal int)
- aggregateScore: (Internal DiskAggregateScores)
- description: (DiskDescritpion): A user-defined description of the disk for easier identification of the device.
- device: (string): The name of the physical disk device on the server.
- empty: (bool): True if no volumes or snapshots are on this disk.
- entriesAllocated: (int): Used entries of the disk.
- entriesCount: (int): The maximum amount of entries that can exists on the disk.
- entriesFree: (int): The remaining number of entries that can be stored on the disk.
- generationLeft: (-1): The last cluster generation when the disk was active on a running server, or -1 if the disk is currently active.
- id: (DiskID): The ID of this disk. It is set when the disk is formatted to work with StorPool.
- isWbc: (bool): Whether write-back cache is enabled for this device.
- journaled: (bool): Whether StorPool journaling is enabled for this device.
- lastScrubCompleted: (int): Unix time in seconds when last scrubbing job was completed.
- model: (string): The drive's model.
- noFlush: (bool): Whether write-back cache flushing is disabled for this device.
- noFua: (bool): Whether to issue FUA writes to this device.
- noTrim: (bool): Whether trim-below is disabled for this device.
- objects: Detailed information about each object on the disk.A dict from int to DiskObject
- Key type: int
- Value type: DiskObject
- generation: (long): The generation when the last write to this object occurred.
- objectId: (Internal int)
- onDiskSize: (int): The space allocated on the disk for the object. This can go up to 32MB.
- parentVolume: (string): The name of the parent snapshot.
- state: (ObjectState)
- storedSize: (int): The size of the actual data in that object (<= onDiskSize).
- version: (long): With each write the version is increased.
- volume: (string): The name of the volume for which the object contains data.
- volumeId: (Internal long)
- objectsAllocated: (int): Used objects of the disk.
- objectsCount: (int): The maximum amount of object that can exists on the disk.
- objectsFree: (int): The remaining number of objects that can be stored on the disk.
- objectsOnDiskSize: (long): Total size occupied by objects. In essence, this is the estimated disk usage by StorPool.
- scrubbedBytes: (int): For current scrubbing job run.
- scrubbingBW: (int): Estimate of the disk BS used for scrubbing B/s.
- scrubbingFinishAfter: (int): Extimate of when the scrubbing job is expected to finish based on scrubbingBW and current disk usage.
- scrubbingPaused: (bool): Is scrubbing currently paused
- scrubbingPausedFor: (int): How many seconds has the current scrubbing job been paused.
- scrubbingStartedBefore: (int): In seconds.
- sectorsCount: (long): The amount of 512-byte sectors on the disk.
- serial: (string): The drive's serial.
- serverId: (ServerID): The ID of the server this disk is currently on. In case the disk is currently down, the last known server ID is reported.
- softEject: (DiskSoftEjectStatus): The status of the soft-eject process.
- ssd: (bool): Whether the device is an SSD.
- wbc: (Internal Either(null, DiskWbcStats))
Clients
Get the current status of all the clients (ClientsConfigDump)
Return the status of each client including its current generation and
generation update status.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": [{
"clientGeneration": long,
"configStatus": client status,
"delay": int,
"generation": long,
"id": ClientID
}, ...]
}
- Response Data:
Element type: ClientConfigStatus
- clientGeneration: (long): The generation of the specific client.
- configStatus: (client status): Whether there is an update of the configuration in progress.
- delay: (int): The time it took for the client generation to reach the cluster generation. Only applicable to ClientConfigWait. Always 0 in ClientsConfigDump.
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- id: (ClientID)
Wait until a client updates to the current configuration (ClientConfigWait)
Return the same JSON as ClientsConfigDump but block until the client
has updated its configuration information to the current generation at
the time of the request.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": [{
"clientGeneration": long,
"configStatus": client status,
"delay": int,
"generation": long,
"id": ClientID
}, ...]
}
- Response Data:
Element type: ClientConfigStatus
- clientGeneration: (long): The generation of the specific client.
- configStatus: (client status): Whether there is an update of the configuration in progress.
- delay: (int): The time it took for the client generation to reach the cluster generation. Only applicable to ClientConfigWait. Always 0 in ClientsConfigDump.
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- id: (ClientID)
List all the active requests on a client (ClientActiveRequests)
List detailed information about the requests being currently processed on
the given client.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"clientId": ClientID,
"requests": [{
"address": long,
"drOp": string /* Internal */,
"msecActive": int,
"op": RequestOp,
"prevState": string /* Internal */,
"requestId": string,
"requestIdx": int,
"size": int,
"state": string /* Internal */,
"volume": Either(VolumeName, SnapshotName)
}, ...]
}
}
- Response Data:
ClientActiveRequests
- clientId: (ClientID)
- requests: A detailed listing of all the requests associated with the given client.
Element type: ActiveRequestDesc
- address: (long): The offset in bytes within the logical volume.
- drOp: (Internal string): An internal attribute used only for debugging. We strongly recommend that you do not use this attribute in any kind of automation.
- msecActive: (int): Time in microseconds since the request was submitted.
- op: (RequestOp): The type of the requested operation; one of read, write, system, merge, entries flush, #bad_state, #bad_drOp
- prevState: (Internal string): An internal attribute used only for debugging. We strongly recommend that you do not use this attribute in any kind of automation.
- requestId: (string): A unique request ID that may be matched between clients and disks.
- requestIdx: (int): A temporary local request identifier for this request on this client or disk.
- size: (int): The size of the request in bytes.
- state: (Internal string): An internal attribute used only for debugging. We strongly recommend that you do not use this attribute in any kind of automation.
- volume: The value must be of one of the following types: VolumeName, SnapshotName.
Disks
List all disks (DisksList)
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"DiskID": Either({
"agAllocated": int /* Internal */,
"agCount": int /* Internal */,
"agFree": int /* Internal */,
"agFreeing": int /* Internal */,
"agFull": int /* Internal */,
"agMaxSizeFull": int /* Internal */,
"agMaxSizePartial": int /* Internal */,
"agPartial": int /* Internal */,
"aggregateScore": {
"entries": int,
"space": int,
"total": int
} /* Internal */,
"description": DiskDescritpion,
"device": string,
"empty": bool,
"entriesAllocated": int,
"entriesCount": int,
"entriesFree": int,
"generationLeft": -1,
"id": DiskID,
"isWbc": bool,
"journaled": bool,
"lastScrubCompleted": int,
"model": string,
"noFlush": bool,
"noFua": bool,
"noTrim": bool,
"objectsAllocated": int,
"objectsCount": int,
"objectsFree": int,
"objectsOnDiskSize": long,
"scrubbedBytes": int,
"scrubbingBW": int,
"scrubbingFinishAfter": int,
"scrubbingPaused": bool,
"scrubbingPausedFor": int,
"scrubbingStartedBefore": int,
"sectorsCount": long,
"serial": string,
"serverId": ServerID,
"softEject": DiskSoftEjectStatus,
"ssd": bool,
"wbc": Either(null, {
"maxPages": int,
"pages": int,
"pagesPending": int
}) /* Internal */
}, {
"description": DiskDescritpion,
"generationLeft": long,
"id": DiskID,
"model": string,
"serial": string,
"serverId": ServerID,
"softEject": DiskSoftEjectStatus,
"ssd": bool
}), ...
}
}
- Response Data:
A dict from DiskID to Either(UpDiskSummary, DownDiskSummary)
- Key type: DiskID
- Value type: The value must be of one of the following types: UpDiskSummary, DownDiskSummary.
Subtypes:
- UpDiskSummary
- agAllocated: (Internal int)
- agCount: (Internal int)
- agFree: (Internal int)
- agFreeing: (Internal int)
- agFull: (Internal int)
- agMaxSizeFull: (Internal int)
- agMaxSizePartial: (Internal int)
- agPartial: (Internal int)
- aggregateScore: (Internal DiskAggregateScores)
- description: (DiskDescritpion): A user-defined description of the disk for easier identification of the device.
- device: (string): The name of the physical disk device on the server.
- empty: (bool): True if no volumes or snapshots are on this disk.
- entriesAllocated: (int): Used entries of the disk.
- entriesCount: (int): The maximum amount of entries that can exists on the disk.
- entriesFree: (int): The remaining number of entries that can be stored on the disk.
- generationLeft: (-1): The last cluster generation when the disk was active on a running server, or -1 if the disk is currently active.
- id: (DiskID): The ID of this disk. It is set when the disk is formatted to work with StorPool.
- isWbc: (bool): Whether write-back cache is enabled for this device.
- journaled: (bool): Whether StorPool journaling is enabled for this device.
- lastScrubCompleted: (int): Unix time in seconds when last scrubbing job was completed.
- model: (string): The drive's model.
- noFlush: (bool): Whether write-back cache flushing is disabled for this device.
- noFua: (bool): Whether to issue FUA writes to this device.
- noTrim: (bool): Whether trim-below is disabled for this device.
- objectsAllocated: (int): Used objects of the disk.
- objectsCount: (int): The maximum amount of object that can exists on the disk.
- objectsFree: (int): The remaining number of objects that can be stored on the disk.
- objectsOnDiskSize: (long): Total size occupied by objects. In essence, this is the estimated disk usage by StorPool.
- scrubbedBytes: (int): For current scrubbing job run.
- scrubbingBW: (int): Estimate of the disk BS used for scrubbing B/s.
- scrubbingFinishAfter: (int): Extimate of when the scrubbing job is expected to finish based on scrubbingBW and current disk usage.
- scrubbingPaused: (bool): Is scrubbing currently paused
- scrubbingPausedFor: (int): How many seconds has the current scrubbing job been paused.
- scrubbingStartedBefore: (int): In seconds.
- sectorsCount: (long): The amount of 512-byte sectors on the disk.
- serial: (string): The drive's serial.
- serverId: (ServerID): The ID of the server this disk is currently on. In case the disk is currently down, the last known server ID is reported.
- softEject: (DiskSoftEjectStatus): The status of the soft-eject process.
- ssd: (bool): Whether the device is an SSD.
- wbc: (Internal Either(null, DiskWbcStats))
- DownDiskSummary
- description: (DiskDescritpion): A user-defined description of the disk for easier identification of the device.
- generationLeft: (long): The last cluster generation when the disk was active on a running server, or -1 if the disk is currently active.
- id: (DiskID): The ID of this disk. It is set when the disk is formatted to work with StorPool.
- model: (string): The drive's model.
- serial: (string): The drive's serial.
- serverId: (ServerID): The ID of the server this disk is currently on. In case the disk is currently down, the last known server ID is reported.
- softEject: (DiskSoftEjectStatus): The status of the soft-eject process.
- ssd: (bool): Whether the device is an SSD.
Describe a disk (DiskDescribe)
List all disks including detailed information about the objects on each disk.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"agAllocated": int /* Internal */,
"agCount": int /* Internal */,
"agFree": int /* Internal */,
"agFreeing": int /* Internal */,
"agFull": int /* Internal */,
"agMaxSizeFull": int /* Internal */,
"agMaxSizePartial": int /* Internal */,
"agPartial": int /* Internal */,
"aggregateScore": {
"entries": int,
"space": int,
"total": int
} /* Internal */,
"description": DiskDescritpion,
"device": string,
"empty": bool,
"entriesAllocated": int,
"entriesCount": int,
"entriesFree": int,
"generationLeft": -1,
"id": DiskID,
"isWbc": bool,
"journaled": bool,
"lastScrubCompleted": int,
"model": string,
"noFlush": bool,
"noFua": bool,
"noTrim": bool,
"objects": {
"int": {
"generation": long,
"objectId": int /* Internal */,
"onDiskSize": int,
"parentVolume": string,
"state": ObjectState,
"storedSize": int,
"version": long,
"volume": string,
"volumeId": long /* Internal */
}, ...
},
"objectsAllocated": int,
"objectsCount": int,
"objectsFree": int,
"objectsOnDiskSize": long,
"scrubbedBytes": int,
"scrubbingBW": int,
"scrubbingFinishAfter": int,
"scrubbingPaused": bool,
"scrubbingPausedFor": int,
"scrubbingStartedBefore": int,
"sectorsCount": long,
"serial": string,
"serverId": ServerID,
"softEject": DiskSoftEjectStatus,
"ssd": bool,
"wbc": Either(null, {
"maxPages": int,
"pages": int,
"pagesPending": int
}) /* Internal */
}
}
- Response Data:
Disk
- agAllocated: (Internal int)
- agCount: (Internal int)
- agFree: (Internal int)
- agFreeing: (Internal int)
- agFull: (Internal int)
- agMaxSizeFull: (Internal int)
- agMaxSizePartial: (Internal int)
- agPartial: (Internal int)
- aggregateScore: (Internal DiskAggregateScores)
- description: (DiskDescritpion): A user-defined description of the disk for easier identification of the device.
- device: (string): The name of the physical disk device on the server.
- empty: (bool): True if no volumes or snapshots are on this disk.
- entriesAllocated: (int): Used entries of the disk.
- entriesCount: (int): The maximum amount of entries that can exists on the disk.
- entriesFree: (int): The remaining number of entries that can be stored on the disk.
- generationLeft: (-1): The last cluster generation when the disk was active on a running server, or -1 if the disk is currently active.
- id: (DiskID): The ID of this disk. It is set when the disk is formatted to work with StorPool.
- isWbc: (bool): Whether write-back cache is enabled for this device.
- journaled: (bool): Whether StorPool journaling is enabled for this device.
- lastScrubCompleted: (int): Unix time in seconds when last scrubbing job was completed.
- model: (string): The drive's model.
- noFlush: (bool): Whether write-back cache flushing is disabled for this device.
- noFua: (bool): Whether to issue FUA writes to this device.
- noTrim: (bool): Whether trim-below is disabled for this device.
- objects: Detailed information about each object on the disk.A dict from int to DiskObject
- Key type: int
- Value type: DiskObject
- generation: (long): The generation when the last write to this object occurred.
- objectId: (Internal int)
- onDiskSize: (int): The space allocated on the disk for the object. This can go up to 32MB.
- parentVolume: (string): The name of the parent snapshot.
- state: (ObjectState)
- storedSize: (int): The size of the actual data in that object (<= onDiskSize).
- version: (long): With each write the version is increased.
- volume: (string): The name of the volume for which the object contains data.
- volumeId: (Internal long)
- objectsAllocated: (int): Used objects of the disk.
- objectsCount: (int): The maximum amount of object that can exists on the disk.
- objectsFree: (int): The remaining number of objects that can be stored on the disk.
- objectsOnDiskSize: (long): Total size occupied by objects. In essence, this is the estimated disk usage by StorPool.
- scrubbedBytes: (int): For current scrubbing job run.
- scrubbingBW: (int): Estimate of the disk BS used for scrubbing B/s.
- scrubbingFinishAfter: (int): Extimate of when the scrubbing job is expected to finish based on scrubbingBW and current disk usage.
- scrubbingPaused: (bool): Is scrubbing currently paused
- scrubbingPausedFor: (int): How many seconds has the current scrubbing job been paused.
- scrubbingStartedBefore: (int): In seconds.
- sectorsCount: (long): The amount of 512-byte sectors on the disk.
- serial: (string): The drive's serial.
- serverId: (ServerID): The ID of the server this disk is currently on. In case the disk is currently down, the last known server ID is reported.
- softEject: (DiskSoftEjectStatus): The status of the soft-eject process.
- ssd: (bool): Whether the device is an SSD.
- wbc: (Internal Either(null, DiskWbcStats))
Get disk info (DiskGetInfo)
List all disks including information about the volumes stored on each disk.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"agAllocated": int /* Internal */,
"agCount": int /* Internal */,
"agFree": int /* Internal */,
"agFreeing": int /* Internal */,
"agFull": int /* Internal */,
"agMaxSizeFull": int /* Internal */,
"agMaxSizePartial": int /* Internal */,
"agPartial": int /* Internal */,
"aggregateScore": {
"entries": int,
"space": int,
"total": int
} /* Internal */,
"description": DiskDescritpion,
"device": string,
"empty": bool,
"entriesAllocated": int,
"entriesCount": int,
"entriesFree": int,
"generationLeft": -1,
"id": DiskID,
"isWbc": bool,
"journaled": bool,
"lastScrubCompleted": int,
"model": string,
"noFlush": bool,
"noFua": bool,
"noTrim": bool,
"objectStates": {
"ObjectState": int, ...
},
"objectsAllocated": int,
"objectsCount": int,
"objectsFree": int,
"objectsOnDiskSize": long,
"scrubbedBytes": int,
"scrubbingBW": int,
"scrubbingFinishAfter": int,
"scrubbingPaused": bool,
"scrubbingPausedFor": int,
"scrubbingStartedBefore": int,
"sectorsCount": long,
"serial": string,
"serverId": ServerID,
"softEject": DiskSoftEjectStatus,
"ssd": bool,
"volumeInfos": {
"string": {
"name": string,
"objectStates": {
"ObjectState": int, ...
},
"objectsCount": long,
"onDiskSize": long,
"storedSize": long
}, ...
},
"wbc": Either(null, {
"maxPages": int,
"pages": int,
"pagesPending": int
}) /* Internal */
}
}
- Response Data:
DiskInfo
- agAllocated: (Internal int)
- agCount: (Internal int)
- agFree: (Internal int)
- agFreeing: (Internal int)
- agFull: (Internal int)
- agMaxSizeFull: (Internal int)
- agMaxSizePartial: (Internal int)
- agPartial: (Internal int)
- aggregateScore: (Internal DiskAggregateScores)
- description: (DiskDescritpion): A user-defined description of the disk for easier identification of the device.
- device: (string): The name of the physical disk device on the server.
- empty: (bool): True if no volumes or snapshots are on this disk.
- entriesAllocated: (int): Used entries of the disk.
- entriesCount: (int): The maximum amount of entries that can exists on the disk.
- entriesFree: (int): The remaining number of entries that can be stored on the disk.
- generationLeft: (-1): The last cluster generation when the disk was active on a running server, or -1 if the disk is currently active.
- id: (DiskID): The ID of this disk. It is set when the disk is formatted to work with StorPool.
- isWbc: (bool): Whether write-back cache is enabled for this device.
- journaled: (bool): Whether StorPool journaling is enabled for this device.
- lastScrubCompleted: (int): Unix time in seconds when last scrubbing job was completed.
- model: (string): The drive's model.
- noFlush: (bool): Whether write-back cache flushing is disabled for this device.
- noFua: (bool): Whether to issue FUA writes to this device.
- noTrim: (bool): Whether trim-below is disabled for this device.
- objectStates: A dict from ObjectState to int
- objectsAllocated: (int): Used objects of the disk.
- objectsCount: (int): The maximum amount of object that can exists on the disk.
- objectsFree: (int): The remaining number of objects that can be stored on the disk.
- objectsOnDiskSize: (long): Total size occupied by objects. In essence, this is the estimated disk usage by StorPool.
- scrubbedBytes: (int): For current scrubbing job run.
- scrubbingBW: (int): Estimate of the disk BS used for scrubbing B/s.
- scrubbingFinishAfter: (int): Extimate of when the scrubbing job is expected to finish based on scrubbingBW and current disk usage.
- scrubbingPaused: (bool): Is scrubbing currently paused
- scrubbingPausedFor: (int): How many seconds has the current scrubbing job been paused.
- scrubbingStartedBefore: (int): In seconds.
- sectorsCount: (long): The amount of 512-byte sectors on the disk.
- serial: (string): The drive's serial.
- serverId: (ServerID): The ID of the server this disk is currently on. In case the disk is currently down, the last known server ID is reported.
- softEject: (DiskSoftEjectStatus): The status of the soft-eject process.
- ssd: (bool): Whether the device is an SSD.
- volumeInfos: Detailed information about the volumes that have data stored on the disk.A dict from str to DiskVolumeInfo
- Key type: string
- Value type: DiskVolumeInfo
- name: (string)
- objectStates: For each state, the number of objects that are in that state. 0-undefined 1-ok 2-outdated 3-in_recovery 4-waiting_for_version 5-waiting_for_disk 6-data_not_present 7-data_lost 8-waiting_for_chain 9-wait_idleA dict from ObjectState to int
- objectsCount: (long): The number of objects of the volume stored on this disk.
- onDiskSize: (long): The space allocated on the disk for the object. This can go up to 32MB.
- storedSize: (long): The size of the actual data in that object (<= onDiskSize).
- wbc: (Internal Either(null, DiskWbcStats))
Eject a disk (DiskEject)
Stop operations on the given disk even if it is not empty.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
Forget a disk (DiskForget)
Remove the disk from any placement groups or volumes that it is used in.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
Ignore a disk (DiskIgnore)
Try to boot the cluster by ignoring this disk.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
Soft-eject a disk (DiskSoftEject)
Stop writes to the given disk and start relocating all the data stored on it to other disks.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
Pause a disk's soft-eject operation (DiskSoftEjectPause)
Temporarily pause the relocation tasks for the disk. This can be helpful in heavy load situations.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
Cancel a disk's soft-eject operation (DiskSoftEjectCancel)
Stop the relocation tasks for the disk and mark it as usable again. After this operation data will be moved back to the disk.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
Set a disk's description (DiskSetDescription)
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
List all the active requests on a disk (DiskActiveRequests)
List detailed information about the requests being currently processed
on the given disk.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"diskId": DiskID,
"requests": [{
"address": long,
"drOp": string /* Internal */,
"msecActive": int,
"op": RequestOp,
"prevState": string /* Internal */,
"requestId": string,
"requestIdx": int,
"size": int,
"state": string /* Internal */,
"volume": Either(VolumeName, SnapshotName)
}, ...]
}
}
- Response Data:
DiskActiveRequests
- diskId: (DiskID)
- requests: A detailed listing of all the requests associated with the given disk.
Element type: ActiveRequestDesc
- address: (long): The offset in bytes within the logical volume.
- drOp: (Internal string): An internal attribute used only for debugging. We strongly recommend that you do not use this attribute in any kind of automation.
- msecActive: (int): Time in microseconds since the request was submitted.
- op: (RequestOp): The type of the requested operation; one of read, write, system, merge, entries flush, #bad_state, #bad_drOp
- prevState: (Internal string): An internal attribute used only for debugging. We strongly recommend that you do not use this attribute in any kind of automation.
- requestId: (string): A unique request ID that may be matched between clients and disks.
- requestIdx: (int): A temporary local request identifier for this request on this client or disk.
- size: (int): The size of the request in bytes.
- state: (Internal string): An internal attribute used only for debugging. We strongly recommend that you do not use this attribute in any kind of automation.
- volume: The value must be of one of the following types: VolumeName, SnapshotName.
Start scrubbing process (DiskScrubStart)
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
Pause scrubbing process (DiskScrubPause)
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
Continue paused scrubbing process (DiskScrubContinue)
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
Retrim disk (DiskRetrim)
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
Volumes
List all volumes (VolumesList)
Return configuration information about all the volumes.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": [{
"bw": Bandwidth,
"creationTimestamp": long,
"flags": int /* Internal */,
"id": long /* Internal */,
"iops": IOPS,
"name": VolumeName,
"objectsCount": int,
"originalParentVolumeId": long /* Internal */,
"parentName": Either("", SnapshotName),
"parentVolumeId": long /* Internal */,
"placeAll": PlacementGroupName,
"placeHead": PlacementGroupName,
"placeTail": PlacementGroupName,
"replication": Replication,
"size": Size,
"tags": {
"VolumeTagName": VolumeTagValue, ...
} /* Optional */,
"templateId": long /* Internal */,
"templateName": Either("", VolumeTemplateName),
"visibleVolumeId": long
}, ...]
}
- Response Data:
Element type: VolumeSummary
- bw: (Bandwidth): Bandwidth limit in KB.
- creationTimestamp: (long): The volume's creation timestamp (UNIX timestamp)
- flags: (Internal int)
- id: (Internal long)
- iops: (IOPS): iops limit.
- name: (VolumeName): The name of this volume.
- objectsCount: (int): The number of objects that the volume/snapshot is comprised of.
- originalParentVolumeId: (Internal long)
- parentName: The volume/snapshot's parent snapshot.The value must be of one of the following types: "", SnapshotName.
- parentVolumeId: (Internal long): The ID of the parent snapshot.
- placeAll: (PlacementGroupName): The name of a placement group which describes the disks to be used for all but the last replica.
- placeHead: (PlacementGroupName): The name of a placement group which describes the disks to be used for the first replica.
- placeTail: (PlacementGroupName): The name of a placement group which describes the disks to be used for the last replica, the one used for reading.
- replication: (Replication): The number of copies/replicas kept.
- size: (Size): The volume/snapshots's size in bytes.
- tags: (Optional {VolumeTagName: VolumeTagValue}): Arbitrary short name/value pairs stored with the volume.
- templateId: (Internal long)
- templateName: The template that the volume/snapshot's settings are taken from.The value must be of one of the following types: "", VolumeTemplateName.
- visibleVolumeId: (long): The ID by which the volume/snapshot was created.
Get volume and snapshot status (VolumesGetStatus)
Return the status of each volume and snapshot.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"Either(VolumeName, SnapshotName)": {
"balancerBlocked": bool,
"decreasedRedundancy": bool,
"downBytes": int,
"downDrives": [DiskID, ...],
"migrating": bool,
"missingDrives": [DiskID, ...],
"missingTargetDrives": [DiskID, ...],
"name": Either(VolumeName, SnapshotName),
"onDiskSize": int,
"replication": Replication,
"size": Size,
"snapshot": bool,
"softEjectingDrives": [DiskID, ...],
"status": VolumeCurentStatus,
"storedSize": int,
"syncingDataBytes": int,
"syncingMetaObjects": int,
"tags": {
"VolumeTagName": VolumeTagValue, ...
} /* Optional */
}, ...
}
}
- Response Data:
A dict from Either(VolumeName, SnapshotName) to VolumeStatus
- Key type: The value must be of one of the following types: VolumeName, SnapshotName.
- Value type: VolumeStatus
- balancerBlocked: (bool): Can this volume be rebalanced, or is rebalancing impossible with the current placement policy due to for example missing or soft-ejecting drives.
- decreasedRedundancy: (bool): True if any of the replicas of the volume are missing.
- downBytes: (int): The number of bytes of the volume that are not accessible at the moment.
- downDrives: The IDs of the drives that are not accessible at the moment but needed by this volume. The volume will be in the 'down' status until all or some of these drives reappear.
- migrating: (bool): True if there are tasks for reallocation of the volume.
- missingDrives: The IDs of the drives that are not accessible at the moment. The volume has all the needed data on the rest of the disks and can continue serving requests but it is in the 'degraded' status.
- missingTargetDrives:
- name: The volume's name.The value must be of one of the following types: VolumeName, SnapshotName.
- onDiskSize: (int): The actual size that the objects of this volume occupy on the disks.
- replication: (Replication): The number of copies/replicas kept.
- size: (Size): The volume's size in bytes.
- snapshot: (bool): True if this response describes a snapshot instead of a volume.
- softEjectingDrives:
- status: (VolumeCurentStatus): up - The volume is operational. up soon - Synchronizing versions of objects after a disk has come back up. data lost - The last copy of some of the data in the volume has been lost. down - Some or all of the objects of the volume are missing and the volume is not in a state to continue serving operations.
- storedSize: (int): The number of bytes of client data on the volume. This does not take into account the StorPool replication and overhead, thus it is never larger than the volume size.
- syncingDataBytes: (int): The total number of bytes in objects currently being synchronized (degraded objects or objects with not yet known version)
- syncingMetaObjects: (int): The number of objects currently being synchronized (degraded objects or objects with not yet known version)
- tags: (Optional {VolumeTagName: VolumeTagValue}): Arbitrary short name/value pairs stored with the volume.
List total used space by each volume (VolumesSpace)
List estimated total virtual space used by each volume.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": [{
"bw": Bandwidth,
"creationTimestamp": long,
"flags": int /* Internal */,
"id": long /* Internal */,
"iops": IOPS,
"name": VolumeName,
"objectsCount": int,
"originalParentVolumeId": long /* Internal */,
"parentName": Either("", SnapshotName),
"parentVolumeId": long /* Internal */,
"placeAll": PlacementGroupName,
"placeHead": PlacementGroupName,
"placeTail": PlacementGroupName,
"replication": Replication,
"size": Size,
"spaceUsed": long,
"storedSize": long,
"tags": {
"VolumeTagName": VolumeTagValue, ...
} /* Optional */,
"templateId": long /* Internal */,
"templateName": Either("", VolumeTemplateName),
"visibleVolumeId": long
}, ...]
}
- Response Data:
Element type: VolumeSpace
- bw: (Bandwidth): Bandwidth limit in KB.
- creationTimestamp: (long): The volume's creation timestamp (UNIX timestamp)
- flags: (Internal int)
- id: (Internal long)
- iops: (IOPS): iops limit.
- name: (VolumeName): The name of this volume.
- objectsCount: (int): The number of objects that the volume/snapshot is comprised of.
- originalParentVolumeId: (Internal long)
- parentName: The volume/snapshot's parent snapshot.The value must be of one of the following types: "", SnapshotName.
- parentVolumeId: (Internal long): The ID of the parent snapshot.
- placeAll: (PlacementGroupName): The name of a placement group which describes the disks to be used for all but the last replica.
- placeHead: (PlacementGroupName): The name of a placement group which describes the disks to be used for the first replica.
- placeTail: (PlacementGroupName): The name of a placement group which describes the disks to be used for the last replica, the one used for reading.
- replication: (Replication): The number of copies/replicas kept.
- size: (Size): The volume/snapshots's size in bytes.
- spaceUsed: (long): The total number of bytes of client data that on this volume. This includes data that is stored in all the volume's parents
- storedSize: (long): The number of bytes of client data on this volume. This does not take into account the StorPool replication and overhead, thus it is never larger than the volume size.
- tags: (Optional {VolumeTagName: VolumeTagValue}): Arbitrary short name/value pairs stored with the volume.
- templateId: (Internal long)
- templateName: The template that the volume/snapshot's settings are taken from.The value must be of one of the following types: "", VolumeTemplateName.
- visibleVolumeId: (long): The ID by which the volume/snapshot was created.
List a single volume (Volume)
Same as VolumeList but only return information about a given volume.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": [{
"bw": Bandwidth,
"creationTimestamp": long,
"flags": int /* Internal */,
"id": long /* Internal */,
"iops": IOPS,
"name": VolumeName,
"objectsCount": int,
"originalParentVolumeId": long /* Internal */,
"parentName": Either("", SnapshotName),
"parentVolumeId": long /* Internal */,
"placeAll": PlacementGroupName,
"placeHead": PlacementGroupName,
"placeTail": PlacementGroupName,
"replication": Replication,
"size": Size,
"tags": {
"VolumeTagName": VolumeTagValue, ...
} /* Optional */,
"templateId": long /* Internal */,
"templateName": Either("", VolumeTemplateName),
"visibleVolumeId": long
}, ...]
}
- Response Data:
Element type: VolumeSummary
- bw: (Bandwidth): Bandwidth limit in KB.
- creationTimestamp: (long): The volume's creation timestamp (UNIX timestamp)
- flags: (Internal int)
- id: (Internal long)
- iops: (IOPS): iops limit.
- name: (VolumeName): The name of this volume.
- objectsCount: (int): The number of objects that the volume/snapshot is comprised of.
- originalParentVolumeId: (Internal long)
- parentName: The volume/snapshot's parent snapshot.The value must be of one of the following types: "", SnapshotName.
- parentVolumeId: (Internal long): The ID of the parent snapshot.
- placeAll: (PlacementGroupName): The name of a placement group which describes the disks to be used for all but the last replica.
- placeHead: (PlacementGroupName): The name of a placement group which describes the disks to be used for the first replica.
- placeTail: (PlacementGroupName): The name of a placement group which describes the disks to be used for the last replica, the one used for reading.
- replication: (Replication): The number of copies/replicas kept.
- size: (Size): The volume/snapshots's size in bytes.
- tags: (Optional {VolumeTagName: VolumeTagValue}): Arbitrary short name/value pairs stored with the volume.
- templateId: (Internal long)
- templateName: The template that the volume/snapshot's settings are taken from.The value must be of one of the following types: "", VolumeTemplateName.
- visibleVolumeId: (long): The ID by which the volume/snapshot was created.
Describe a volume (VolumeDescribe)
Return detailed information about the distribution of the volume's data on
the disks.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"bw": Bandwidth,
"creationTimestamp": long,
"flags": int /* Internal */,
"id": long /* Internal */,
"iops": IOPS,
"name": VolumeName,
"objects": [[DiskID, ...], ...],
"objectsCount": int,
"originalParentVolumeId": long /* Internal */,
"parentName": Either("", SnapshotName),
"parentVolumeId": long /* Internal */,
"placeAll": PlacementGroupName,
"placeHead": PlacementGroupName,
"placeTail": PlacementGroupName,
"replication": Replication,
"size": Size,
"tags": {
"VolumeTagName": VolumeTagValue, ...
} /* Optional */,
"targetDiskSets": [[DiskID, ...], ...],
"templateId": long /* Internal */,
"templateName": Either("", VolumeTemplateName),
"visibleVolumeId": long
}
}
- Response Data:
Volume
- bw: (Bandwidth): Bandwidth limit in KB.
- creationTimestamp: (long): The volume's creation timestamp (UNIX timestamp)
- flags: (Internal int)
- id: (Internal long)
- iops: (IOPS): iops limit.
- name: (VolumeName): The name of this volume.
- objects: Where each object is actually stored.
- objectsCount: (int): The number of objects that the volume/snapshot is comprised of.
- originalParentVolumeId: (Internal long)
- parentName: The volume/snapshot's parent snapshot.The value must be of one of the following types: "", SnapshotName.
- parentVolumeId: (Internal long): The ID of the parent snapshot.
- placeAll: (PlacementGroupName): The name of a placement group which describes the disks to be used for all but the last replica.
- placeHead: (PlacementGroupName): The name of a placement group which describes the disks to be used for the first replica.
- placeTail: (PlacementGroupName): The name of a placement group which describes the disks to be used for the last replica, the one used for reading.
- replication: (Replication): The number of copies/replicas kept.
- size: (Size): The volume/snapshots's size in bytes.
- tags: (Optional {VolumeTagName: VolumeTagValue}): Arbitrary short name/value pairs stored with the volume.
- targetDiskSets: Sets of disks that the volume's data should be stored on.
- templateId: (Internal long)
- templateName: The template that the volume/snapshot's settings are taken from.The value must be of one of the following types: "", VolumeTemplateName.
- visibleVolumeId: (long): The ID by which the volume/snapshot was created.
Get volume info (VolumeGetInfo)
Return general information about the distribution of the volume's data on
the disks.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"bw": Bandwidth,
"creationTimestamp": long,
"disksCount": int,
"flags": int /* Internal */,
"id": long /* Internal */,
"iops": IOPS,
"name": VolumeName,
"objectsCount": int,
"objectsPerChain": [{
"count": int,
"disks": [DiskID, ...]
}, ...],
"objectsPerDisk": {
"DiskID": int, ...
},
"objectsPerDiskSet": [{
"count": int,
"disks": [DiskID, ...]
}, ...],
"originalParentVolumeId": long /* Internal */,
"parentName": Either("", SnapshotName),
"parentVolumeId": long /* Internal */,
"placeAll": PlacementGroupName,
"placeHead": PlacementGroupName,
"placeTail": PlacementGroupName,
"replication": Replication,
"size": Size,
"tags": {
"VolumeTagName": VolumeTagValue, ...
} /* Optional */,
"templateId": long /* Internal */,
"templateName": Either("", VolumeTemplateName),
"visibleVolumeId": long
}
}
- Response Data:
VolumeInfo
- bw: (Bandwidth): Bandwidth limit in KB.
- creationTimestamp: (long): The volume's creation timestamp (UNIX timestamp)
- disksCount: (int)
- flags: (Internal int)
- id: (Internal long)
- iops: (IOPS): iops limit.
- name: (VolumeName): The name of this volume.
- objectsCount: (int): The number of objects that the volume/snapshot is comprised of.
- objectsPerChain:
Element type: VolumeChainStat
- count: (int): The number of objects on the disks.
- disks: IDs of the disks.
- objectsPerDisk: A dict from DiskID to int
- objectsPerDiskSet:
Element type: VolumeChainStat
- count: (int): The number of objects on the disks.
- disks: IDs of the disks.
- originalParentVolumeId: (Internal long)
- parentName: The volume/snapshot's parent snapshot.The value must be of one of the following types: "", SnapshotName.
- parentVolumeId: (Internal long): The ID of the parent snapshot.
- placeAll: (PlacementGroupName): The name of a placement group which describes the disks to be used for all but the last replica.
- placeHead: (PlacementGroupName): The name of a placement group which describes the disks to be used for the first replica.
- placeTail: (PlacementGroupName): The name of a placement group which describes the disks to be used for the last replica, the one used for reading.
- replication: (Replication): The number of copies/replicas kept.
- size: (Size): The volume/snapshots's size in bytes.
- tags: (Optional {VolumeTagName: VolumeTagValue}): Arbitrary short name/value pairs stored with the volume.
- templateId: (Internal long)
- templateName: The template that the volume/snapshot's settings are taken from.The value must be of one of the following types: "", VolumeTemplateName.
- visibleVolumeId: (long): The ID by which the volume/snapshot was created.
List the parent snapshots of a volume (VolumeListSnapshots)
List a volume's parent snapshots in the same format as
VolumeList
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": [{
"autoName": bool,
"bound": bool,
"bw": Bandwidth,
"creationTimestamp": long,
"deleted": bool,
"flags": int /* Internal */,
"globalId": Global Volume Id,
"id": long /* Internal */,
"iops": IOPS,
"name": SnapshotName,
"objectsCount": int,
"onVolume": VolumeName,
"originalParentVolumeId": long /* Internal */,
"parentName": Either("", SnapshotName),
"parentVolumeId": long /* Internal */,
"placeAll": PlacementGroupName,
"placeHead": PlacementGroupName,
"placeTail": PlacementGroupName,
"replication": Replication,
"size": Size,
"tags": {
"VolumeTagName": VolumeTagValue, ...
} /* Optional */,
"targetDeleteDate": int /* Optional */,
"templateId": long /* Internal */,
"templateName": Either("", VolumeTemplateName),
"transient": bool,
"visibleVolumeId": long
}, ...]
}
- Response Data:
Element type: SnapshotSummary
- autoName: (bool): Is this snapshot anonymous.
- bound: (bool): Is this a bound snapshot. Bound snapshots are garbage-collected as soon as they remain childless and are no longer attached.
- bw: (Bandwidth): Bandwidth limit in KB.
- creationTimestamp: (long): The volume's creation timestamp (UNIX timestamp)
- deleted: (bool): Is this snapshot currently being deleted.
- flags: (Internal int)
- globalId: (Global Volume Id): The global snapshot identifier.
- id: (Internal long)
- iops: (IOPS): iops limit.
- name: (SnapshotName): The name of this snapshot
- objectsCount: (int): The number of objects that the volume/snapshot is comprised of.
- onVolume: (VolumeName): The name of the volume that this is a parent of.
- originalParentVolumeId: (Internal long)
- parentName: The volume/snapshot's parent snapshot.The value must be of one of the following types: "", SnapshotName.
- parentVolumeId: (Internal long): The ID of the parent snapshot.
- placeAll: (PlacementGroupName): The name of a placement group which describes the disks to be used for all but the last replica.
- placeHead: (PlacementGroupName): The name of a placement group which describes the disks to be used for the first replica.
- placeTail: (PlacementGroupName): The name of a placement group which describes the disks to be used for the last replica, the one used for reading.
- replication: (Replication): The number of copies/replicas kept.
- size: (Size): The volume/snapshots's size in bytes.
- tags: (Optional {VolumeTagName: VolumeTagValue}): Arbitrary short name/value pairs stored with the volume.
- targetDeleteDate: (Optional int): Scheduled date for the snapshot to be deleted. Unix timestamp
- templateId: (Internal long)
- templateName: The template that the volume/snapshot's settings are taken from.The value must be of one of the following types: "", VolumeTemplateName.
- transient: (bool): Is this a transient snapshot. Transient snapshots are internally created when cloning a volume. They cannot be attached as they may be garbage-collected at any time.
- visibleVolumeId: (long): The ID by which the volume/snapshot was created.
Create a new volume (VolumeCreate)
- Request:
- Example HTTP Request:
POST /ctrl/1.0/VolumeCreate HTTP/1.0
Host: SP_API_HOST:SP_API_PORT
Authorization: Storpool v1:SP_AUTH_TOKEN
Content-Length: LENGTH
{
"baseOn": VolumeName /* Optional */,
"bw": Bandwidth /* Optional */,
"iops": IOPS /* Optional */,
"name": VolumeName,
"parent": SnapshotName /* Optional */,
"placeAll": PlacementGroupName /* Optional */,
"placeHead": PlacementGroupName /* Optional */,
"placeTail": PlacementGroupName /* Optional */,
"replication": Replication /* Optional */,
"reuseServer": bool /* Optional */,
"size": Size /* Optional */,
"tags": {
"VolumeTagName": VolumeTagValue, ...
} /* Optional */,
"template": VolumeTemplateName /* Optional */
}
- Method: POST
- Path: /ctrl/1.0/VolumeCreate
- Arguments: No arguments
- JSON: VolumeCreateDesc
- baseOn: (Optional VolumeName): The name of an already existing volume that the new volume is to be a copy of.
- bw: (Optional Bandwidth): Bandwidth limit in KB.
- iops: (Optional IOPS): iops limit.
- name: (VolumeName): The name of the volume to be created.
- parent: (Optional SnapshotName): The name of the snapshot that the new volume is based on.
- placeAll: (Optional PlacementGroupName): The name of a placement group which describes the disks to be used for all but the last replica.
- placeHead: (Optional PlacementGroupName): The name of a placement group which describes the disks to be used for the first replica.
- placeTail: (Optional PlacementGroupName): The name of a placement group which describes the disks to be used for the last replica, the one used for reading.
- replication: (Optional Replication): The number of copies/replicas kept.
- reuseServer: (Optional bool): allow placement of replicas on same server.
- size: (Optional Size): The volume's size in bytes.
- tags: (Optional {VolumeTagName: VolumeTagValue}): Optional name=value tags.
- template: (Optional VolumeTemplateName): The name of the template that the settings of the new volume are based on.
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"autoName": SnapshotName /* Optional */,
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOkVolumeCreate
- autoName: (Optional SnapshotName): The name of the transient snapshot used during the creation of the volume.
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
Update a volume (VolumeUpdate)
Alter the configuration of an existing volume.
- Request:
- Example HTTP Request:
POST /ctrl/1.0/VolumeUpdate/{volumeName} HTTP/1.0
Host: SP_API_HOST:SP_API_PORT
Authorization: Storpool v1:SP_AUTH_TOKEN
Content-Length: LENGTH
{
"bw": Bandwidth /* Optional */,
"iops": IOPS /* Optional */,
"placeAll": PlacementGroupName /* Optional */,
"placeHead": PlacementGroupName /* Optional */,
"placeTail": PlacementGroupName /* Optional */,
"rename": VolumeName /* Optional */,
"replication": Replication /* Optional */,
"reuseServer": bool /* Optional */,
"shrinkOk": bool /* Optional */,
"size": Size /* Optional */,
"sizeAdd": SizeAdd /* Optional */,
"tags": {
"VolumeTagName": VolumeTagValue, ...
} /* Optional */,
"template": VolumeTemplateName /* Optional */
}
- Method: POST
- Path: /ctrl/1.0/VolumeUpdate/{volumeName}
- Arguments:
- volumeName - VolumeName: a string(200), matching ^\#?[A-Za-z0-9_\-.:]+$, except {list, status}
- JSON: VolumeUpdateDesc
- bw: (Optional Bandwidth): Bandwidth limit in KB.
- iops: (Optional IOPS): iops limit.
- placeAll: (Optional PlacementGroupName): The name of a placement group which describes the disks to be used for all but the last replica.
- placeHead: (Optional PlacementGroupName): The name of a placement group which describes the disks to be used for the first replica.
- placeTail: (Optional PlacementGroupName): The name of a placement group which describes the disks to be used for the last replica, the one used for reading.
- rename: (Optional VolumeName): The new name to be set.
- replication: (Optional Replication): The number of copies/replicas kept.
- reuseServer: (Optional bool): allow placement of replicas on same server.
- shrinkOk: (Optional bool)
- size: (Optional Size): The new size in bytes.
- sizeAdd: (Optional SizeAdd): The number of bytes that the volume's size should be increased by.
- tags: (Optional {VolumeTagName: VolumeTagValue}): Optional name=value tags.
- template: (Optional VolumeTemplateName): The new template that the volume's settings should be based on.
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
Freeze a volume (VolumeFreeze)
Convert the volume to a snapshot
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
Rebase a volume (VolumeRebase)
Change the parent of the volume by choosing from the ones higher in
the hierarchy or by rebasing it to no parent.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
Abandon disk (VolumeAbandonDisk)
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
Delete a volume (VolumeDelete)
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
Backup a volume to a remote location (VolumeBackup)
- Request:
- Example HTTP Request:
POST /ctrl/1.0/VolumeBackup HTTP/1.0
Host: SP_API_HOST:SP_API_PORT
Authorization: Storpool v1:SP_AUTH_TOKEN
Content-Length: LENGTH
{
"location": RemoteLocationName,
"tags": {
"VolumeTagName": VolumeTagValue, ...
} /* Optional */,
"volume": VolumeName
}
- Method: POST
- Path: /ctrl/1.0/VolumeBackup
- Arguments: No arguments
- JSON: VolumeBackupDesc
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"autoName": SnapshotName /* Optional */,
"generation": long,
"info": string /* Optional */,
"ok": true,
"remoteId": Global Volume Id /* Optional */
}
}
- Response Data:
ApiOkVolumeBackup
- autoName: (Optional SnapshotName): The name of the transient snapshot used during the creation of the volume.
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
- remoteId: (Optional Global Volume Id): The globally unique id of the backup
Backup a group of volumes to a remote location (VolumesGroupBackup)
- Request:
- Example HTTP Request:
POST /ctrl/1.0/VolumesGroupBackup HTTP/1.0
Host: SP_API_HOST:SP_API_PORT
Authorization: Storpool v1:SP_AUTH_TOKEN
Content-Length: LENGTH
{
"location": RemoteLocationName,
"tags": {
"VolumeTagName": VolumeTagValue, ...
} /* Optional */,
"volumes": [VolumeName, ...]
}
- Method: POST
- Path: /ctrl/1.0/VolumesGroupBackup
- Arguments: No arguments
- JSON: VolumesGroupBackupDesc
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"backups": {
"VolumeName": {
"remoteId": Global Volume Id
}, ...
},
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOkVolumesGroupBackup
- backups: The mapping of volume names to backup id.A dict from VolumeName to VolumesGroupBackupSingle
- Key type: VolumeName
- Value type: VolumesGroupBackupSingle
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
Snapshots
Snapshots in their essence are very similar to volumes in the sense
that many operations supported by volumes are also supported by
snapshots (all except write-related operations). They can not be
modified and play an essential role in copy-on-write scenarios.
List all snapshots (SnapshotsList)
List all the snapshots in the cluster in the same
format as VolumeList.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": [{
"autoName": bool,
"bound": bool,
"bw": Bandwidth,
"creationTimestamp": long,
"deleted": bool,
"flags": int /* Internal */,
"globalId": Global Volume Id,
"id": long /* Internal */,
"iops": IOPS,
"name": SnapshotName,
"objectsCount": int,
"onVolume": VolumeName,
"originalParentVolumeId": long /* Internal */,
"parentName": Either("", SnapshotName),
"parentVolumeId": long /* Internal */,
"placeAll": PlacementGroupName,
"placeHead": PlacementGroupName,
"placeTail": PlacementGroupName,
"replication": Replication,
"size": Size,
"tags": {
"VolumeTagName": VolumeTagValue, ...
} /* Optional */,
"targetDeleteDate": int /* Optional */,
"templateId": long /* Internal */,
"templateName": Either("", VolumeTemplateName),
"transient": bool,
"visibleVolumeId": long
}, ...]
}
- Response Data:
Element type: SnapshotSummary
- autoName: (bool): Is this snapshot anonymous.
- bound: (bool): Is this a bound snapshot. Bound snapshots are garbage-collected as soon as they remain childless and are no longer attached.
- bw: (Bandwidth): Bandwidth limit in KB.
- creationTimestamp: (long): The volume's creation timestamp (UNIX timestamp)
- deleted: (bool): Is this snapshot currently being deleted.
- flags: (Internal int)
- globalId: (Global Volume Id): The global snapshot identifier.
- id: (Internal long)
- iops: (IOPS): iops limit.
- name: (SnapshotName): The name of this snapshot
- objectsCount: (int): The number of objects that the volume/snapshot is comprised of.
- onVolume: (VolumeName): The name of the volume that this is a parent of.
- originalParentVolumeId: (Internal long)
- parentName: The volume/snapshot's parent snapshot.The value must be of one of the following types: "", SnapshotName.
- parentVolumeId: (Internal long): The ID of the parent snapshot.
- placeAll: (PlacementGroupName): The name of a placement group which describes the disks to be used for all but the last replica.
- placeHead: (PlacementGroupName): The name of a placement group which describes the disks to be used for the first replica.
- placeTail: (PlacementGroupName): The name of a placement group which describes the disks to be used for the last replica, the one used for reading.
- replication: (Replication): The number of copies/replicas kept.
- size: (Size): The volume/snapshots's size in bytes.
- tags: (Optional {VolumeTagName: VolumeTagValue}): Arbitrary short name/value pairs stored with the volume.
- targetDeleteDate: (Optional int): Scheduled date for the snapshot to be deleted. Unix timestamp
- templateId: (Internal long)
- templateName: The template that the volume/snapshot's settings are taken from.The value must be of one of the following types: "", VolumeTemplateName.
- transient: (bool): Is this a transient snapshot. Transient snapshots are internally created when cloning a volume. They cannot be attached as they may be garbage-collected at any time.
- visibleVolumeId: (long): The ID by which the volume/snapshot was created.
List snapshots space estimations (SnapshotsSpace)
List estimated virtual space used by each snapshot.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": [{
"autoName": bool,
"bound": bool,
"bw": Bandwidth,
"creationTimestamp": long,
"deleted": bool,
"flags": int /* Internal */,
"globalId": Global Volume Id,
"id": long /* Internal */,
"iops": IOPS,
"name": SnapshotName,
"objectsCount": int,
"onVolume": VolumeName,
"originalParentVolumeId": long /* Internal */,
"parentName": Either("", SnapshotName),
"parentVolumeId": long /* Internal */,
"placeAll": PlacementGroupName,
"placeHead": PlacementGroupName,
"placeTail": PlacementGroupName,
"replication": Replication,
"size": Size,
"spaceUsed": long,
"storedSize": long,
"tags": {
"VolumeTagName": VolumeTagValue, ...
} /* Optional */,
"targetDeleteDate": int /* Optional */,
"templateId": long /* Internal */,
"templateName": Either("", VolumeTemplateName),
"transient": bool,
"visibleVolumeId": long
}, ...]
}
- Response Data:
Element type: SnapshotSpace
- autoName: (bool): Is this snapshot anonymous.
- bound: (bool): Is this a bound snapshot. Bound snapshots are garbage-collected as soon as they remain childless and are no longer attached.
- bw: (Bandwidth): Bandwidth limit in KB.
- creationTimestamp: (long): The volume's creation timestamp (UNIX timestamp)
- deleted: (bool): Is this snapshot currently being deleted.
- flags: (Internal int)
- globalId: (Global Volume Id): The global snapshot identifier.
- id: (Internal long)
- iops: (IOPS): iops limit.
- name: (SnapshotName): The name of this snapshot
- objectsCount: (int): The number of objects that the volume/snapshot is comprised of.
- onVolume: (VolumeName): The name of the volume that this is a parent of.
- originalParentVolumeId: (Internal long)
- parentName: The volume/snapshot's parent snapshot.The value must be of one of the following types: "", SnapshotName.
- parentVolumeId: (Internal long): The ID of the parent snapshot.
- placeAll: (PlacementGroupName): The name of a placement group which describes the disks to be used for all but the last replica.
- placeHead: (PlacementGroupName): The name of a placement group which describes the disks to be used for the first replica.
- placeTail: (PlacementGroupName): The name of a placement group which describes the disks to be used for the last replica, the one used for reading.
- replication: (Replication): The number of copies/replicas kept.
- size: (Size): The volume/snapshots's size in bytes.
- spaceUsed: (long): The number of bytes of client data that will be freed if this snapshot is deleted.
- storedSize: (long): The number of bytes of client data on this snapshot. This does not take into account the StorPool replication and overhead, thus it is never larger than the volume size.
- tags: (Optional {VolumeTagName: VolumeTagValue}): Arbitrary short name/value pairs stored with the volume.
- targetDeleteDate: (Optional int): Scheduled date for the snapshot to be deleted. Unix timestamp
- templateId: (Internal long)
- templateName: The template that the volume/snapshot's settings are taken from.The value must be of one of the following types: "", VolumeTemplateName.
- transient: (bool): Is this a transient snapshot. Transient snapshots are internally created when cloning a volume. They cannot be attached as they may be garbage-collected at any time.
- visibleVolumeId: (long): The ID by which the volume/snapshot was created.
List a single snapshot (Snapshot)
Same as SnapshotList but only return information about a given snapshot.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": [{
"autoName": bool,
"bound": bool,
"bw": Bandwidth,
"creationTimestamp": long,
"deleted": bool,
"flags": int /* Internal */,
"globalId": Global Volume Id,
"id": long /* Internal */,
"iops": IOPS,
"name": SnapshotName,
"objectsCount": int,
"onVolume": VolumeName,
"originalParentVolumeId": long /* Internal */,
"parentName": Either("", SnapshotName),
"parentVolumeId": long /* Internal */,
"placeAll": PlacementGroupName,
"placeHead": PlacementGroupName,
"placeTail": PlacementGroupName,
"replication": Replication,
"size": Size,
"tags": {
"VolumeTagName": VolumeTagValue, ...
} /* Optional */,
"targetDeleteDate": int /* Optional */,
"templateId": long /* Internal */,
"templateName": Either("", VolumeTemplateName),
"transient": bool,
"visibleVolumeId": long
}, ...]
}
- Response Data:
Element type: SnapshotSummary
- autoName: (bool): Is this snapshot anonymous.
- bound: (bool): Is this a bound snapshot. Bound snapshots are garbage-collected as soon as they remain childless and are no longer attached.
- bw: (Bandwidth): Bandwidth limit in KB.
- creationTimestamp: (long): The volume's creation timestamp (UNIX timestamp)
- deleted: (bool): Is this snapshot currently being deleted.
- flags: (Internal int)
- globalId: (Global Volume Id): The global snapshot identifier.
- id: (Internal long)
- iops: (IOPS): iops limit.
- name: (SnapshotName): The name of this snapshot
- objectsCount: (int): The number of objects that the volume/snapshot is comprised of.
- onVolume: (VolumeName): The name of the volume that this is a parent of.
- originalParentVolumeId: (Internal long)
- parentName: The volume/snapshot's parent snapshot.The value must be of one of the following types: "", SnapshotName.
- parentVolumeId: (Internal long): The ID of the parent snapshot.
- placeAll: (PlacementGroupName): The name of a placement group which describes the disks to be used for all but the last replica.
- placeHead: (PlacementGroupName): The name of a placement group which describes the disks to be used for the first replica.
- placeTail: (PlacementGroupName): The name of a placement group which describes the disks to be used for the last replica, the one used for reading.
- replication: (Replication): The number of copies/replicas kept.
- size: (Size): The volume/snapshots's size in bytes.
- tags: (Optional {VolumeTagName: VolumeTagValue}): Arbitrary short name/value pairs stored with the volume.
- targetDeleteDate: (Optional int): Scheduled date for the snapshot to be deleted. Unix timestamp
- templateId: (Internal long)
- templateName: The template that the volume/snapshot's settings are taken from.The value must be of one of the following types: "", VolumeTemplateName.
- transient: (bool): Is this a transient snapshot. Transient snapshots are internally created when cloning a volume. They cannot be attached as they may be garbage-collected at any time.
- visibleVolumeId: (long): The ID by which the volume/snapshot was created.
Describe a snapshot (SnapshotDescribe)
Return detailed information about the distribution of the snapshot's data on the
disks.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"autoName": bool,
"bound": bool,
"bw": Bandwidth,
"creationTimestamp": long,
"deleted": bool,
"flags": int /* Internal */,
"globalId": Global Volume Id,
"id": long /* Internal */,
"iops": IOPS,
"name": SnapshotName,
"objects": [[DiskID, ...], ...],
"objectsCount": int,
"onVolume": VolumeName,
"originalParentVolumeId": long /* Internal */,
"parentName": Either("", SnapshotName),
"parentVolumeId": long /* Internal */,
"placeAll": PlacementGroupName,
"placeHead": PlacementGroupName,
"placeTail": PlacementGroupName,
"replication": Replication,
"size": Size,
"tags": {
"VolumeTagName": VolumeTagValue, ...
} /* Optional */,
"targetDeleteDate": int /* Optional */,
"targetDiskSets": [[DiskID, ...], ...],
"templateId": long /* Internal */,
"templateName": Either("", VolumeTemplateName),
"transient": bool,
"visibleVolumeId": long
}
}
- Response Data:
Snapshot
- autoName: (bool): Is this snapshot anonymous.
- bound: (bool): Is this a bound snapshot. Bound snapshots are garbage-collected as soon as they remain childless and are no longer attached.
- bw: (Bandwidth): Bandwidth limit in KB.
- creationTimestamp: (long): The volume's creation timestamp (UNIX timestamp)
- deleted: (bool): Is this snapshot currently being deleted.
- flags: (Internal int)
- globalId: (Global Volume Id): The global snapshot identifier.
- id: (Internal long)
- iops: (IOPS): iops limit.
- name: (SnapshotName): The name of this snapshot
- objects: Where each object is actually stored.
- objectsCount: (int): The number of objects that the volume/snapshot is comprised of.
- onVolume: (VolumeName): The name of the volume that this is a parent of.
- originalParentVolumeId: (Internal long)
- parentName: The volume/snapshot's parent snapshot.The value must be of one of the following types: "", SnapshotName.
- parentVolumeId: (Internal long): The ID of the parent snapshot.
- placeAll: (PlacementGroupName): The name of a placement group which describes the disks to be used for all but the last replica.
- placeHead: (PlacementGroupName): The name of a placement group which describes the disks to be used for the first replica.
- placeTail: (PlacementGroupName): The name of a placement group which describes the disks to be used for the last replica, the one used for reading.
- replication: (Replication): The number of copies/replicas kept.
- size: (Size): The volume/snapshots's size in bytes.
- tags: (Optional {VolumeTagName: VolumeTagValue}): Arbitrary short name/value pairs stored with the volume.
- targetDeleteDate: (Optional int): Scheduled date for the snapshot to be deleted. Unix timestamp
- targetDiskSets: Sets of disks that the volume's data should be stored on.
- templateId: (Internal long)
- templateName: The template that the volume/snapshot's settings are taken from.The value must be of one of the following types: "", VolumeTemplateName.
- transient: (bool): Is this a transient snapshot. Transient snapshots are internally created when cloning a volume. They cannot be attached as they may be garbage-collected at any time.
- visibleVolumeId: (long): The ID by which the volume/snapshot was created.
Get snapshot info (SnapshotGetInfo)
Return general information about the distribution of the snapshot's data on the
disks.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"autoName": bool,
"bound": bool,
"bw": Bandwidth,
"creationTimestamp": long,
"deleted": bool,
"disksCount": int,
"flags": int /* Internal */,
"globalId": Global Volume Id,
"id": long /* Internal */,
"iops": IOPS,
"name": SnapshotName,
"objectsCount": int,
"objectsPerChain": [{
"count": int,
"disks": [DiskID, ...]
}, ...],
"objectsPerDisk": {
"DiskID": int, ...
},
"objectsPerDiskSet": [{
"count": int,
"disks": [DiskID, ...]
}, ...],
"onVolume": VolumeName,
"originalParentVolumeId": long /* Internal */,
"parentName": Either("", SnapshotName),
"parentVolumeId": long /* Internal */,
"placeAll": PlacementGroupName,
"placeHead": PlacementGroupName,
"placeTail": PlacementGroupName,
"replication": Replication,
"size": Size,
"tags": {
"VolumeTagName": VolumeTagValue, ...
} /* Optional */,
"targetDeleteDate": int /* Optional */,
"templateId": long /* Internal */,
"templateName": Either("", VolumeTemplateName),
"transient": bool,
"visibleVolumeId": long
}
}
- Response Data:
SnapshotInfo
- autoName: (bool): Is this snapshot anonymous.
- bound: (bool): Is this a bound snapshot. Bound snapshots are garbage-collected as soon as they remain childless and are no longer attached.
- bw: (Bandwidth): Bandwidth limit in KB.
- creationTimestamp: (long): The volume's creation timestamp (UNIX timestamp)
- deleted: (bool): Is this snapshot currently being deleted.
- disksCount: (int)
- flags: (Internal int)
- globalId: (Global Volume Id): The global snapshot identifier.
- id: (Internal long)
- iops: (IOPS): iops limit.
- name: (SnapshotName): The name of this snapshot
- objectsCount: (int): The number of objects that the volume/snapshot is comprised of.
- objectsPerChain:
Element type: VolumeChainStat
- count: (int): The number of objects on the disks.
- disks: IDs of the disks.
- objectsPerDisk: A dict from DiskID to int
- objectsPerDiskSet:
Element type: VolumeChainStat
- count: (int): The number of objects on the disks.
- disks: IDs of the disks.
- onVolume: (VolumeName): The name of the volume that this is a parent of.
- originalParentVolumeId: (Internal long)
- parentName: The volume/snapshot's parent snapshot.The value must be of one of the following types: "", SnapshotName.
- parentVolumeId: (Internal long): The ID of the parent snapshot.
- placeAll: (PlacementGroupName): The name of a placement group which describes the disks to be used for all but the last replica.
- placeHead: (PlacementGroupName): The name of a placement group which describes the disks to be used for the first replica.
- placeTail: (PlacementGroupName): The name of a placement group which describes the disks to be used for the last replica, the one used for reading.
- replication: (Replication): The number of copies/replicas kept.
- size: (Size): The volume/snapshots's size in bytes.
- tags: (Optional {VolumeTagName: VolumeTagValue}): Arbitrary short name/value pairs stored with the volume.
- targetDeleteDate: (Optional int): Scheduled date for the snapshot to be deleted. Unix timestamp
- templateId: (Internal long)
- templateName: The template that the volume/snapshot's settings are taken from.The value must be of one of the following types: "", VolumeTemplateName.
- transient: (bool): Is this a transient snapshot. Transient snapshots are internally created when cloning a volume. They cannot be attached as they may be garbage-collected at any time.
- visibleVolumeId: (long): The ID by which the volume/snapshot was created.
Snapshot a volume (VolumeSnapshot)
Create a snapshot of the given volume; the snapshot becomes the parent of
the volume.
- Request:
- Example HTTP Request:
POST /ctrl/1.0/VolumeSnapshot/{volumeName} HTTP/1.0
Host: SP_API_HOST:SP_API_PORT
Authorization: Storpool v1:SP_AUTH_TOKEN
Content-Length: LENGTH
{
"bind": bool /* Optional */,
"deleteAfter": int /* Optional */,
"name": VolumeName /* Optional */,
"tags": {
"VolumeTagName": VolumeTagValue, ...
} /* Optional */,
"targetDeleteDate": int /* Optional */
}
- Method: POST
- Path: /ctrl/1.0/VolumeSnapshot/{volumeName}
- Arguments:
- volumeName - VolumeName: a string(200), matching ^\#?[A-Za-z0-9_\-.:]+$, except {list, status}
- JSON: VolumeSnapshotDesc
- bind: (Optional bool): If true, the lifetime of the newly created snapshot will be bound to the lifetime of its children. As soon as it remains childless the snapshot will be garbage-collected.
- deleteAfter: (Optional int): If not 0 set targetDeleteDate relative to the current time on the mgmt node. This value will be added to the current time as seconds and set as targetDeleteDate.
- name: (Optional VolumeName): The name of the newly created snapshot. If not specified, a name will be auto-generated by the StorPool management service.
- tags: (Optional {VolumeTagName: VolumeTagValue}): Arbitrary short name/value pairs stored with the snapshot.
- targetDeleteDate: (Optional int): If not 0 set absolute targetDeleteDate for the new snapshot. Unix timestamp. targetDeleteDate can not be set in the past
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"autoName": SnapshotName /* Optional */,
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOkVolumeCreate
- autoName: (Optional SnapshotName): The name of the transient snapshot used during the creation of the volume.
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
Update a snapshot (SnapshotUpdate)
Alter the configuration of an existing snapshot.
- Request:
- Example HTTP Request:
POST /ctrl/1.0/SnapshotUpdate/{snapshotName} HTTP/1.0
Host: SP_API_HOST:SP_API_PORT
Authorization: Storpool v1:SP_AUTH_TOKEN
Content-Length: LENGTH
{
"bind": bool /* Optional */,
"bw": Bandwidth /* Optional */,
"deleteAfter": int /* Optional */,
"iops": IOPS /* Optional */,
"placeAll": PlacementGroupName /* Optional */,
"placeHead": PlacementGroupName /* Optional */,
"placeTail": PlacementGroupName /* Optional */,
"rename": VolumeName /* Optional */,
"replication": Replication /* Optional */,
"reuseServer": bool /* Optional */,
"tags": {
"VolumeTagName": VolumeTagValue, ...
} /* Optional */,
"targetDeleteDate": int /* Optional */
}
- Method: POST
- Path: /ctrl/1.0/SnapshotUpdate/{snapshotName}
- Arguments:
- snapshotName - SnapshotName: a string(200), matching ^\*?[A-Za-z0-9_\-.:@]+$, except {list, status}
- JSON: SnapshotUpdateDesc
- bind: (Optional bool): When true bind this snapshot, when false - unbind it. If not set or missing - no change.
- bw: (Optional Bandwidth): Bandwidth limit in KB.
- deleteAfter: (Optional int): set targetDeleteDate relative to the current time on the mgmt node. If not 0 this value will be added to the current time as seconds and set as targetDeleteDate. If 0 it will discard previous targetDeleteDate
- iops: (Optional IOPS): iops limit.
- placeAll: (Optional PlacementGroupName): The name of a placement group which describes the disks to be used for all but the last replica.
- placeHead: (Optional PlacementGroupName): The name of a placement group which describes the disks to be used for the first replica.
- placeTail: (Optional PlacementGroupName): The name of a placement group which describes the disks to be used for the last replica, the one used for reading.
- rename: (Optional VolumeName): The new name to be set.
- replication: (Optional Replication): The number of copies/replicas kept.
- reuseServer: (Optional bool): allow placement of replicas on same server.
- tags: (Optional {VolumeTagName: VolumeTagValue}): Arbitrary short name/value pairs stored with the snapshot.
- targetDeleteDate: (Optional int): set absolute targetDeleteDate, or 0 to disable automatic deleting. Unix timestamp. targetDeleteDate can not be set in the past
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
Rebase a snapshot (SnapshotRebase)
Change the parent of the snapshot by choosing from the ones higher in
the hierarchy or by rebasing it to no parent.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
Abandon disk (VolumeAbandonDisk)
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
Delete a snapshot (SnapshotDelete)
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
Delete a snapshot by global id (SnapshotDeleteById)
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
Create consistent snapshots of a group of volumes (VolumesGroupSnapshot)
- Request:
- Example HTTP Request:
POST /ctrl/1.0/VolumesGroupSnapshot HTTP/1.0
Host: SP_API_HOST:SP_API_PORT
Authorization: Storpool v1:SP_AUTH_TOKEN
Content-Length: LENGTH
{
"volumes": [{
"name": SnapshotName /* Optional */,
"volume": VolumeName
}, ...]
}
- Method: POST
- Path: /ctrl/1.0/VolumesGroupSnapshot
- Arguments: No arguments
- JSON: GroupSnapshotsSpec
- volumes: The volumes to create snapshots of.
Element type: GroupSnapshotSpec
- name: (Optional SnapshotName): The name of the snapshot to create.
- volume: (VolumeName): The name of the volume to create a snapshot of.
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"volumes": [{
"remoteId": Global Volume Id,
"snapshot": SnapshotName /* Optional */,
"volume": VolumeName
}, ...]
}
}
- Response Data:
GroupSnapshotsResult
- volumes: The volumes to create snapshots of.
Element type: GroupSnapshotResult
- remoteId: (Global Volume Id): The globally unique id of the created snapshot.
- snapshot: (Optional SnapshotName): The name of the created snapshot.
- volume: (VolumeName): The name of the source volume.
Copy a snapshot from a remote location (SnapshotFromRemote)
- Request:
- Example HTTP Request:
POST /ctrl/1.0/SnapshotFromRemote HTTP/1.0
Host: SP_API_HOST:SP_API_PORT
Authorization: Storpool v1:SP_AUTH_TOKEN
Content-Length: LENGTH
{
"export": bool /* Optional */,
"name": VolumeName /* Optional */,
"placeAll": PlacementGroupName /* Optional */,
"placeHead": PlacementGroupName /* Optional */,
"placeTail": PlacementGroupName /* Optional */,
"remoteId": Global Volume Id,
"remoteLocation": RemoteLocationName,
"replication": Replication /* Optional */,
"tags": {
"VolumeTagName": VolumeTagValue, ...
} /* Optional */,
"template": VolumeTemplateName /* Optional */
}
- Method: POST
- Path: /ctrl/1.0/SnapshotFromRemote
- Arguments: No arguments
- JSON: SnapshotFromRemoteDesc
- export: (Optional bool): Auto-export the snapshot after creating it. e.g. for backup.
- name: (Optional VolumeName): The name of the new snapshot.
- placeAll: (Optional PlacementGroupName): The name of a placement group which describes the disks to be used for all but the last replica.
- placeHead: (Optional PlacementGroupName): The name of a placement group which describes the disks to be used for the first replica.
- placeTail: (Optional PlacementGroupName): The name of a placement group which describes the disks to be used for the last replica, the one used for reading.
- remoteId: (Global Volume Id): The global snapshot identifier.
- remoteLocation: (RemoteLocationName): The name of the remote location to fetch the snapshot from.
- replication: (Optional Replication)
- tags: (Optional {VolumeTagName: VolumeTagValue}): Arbitrary short name/value pairs stored with the snapshot.
- template: (Optional VolumeTemplateName)
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
Allow a remote location to access a local snapshot (SnapshotExport)
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
Revoke a remote location's access to a local snapshot (SnapshotUnexport)
- Request:
- Example HTTP Request:
POST /ctrl/1.0/SnapshotUnexport HTTP/1.0
Host: SP_API_HOST:SP_API_PORT
Authorization: Storpool v1:SP_AUTH_TOKEN
Content-Length: LENGTH
{
"all": bool /* Optional */,
"force": bool /* Optional */,
"location": RemoteLocationName /* Optional */,
"snapshot": SnapshotName
}
- Method: POST
- Path: /ctrl/1.0/SnapshotUnexport
- Arguments: No arguments
- JSON: SnapshotUnexportDesc
- all: (Optional bool): Revoke access from all locations.
- force: (Optional bool): Don't check if the snapshot is still recovering in the remote location.
- location: (Optional RemoteLocationName): The name of the remote location to revoke access from.
- snapshot: (SnapshotName): The name of the snapshot.
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
List exported snapshots (ExportsList)
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"str, default="exports"": [{
"backingUp": bool /* Optional */,
"globalId": Global Volume Id,
"location": RemoteLocationName,
"snapshot": SnapshotName,
"visibleVolumeId": long /* Internal */,
"volumeId": long /* Internal */
}, ...], ...
}
}
- Response Data:
A dict from str, default="exports" to [Export]
List the available remote snapshots (SnapshotsRemoteList)
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"str, default="snapshots"": [{
"creationTimestamp": long,
"localSnapshot": SnapshotName /* Optional */,
"location": RemoteLocationName,
"name": VolumeName,
"onVolume": VolumeName /* Optional */,
"remoteId": Global Volume Id,
"size": Size
}, ...], ...
}
}
- Response Data:
A dict from str, default="snapshots" to [RemoteSnapshot]
- Key type: str, default="snapshots"
- Value type:
Element type: RemoteSnapshot
- creationTimestamp: (long): The snapshot's creation timestamp (UNIX timestamp).
- localSnapshot: (Optional SnapshotName): The name of the local snapshot (if any) which is a copy of the remote snapshot.
- location: (RemoteLocationName): Where the snapshot is located.
- name: (VolumeName): The name of the snapshot.
- onVolume: (Optional VolumeName): The name of the local volume (if any) on which the snapshot was created.
- remoteId: (Global Volume Id): The global snapshot identifier.
- size: (Size): The snapshots's size in bytes.
Instruct the remote location that we will no longer use those snapshots (SnapshotsRemoteUnexport)
- Request:
- Example HTTP Request:
POST /ctrl/1.0/SnapshotsRemoteUnexport HTTP/1.0
Host: SP_API_HOST:SP_API_PORT
Authorization: Storpool v1:SP_AUTH_TOKEN
Content-Length: LENGTH
{
"remoteSnapshots": [{
"deleteAfter": int /* Optional */,
"globalSnapshotId": Global Volume Id,
"location": RemoteLocationName,
"targetDeleteDate": int /* Optional */
}, ...]
}
- Method: POST
- Path: /ctrl/1.0/SnapshotsRemoteUnexport
- Arguments: No arguments
- JSON: SnapshotsRemoteUnexport
- remoteSnapshots: list of SnapshotRemoteUnexportDesc
Element type: SnapshotRemoteUnexportDesc
- deleteAfter: (Optional int): same as targetDeleteDate, but time in secs relative to current time on the mgmt node
- globalSnapshotId: (Global Volume Id): the id of the snapshot to be unexported
- location: (RemoteLocationName): name of the location to unexport from
- targetDeleteDate: (Optional int): if not 0 instruct the remote location to delete the snapshot at the specified date. Remote side may not allow this due to configuration or the snapshot beeeing used
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
Attachments
List all attachments (AttachmentsList)
List the volumes and snapshots currently attached to clients along with
the read/write rights of each attachment.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": [{
"client": ClientID,
"pos": AttachmentPos,
"rights": AttachmentRights,
"snapshot": bool,
"volume": VolumeName
}, ...]
}
- Response Data:
Element type: AttachmentDesc
- client: (ClientID): The ID of the client on which it is attached.
- pos: (AttachmentPos): The attachment position on the client; used by the StorPool client to form the name of the internal /dev/spN device node.
- rights: (AttachmentRights): Whether the volume is attached as read only or read/write; always ro for snapshots.
- snapshot: (bool): Whether it is a snapshot or a volume.
- volume: (VolumeName): The name of the attached volume.
Reassign volumes and/or snapshots (VolumesReassign)
Perform bulk attach/detach and attachment rights modification.
- Request:
- Example HTTP Request:
POST /ctrl/1.0/VolumesReassign HTTP/1.0
Host: SP_API_HOST:SP_API_PORT
Authorization: Storpool v1:SP_AUTH_TOKEN
Content-Length: LENGTH
[Either({
"detach": Either("all", [ClientID, ...]) /* Optional */,
"force": bool, default=false,
"ro": [ClientID, ...] /* Optional */,
"rw": [ClientID, ...] /* Optional */,
"volume": VolumeName
}, {
"detach": Either("all", [ClientID, ...]) /* Optional */,
"force": bool, default=false,
"ro": [ClientID, ...] /* Optional */,
"snapshot": SnapshotName
}), ...]
- Method: POST
- Path: /ctrl/1.0/VolumesReassign
- Arguments: No arguments
- JSON:
Element type: The value must be of one of the following types: VolumeReassignDesc, SnapshotReassignDesc.
Subtypes:
- VolumeReassignDesc
- detach: (Optional Either("all", [ClientID])): The clients from which to detach the given volume.
- force: (bool, default=false): Whether to force detaching of open volumes.
- ro: (Optional [ClientID]): The clients on which to attach the volume as read only.
- rw: (Optional [ClientID]): The clients on which to attach the volume as read/write.
- volume: (VolumeName): The name of the volume to be reassigned.
- SnapshotReassignDesc
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
Reassign volumes and/or snapshots with confirmation from the clients (VolumesReassignWait)
Perform bulk attach/detach and attachment rights modification and waits for the clients to catch up.
- Request:
- Example HTTP Request:
POST /ctrl/1.0/VolumesReassignWait HTTP/1.0
Host: SP_API_HOST:SP_API_PORT
Authorization: Storpool v1:SP_AUTH_TOKEN
Content-Length: LENGTH
{
"attachTimeout": int /* Optional */,
"reassign": [Either({
"detach": Either("all", [ClientID, ...]) /* Optional */,
"force": bool, default=false,
"ro": [ClientID, ...] /* Optional */,
"rw": [ClientID, ...] /* Optional */,
"volume": VolumeName
}, {
"detach": Either("all", [ClientID, ...]) /* Optional */,
"force": bool, default=false,
"ro": [ClientID, ...] /* Optional */,
"snapshot": SnapshotName
}), ...]
}
- Method: POST
- Path: /ctrl/1.0/VolumesReassignWait
- Arguments: No arguments
- JSON: VolumesReassignWaitDesc
- attachTimeout: (Optional int): The number of seconds to wait for missing clients to appear when attaching to them. If not specified, wait indefinitely. If explicitly set to 0, immediately return successfully even if any clients are missing.
- reassign: The list of volumes and snapshots to modify the attachment settings for.
Element type: The value must be of one of the following types: VolumeReassignDesc, SnapshotReassignDesc.
Subtypes:
- VolumeReassignDesc
- detach: (Optional Either("all", [ClientID])): The clients from which to detach the given volume.
- force: (bool, default=false): Whether to force detaching of open volumes.
- ro: (Optional [ClientID]): The clients on which to attach the volume as read only.
- rw: (Optional [ClientID]): The clients on which to attach the volume as read/write.
- volume: (VolumeName): The name of the volume to be reassigned.
- SnapshotReassignDesc
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
Placement Groups
Placement groups provide a way to specify the disks on which a volume's data
should be stored.
List all placement groups (PlacementGroupsList)
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"PlacementGroupName": {
"disks": [DiskID, ...],
"id": int /* Internal */,
"name": PlacementGroupName
}, ...
}
}
- Response Data:
A dict from PlacementGroupName to PlacementGroup
Describe a single placement group (PlacementGroupDescribe)
Same as PlacementGroupsList but only return information about a given group.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"disks": [DiskID, ...],
"id": int /* Internal */,
"name": PlacementGroupName
}
}
- Response Data:
PlacementGroup
- disks: IDs of the participating disks.
- id: (Internal int)
- name: (PlacementGroupName)
Create and/or update a placement group (PlacementGroupUpdate)
If a group by the specified name does not exist, it will be created.
- Request:
- Example HTTP Request:
POST /ctrl/1.0/PlacementGroupUpdate/{placementGroupName} HTTP/1.0
Host: SP_API_HOST:SP_API_PORT
Authorization: Storpool v1:SP_AUTH_TOKEN
Content-Length: LENGTH
{
"addDisks": [DiskID, ...],
"rename": PlacementGroupName /* Optional */,
"rmDisks": [DiskID, ...]
}
- Method: POST
- Path: /ctrl/1.0/PlacementGroupUpdate/{placementGroupName}
- Arguments:
- placementGroupName - PlacementGroupName: a string(128), matching ^[A-Za-z0-9_\-]+$, except {list}
- JSON: PlacementGroupUpdateDesc
- addDisks: IDs of the disks to add to this group.
- rename: (Optional PlacementGroupName): The new name of the placement group.
- rmDisks: IDs of the disks to be removed from this group.
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
Delete a placement group (PlacementGroupDelete)
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
List all fault sets (FaultSetsList)
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"PlacementGroupName": {
"name": PlacementGroupName,
"servers": [ServerID, ...]
}, ...
}
}
- Response Data:
A dict from PlacementGroupName to FaultSet
Volume Templates
Templates are a set of rules used for creating many similar volumes.
List all volume templates (VolumeTemplatesList)
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": [{
"bw": Bandwidth,
"id": int /* Internal */,
"iops": IOPS,
"name": VolumeTemplateName,
"parentName": Either("", SnapshotName),
"placeAll": PlacementGroupName,
"placeHead": PlacementGroupName,
"placeTail": PlacementGroupName,
"replication": Either("-", Replication),
"reuseServer": bool /* Optional */,
"size": Either("-", Size)
}, ...]
}
- Response Data:
Element type: VolumeTemplateDesc
- bw: (Bandwidth): Bandwidth limit in KB.
- id: (Internal int)
- iops: (IOPS): iops limit.
- name: (VolumeTemplateName): The name of the template.
- parentName: The name of the snapshot on which volumes will be based.The value must be of one of the following types: "", SnapshotName.
- placeAll: (PlacementGroupName): The name of a placement group which describes the disks to be used for all but the last replica.
- placeHead: (PlacementGroupName): The name of a placement group which describes the disks to be used for the first replica.
- placeTail: (PlacementGroupName): The name of a placement group which describes the disks to be used for the last replica, the one used for reading.
- replication: A default number of copies to be kept by StorPool.The value must be of one of the following types: "-", Replication.
- reuseServer: (Optional bool): allow placement of replicas on same server.
- size: A default size for the volumes (in bytes).The value must be of one of the following types: "-", Size.
List the status of all volume templates (VolumeTemplatesStatus)
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": [{
"availablePlaceAll": long,
"availablePlaceHead": long,
"availablePlaceTail": long,
"capacityPlaceAll": long,
"capacityPlaceHead": long,
"capacityPlaceTail": long,
"id": int /* Internal */,
"name": VolumeTemplateName,
"onDiskSize": long,
"placeAll": PlacementGroupName,
"placeHead": PlacementGroupName,
"placeTail": PlacementGroupName,
"removingSnapshotsCount": int,
"replication": Either("-", Replication),
"size": Either(0, Size),
"snapshotsCount": int,
"stored": {
"capacity": int,
"free": int,
"internal": {
"u1": int,
"u2": int,
"u3": int
} /* Internal */,
"placeAll": {
"capacity": int,
"free": int,
"internal": {
"u1": int,
"u2": int,
"u3": int
} /* Internal */
},
"placeHead": {
"capacity": int,
"free": int,
"internal": {
"u1": int,
"u2": int,
"u3": int
} /* Internal */
},
"placeTail": {
"capacity": int,
"free": int,
"internal": {
"u1": int,
"u2": int,
"u3": int
} /* Internal */
}
},
"storedSize": long,
"totalSize": Either(0, Size),
"volumesCount": int
}, ...]
}
- Response Data:
Element type: VolumeTemplateStatusDesc
- availablePlaceAll: (long): An estimate of the available space on all the disks in this template's placeAll placement group.
- availablePlaceHead: (long): An estimate of the available space on all the disks in this template's placeHead placement group.
- availablePlaceTail: (long): An estimate of the available space on all the disks in this template's placeTail placement group.
- capacityPlaceAll: (long): An estimate of the total physical space on all the disks in this template's placeAll placement group.
- capacityPlaceHead: (long): An estimate of the total physical space on all the disks in this template's placeHead placement group.
- capacityPlaceTail: (long): An estimate of the total physical space on all the disks in this template's placeTail placement group.
- id: (Internal int)
- name: (VolumeTemplateName): The name of the template.
- onDiskSize: (long): The actual on-disk number of bytes occupied by all the volumes based on this template.
- placeAll: (PlacementGroupName): The name of a placement group which describes the disks to be used for all but the last replica.
- placeHead: (PlacementGroupName): The name of a placement group which describes the disks to be used for the first replica.
- placeTail: (PlacementGroupName): The name of a placement group which describes the disks to be used for the last replica, the one used for reading.
- removingSnapshotsCount: (int): The number of snapshots based on this template currently being deleted.
- replication: The number of copies to be kept by StorPool if defined for this template, otherwise "-".The value must be of one of the following types: "-", Replication.
- size: The number of bytes of all volumes based on this template, not counting the StorPool replication and checksums overhead.The value must be of one of the following types: 0, Size.
- snapshotsCount: (int): The number of snapshots based on this template (incl. snapshots currently being deleted).
- stored: Estimated client data capacity and free space.
- capacity: (int): Estimated total client data capacity.
- free: (int): Estimated free space remaining.
- internal: (Internal VolumeTemplateSpaceEstInternal)
- placeAll: placeAll placement group estimations.
- placeHead: placeHead placement group estimations.
- placeTail: placeTail placement group estimations.
- storedSize: (long): The number of bytes of client data on all the volumes based on this template. This does not take into account the StorPool replication and overhead, thus it is never larger than the volume size.
- totalSize: The number of bytes of all volumes based on this template, including the StorPool replication overhead.The value must be of one of the following types: 0, Size.
- volumesCount: (int): The number of volumes based on this template.
Describe a single volume template (VolumeTemplateDescribe)
Same as VolumeTemplatesList but only return information about a given template.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"bw": Bandwidth,
"id": int /* Internal */,
"iops": IOPS,
"name": VolumeTemplateName,
"parentName": Either("", SnapshotName),
"placeAll": PlacementGroupName,
"placeHead": PlacementGroupName,
"placeTail": PlacementGroupName,
"replication": Either("-", Replication),
"reuseServer": bool /* Optional */,
"size": Either("-", Size)
}
}
- Response Data:
VolumeTemplateDesc
- bw: (Bandwidth): Bandwidth limit in KB.
- id: (Internal int)
- iops: (IOPS): iops limit.
- name: (VolumeTemplateName): The name of the template.
- parentName: The name of the snapshot on which volumes will be based.The value must be of one of the following types: "", SnapshotName.
- placeAll: (PlacementGroupName): The name of a placement group which describes the disks to be used for all but the last replica.
- placeHead: (PlacementGroupName): The name of a placement group which describes the disks to be used for the first replica.
- placeTail: (PlacementGroupName): The name of a placement group which describes the disks to be used for the last replica, the one used for reading.
- replication: A default number of copies to be kept by StorPool.The value must be of one of the following types: "-", Replication.
- reuseServer: (Optional bool): allow placement of replicas on same server.
- size: A default size for the volumes (in bytes).The value must be of one of the following types: "-", Size.
Create a volume template (VolumeTemplateCreate)
- Request:
- Example HTTP Request:
POST /ctrl/1.0/VolumeTemplateCreate HTTP/1.0
Host: SP_API_HOST:SP_API_PORT
Authorization: Storpool v1:SP_AUTH_TOKEN
Content-Length: LENGTH
{
"bw": Bandwidth /* Optional */,
"iops": IOPS /* Optional */,
"name": VolumeTemplateName,
"parent": SnapshotName /* Optional */,
"placeAll": PlacementGroupName /* Optional */,
"placeHead": PlacementGroupName /* Optional */,
"placeTail": PlacementGroupName /* Optional */,
"replication": Replication /* Optional */,
"reuseServer": bool /* Optional */,
"size": Size /* Optional */,
"tags": {
"VolumeTagName": VolumeTagValue, ...
} /* Optional */
}
- Method: POST
- Path: /ctrl/1.0/VolumeTemplateCreate
- Arguments: No arguments
- JSON: VolumeTemplateCreateDesc
- bw: (Optional Bandwidth): Bandwidth limit in KB.
- iops: (Optional IOPS): iops limit.
- name: (VolumeTemplateName): The name of the new template.
- parent: (Optional SnapshotName): The name of the snapshot on which to base volumes created by this template.
- placeAll: (Optional PlacementGroupName): The name of a placement group which describes the disks to be used for all but the last replica.
- placeHead: (Optional PlacementGroupName): The name of a placement group which describes the disks to be used for the first replica.
- placeTail: (Optional PlacementGroupName): The name of a placement group which describes the disks to be used for the last replica, the one used for reading.
- replication: (Optional Replication): The number of copies/replicas kept.
- reuseServer: (Optional bool): allow placement of replicas on same server.
- size: (Optional Size): A default size for the volumes (in bytes).
- tags: (Optional {VolumeTagName: VolumeTagValue}): Optional name=value tags.
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
Update a volume template (VolumeTemplateUpdate)
Alter the configuration of an existing volume template.
- Request:
- Example HTTP Request:
POST /ctrl/1.0/VolumeTemplateUpdate/{templateName} HTTP/1.0
Host: SP_API_HOST:SP_API_PORT
Authorization: Storpool v1:SP_AUTH_TOKEN
Content-Length: LENGTH
{
"bw": Bandwidth /* Optional */,
"iops": IOPS /* Optional */,
"parent": SnapshotName /* Optional */,
"placeAll": PlacementGroupName /* Optional */,
"placeHead": PlacementGroupName /* Optional */,
"placeTail": PlacementGroupName /* Optional */,
"propagate": bool /* Optional */,
"rename": VolumeTemplateName /* Optional */,
"replication": Replication /* Optional */,
"reuseServer": bool /* Optional */,
"size": Size /* Optional */,
"tags": {
"VolumeTagName": VolumeTagValue, ...
} /* Optional */
}
- Method: POST
- Path: /ctrl/1.0/VolumeTemplateUpdate/{templateName}
- Arguments:
- templateName - VolumeTemplateName: a string(200), matching ^[A-Za-z0-9_\-]+$, except {list}
- JSON: VolumeTemplateUpdateDesc
- bw: (Optional Bandwidth): Bandwidth limit in KB.
- iops: (Optional IOPS): iops limit.
- parent: (Optional SnapshotName): The name of the snapshot on which to base volumes created by this template.
- placeAll: (Optional PlacementGroupName): The name of a placement group which describes the disks to be used for all but the last replica.
- placeHead: (Optional PlacementGroupName): The name of a placement group which describes the disks to be used for the first replica.
- placeTail: (Optional PlacementGroupName): The name of a placement group which describes the disks to be used for the last replica, the one used for reading.
- propagate: (Optional bool): Whether to propagate this change to all the volumes and snapshots using this template.
- rename: (Optional VolumeTemplateName): The new name of the template.
- replication: (Optional Replication): The number of copies/replicas kept.
- reuseServer: (Optional bool): allow placement of replicas on same server.
- size: (Optional Size): A default size for the volumes (in bytes).
- tags: (Optional {VolumeTagName: VolumeTagValue}): Optional name=value tags.
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
Delete a volume template (VolumeTemplateDelete)
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
Volume Relocator
This is a service that moves data when needed, e.g. when
removing or adding disks.
Get the relocator's status (VolumeRelocatorStatus)
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"status": RelocatorStatus,
"volumesToRelocate": int
}
}
- Response Data:
VolumeRelocatorStatus
- status: (RelocatorStatus): 'off' - relocator is currently turned off. 'on' - relocator is on. 'blocked' - relocation is blocked, most likely due to missing drives.
- volumesToRelocate: (int): Number of volumes currently being relocated.
List total per disk relocation estimates (VolumeRelocatorDisksList)
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"DiskID": Either({
"generationLeft": -1,
"id": DiskID,
"objectsAllocated": {
"current": int,
"delta": int,
"target": int,
"toRecover": int
},
"objectsCount": int,
"onDiskSize": {
"current": int,
"delta": int,
"target": int,
"toRecover": int
},
"serverId": ServerID,
"storedSize": {
"current": int,
"delta": int,
"target": int,
"toRecover": int
}
}, {
"generationLeft": long,
"id": DiskID,
"serverId": ServerID
}), ...
}
}
- Response Data:
A dict from DiskID to Either(UpDiskTarget, DownDiskTarget)
- Key type: DiskID
- Value type: The value must be of one of the following types: UpDiskTarget, DownDiskTarget.
Subtypes:
- UpDiskTarget
- generationLeft: (-1): The last cluster generation when the disk was active on a running server. -1 since the disk is currently up.
- id: (DiskID): The ID of this disk.
- objectsAllocated: Statistics about the amount of objects to be allocated on this disk.
- current: (int): The current value.
- delta: (int): The difference between the target and current values.
- target: (int): The target value.
- toRecover: (int): The amount that will have to be recovered to get from the current to the target state.
- objectsCount: (int): The maximum amount of object that can exists on the disk.
- onDiskSize: Statistics about the total amount of space occupied by the objects on this disk.
- current: (int): The current value.
- delta: (int): The difference between the target and current values.
- target: (int): The target value.
- toRecover: (int): The amount that will have to be recovered to get from the current to the target state.
- serverId: (ServerID): The ID of the server this disk was last on.
- storedSize: Statistics about the amount of cilent data to be stored on this disk.
- current: (int): The current value.
- delta: (int): The difference between the target and current values.
- target: (int): The target value.
- toRecover: (int): The amount that will have to be recovered to get from the current to the target state.
- DownDiskTarget
- generationLeft: (long): The last cluster generation when the disk was active on a running server.
- id: (DiskID): The ID of this disk.
- serverId: (ServerID): The ID of the server this disk was last on.
List per disk relocation estimates for a given volume (VolumeRelocatorVolumeDisks)
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"DiskID": Either({
"generationLeft": -1,
"id": DiskID,
"objectsAllocated": {
"current": int,
"delta": int,
"target": int,
"toRecover": int
},
"objectsCount": int,
"onDiskSize": {
"current": int,
"delta": int,
"target": int,
"toRecover": int
},
"serverId": ServerID,
"storedSize": {
"current": int,
"delta": int,
"target": int,
"toRecover": int
}
}, {
"generationLeft": long,
"id": DiskID,
"serverId": ServerID
}), ...
}
}
- Response Data:
A dict from DiskID to Either(UpDiskTarget, DownDiskTarget)
- Key type: DiskID
- Value type: The value must be of one of the following types: UpDiskTarget, DownDiskTarget.
Subtypes:
- UpDiskTarget
- generationLeft: (-1): The last cluster generation when the disk was active on a running server. -1 since the disk is currently up.
- id: (DiskID): The ID of this disk.
- objectsAllocated: Statistics about the amount of objects to be allocated on this disk.
- current: (int): The current value.
- delta: (int): The difference between the target and current values.
- target: (int): The target value.
- toRecover: (int): The amount that will have to be recovered to get from the current to the target state.
- objectsCount: (int): The maximum amount of object that can exists on the disk.
- onDiskSize: Statistics about the total amount of space occupied by the objects on this disk.
- current: (int): The current value.
- delta: (int): The difference between the target and current values.
- target: (int): The target value.
- toRecover: (int): The amount that will have to be recovered to get from the current to the target state.
- serverId: (ServerID): The ID of the server this disk was last on.
- storedSize: Statistics about the amount of cilent data to be stored on this disk.
- current: (int): The current value.
- delta: (int): The difference between the target and current values.
- target: (int): The target value.
- toRecover: (int): The amount that will have to be recovered to get from the current to the target state.
- DownDiskTarget
- generationLeft: (long): The last cluster generation when the disk was active on a running server.
- id: (DiskID): The ID of this disk.
- serverId: (ServerID): The ID of the server this disk was last on.
List per disk relocation estimates for a given snapshot (VolumeRelocatorSnapshotDisks)
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"DiskID": Either({
"generationLeft": -1,
"id": DiskID,
"objectsAllocated": {
"current": int,
"delta": int,
"target": int,
"toRecover": int
},
"objectsCount": int,
"onDiskSize": {
"current": int,
"delta": int,
"target": int,
"toRecover": int
},
"serverId": ServerID,
"storedSize": {
"current": int,
"delta": int,
"target": int,
"toRecover": int
}
}, {
"generationLeft": long,
"id": DiskID,
"serverId": ServerID
}), ...
}
}
- Response Data:
A dict from DiskID to Either(UpDiskTarget, DownDiskTarget)
- Key type: DiskID
- Value type: The value must be of one of the following types: UpDiskTarget, DownDiskTarget.
Subtypes:
- UpDiskTarget
- generationLeft: (-1): The last cluster generation when the disk was active on a running server. -1 since the disk is currently up.
- id: (DiskID): The ID of this disk.
- objectsAllocated: Statistics about the amount of objects to be allocated on this disk.
- current: (int): The current value.
- delta: (int): The difference between the target and current values.
- target: (int): The target value.
- toRecover: (int): The amount that will have to be recovered to get from the current to the target state.
- objectsCount: (int): The maximum amount of object that can exists on the disk.
- onDiskSize: Statistics about the total amount of space occupied by the objects on this disk.
- current: (int): The current value.
- delta: (int): The difference between the target and current values.
- target: (int): The target value.
- toRecover: (int): The amount that will have to be recovered to get from the current to the target state.
- serverId: (ServerID): The ID of the server this disk was last on.
- storedSize: Statistics about the amount of cilent data to be stored on this disk.
- current: (int): The current value.
- delta: (int): The difference between the target and current values.
- target: (int): The target value.
- toRecover: (int): The amount that will have to be recovered to get from the current to the target state.
- DownDiskTarget
- generationLeft: (long): The last cluster generation when the disk was active on a running server.
- id: (DiskID): The ID of this disk.
- serverId: (ServerID): The ID of the server this disk was last on.
Balancer
This is a service that decides when it is a good time to move data.
Get the balancer's status (VolumeBalancerStatus)
- Request:
- Response:
Set the balancer's status (VolumeBalancerStatus)
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
List balancer volume and snapshot status (VolumeBalancerVolumesStatus)
Show which volumes and snapshots will be reallocated by the
current balancer run.
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": [{
"blocked": bool,
"name": Either(VolumeName, SnapshotName),
"objectsCount": int,
"placeAll": PlacementGroupName,
"placeHead": PlacementGroupName,
"placeTail": PlacementGroupName,
"reallocated": bool,
"replication": Replication,
"size": long,
"snapshot": bool
}, ...]
}
- Response Data:
Element type: VolumeBalancerVolumeStatus
- blocked: (bool): Can this volume be rebalanced, or is rebalancing impossible with the current placement policy due to for example missing or soft-ejecting drives.
- name: The volume's name.The value must be of one of the following types: VolumeName, SnapshotName.
- objectsCount: (int): The number of objects that the volume/snapshot is comprised of.
- placeAll: (PlacementGroupName): The name of a placement group which describes the disks to be used for all but the last replica.
- placeHead: (PlacementGroupName): The name of a placement group which describes the disks to be used for the first replica.
- placeTail: (PlacementGroupName): The name of a placement group which describes the disks to be used for the last replica, the one used for reading.
- reallocated: (bool): is this volume/snapshot going to reallocated by the balancing procedure.
- replication: (Replication): The number of copies/replicas kept.
- size: (long): The volume's size in bytes.
- snapshot: (bool): True if this response describes a snapshot instead of a volume.
List total per disk rebalancing estimates (VolumeBalancerDisksList)
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"DiskID": Either({
"generationLeft": -1,
"id": DiskID,
"objectsAllocated": {
"current": int,
"delta": int,
"target": int,
"toRecover": int
},
"objectsCount": int,
"onDiskSize": {
"current": int,
"delta": int,
"target": int,
"toRecover": int
},
"serverId": ServerID,
"storedSize": {
"current": int,
"delta": int,
"target": int,
"toRecover": int
}
}, {
"generationLeft": long,
"id": DiskID,
"serverId": ServerID
}), ...
}
}
- Response Data:
A dict from DiskID to Either(UpDiskTarget, DownDiskTarget)
- Key type: DiskID
- Value type: The value must be of one of the following types: UpDiskTarget, DownDiskTarget.
Subtypes:
- UpDiskTarget
- generationLeft: (-1): The last cluster generation when the disk was active on a running server. -1 since the disk is currently up.
- id: (DiskID): The ID of this disk.
- objectsAllocated: Statistics about the amount of objects to be allocated on this disk.
- current: (int): The current value.
- delta: (int): The difference between the target and current values.
- target: (int): The target value.
- toRecover: (int): The amount that will have to be recovered to get from the current to the target state.
- objectsCount: (int): The maximum amount of object that can exists on the disk.
- onDiskSize: Statistics about the total amount of space occupied by the objects on this disk.
- current: (int): The current value.
- delta: (int): The difference between the target and current values.
- target: (int): The target value.
- toRecover: (int): The amount that will have to be recovered to get from the current to the target state.
- serverId: (ServerID): The ID of the server this disk was last on.
- storedSize: Statistics about the amount of cilent data to be stored on this disk.
- current: (int): The current value.
- delta: (int): The difference between the target and current values.
- target: (int): The target value.
- toRecover: (int): The amount that will have to be recovered to get from the current to the target state.
- DownDiskTarget
- generationLeft: (long): The last cluster generation when the disk was active on a running server.
- id: (DiskID): The ID of this disk.
- serverId: (ServerID): The ID of the server this disk was last on.
List per disk rebalancing estimated for a given volume (VolumeBalancerVolumeDisks)
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"DiskID": Either({
"generationLeft": -1,
"id": DiskID,
"objectsAllocated": {
"current": int,
"delta": int,
"target": int,
"toRecover": int
},
"objectsCount": int,
"onDiskSize": {
"current": int,
"delta": int,
"target": int,
"toRecover": int
},
"serverId": ServerID,
"storedSize": {
"current": int,
"delta": int,
"target": int,
"toRecover": int
}
}, {
"generationLeft": long,
"id": DiskID,
"serverId": ServerID
}), ...
}
}
- Response Data:
A dict from DiskID to Either(UpDiskTarget, DownDiskTarget)
- Key type: DiskID
- Value type: The value must be of one of the following types: UpDiskTarget, DownDiskTarget.
Subtypes:
- UpDiskTarget
- generationLeft: (-1): The last cluster generation when the disk was active on a running server. -1 since the disk is currently up.
- id: (DiskID): The ID of this disk.
- objectsAllocated: Statistics about the amount of objects to be allocated on this disk.
- current: (int): The current value.
- delta: (int): The difference between the target and current values.
- target: (int): The target value.
- toRecover: (int): The amount that will have to be recovered to get from the current to the target state.
- objectsCount: (int): The maximum amount of object that can exists on the disk.
- onDiskSize: Statistics about the total amount of space occupied by the objects on this disk.
- current: (int): The current value.
- delta: (int): The difference between the target and current values.
- target: (int): The target value.
- toRecover: (int): The amount that will have to be recovered to get from the current to the target state.
- serverId: (ServerID): The ID of the server this disk was last on.
- storedSize: Statistics about the amount of cilent data to be stored on this disk.
- current: (int): The current value.
- delta: (int): The difference between the target and current values.
- target: (int): The target value.
- toRecover: (int): The amount that will have to be recovered to get from the current to the target state.
- DownDiskTarget
- generationLeft: (long): The last cluster generation when the disk was active on a running server.
- id: (DiskID): The ID of this disk.
- serverId: (ServerID): The ID of the server this disk was last on.
List per disk rebalancing estimates for a given snapshot (VolumeBalancerSnapshotDisks)
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"DiskID": Either({
"generationLeft": -1,
"id": DiskID,
"objectsAllocated": {
"current": int,
"delta": int,
"target": int,
"toRecover": int
},
"objectsCount": int,
"onDiskSize": {
"current": int,
"delta": int,
"target": int,
"toRecover": int
},
"serverId": ServerID,
"storedSize": {
"current": int,
"delta": int,
"target": int,
"toRecover": int
}
}, {
"generationLeft": long,
"id": DiskID,
"serverId": ServerID
}), ...
}
}
- Response Data:
A dict from DiskID to Either(UpDiskTarget, DownDiskTarget)
- Key type: DiskID
- Value type: The value must be of one of the following types: UpDiskTarget, DownDiskTarget.
Subtypes:
- UpDiskTarget
- generationLeft: (-1): The last cluster generation when the disk was active on a running server. -1 since the disk is currently up.
- id: (DiskID): The ID of this disk.
- objectsAllocated: Statistics about the amount of objects to be allocated on this disk.
- current: (int): The current value.
- delta: (int): The difference between the target and current values.
- target: (int): The target value.
- toRecover: (int): The amount that will have to be recovered to get from the current to the target state.
- objectsCount: (int): The maximum amount of object that can exists on the disk.
- onDiskSize: Statistics about the total amount of space occupied by the objects on this disk.
- current: (int): The current value.
- delta: (int): The difference between the target and current values.
- target: (int): The target value.
- toRecover: (int): The amount that will have to be recovered to get from the current to the target state.
- serverId: (ServerID): The ID of the server this disk was last on.
- storedSize: Statistics about the amount of cilent data to be stored on this disk.
- current: (int): The current value.
- delta: (int): The difference between the target and current values.
- target: (int): The target value.
- toRecover: (int): The amount that will have to be recovered to get from the current to the target state.
- DownDiskTarget
- generationLeft: (long): The last cluster generation when the disk was active on a running server.
- id: (DiskID): The ID of this disk.
- serverId: (ServerID): The ID of the server this disk was last on.
Get the disk sets computed by the balancer for a given volume (VolumeBalancerVolumeDiskSets)
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"balancerDiskSets": [[DiskID, ...], ...],
"blocked": bool,
"currentDiskSets": [[DiskID, ...], ...],
"name": Either(VolumeName, SnapshotName),
"objectsCount": int,
"placeAll": PlacementGroupName,
"placeHead": PlacementGroupName,
"placeTail": PlacementGroupName,
"reallocated": bool,
"replication": Replication,
"size": long,
"snapshot": bool
}
}
- Response Data:
VolumeBalancerVolumeDiskSets
- balancerDiskSets: The new sets of disks that the volume's data should be stored on according to the rebalancing algorithm.
- blocked: (bool): Can this volume be rebalanced, or is rebalancing impossible with the current placement policy due to for example missing or soft-ejecting drives.
- currentDiskSets: The current sets of disks that the volume's data should be stored on.
- name: The volume's name.The value must be of one of the following types: VolumeName, SnapshotName.
- objectsCount: (int): The number of objects that the volume/snapshot is comprised of.
- placeAll: (PlacementGroupName): The name of a placement group which describes the disks to be used for all but the last replica.
- placeHead: (PlacementGroupName): The name of a placement group which describes the disks to be used for the first replica.
- placeTail: (PlacementGroupName): The name of a placement group which describes the disks to be used for the last replica, the one used for reading.
- reallocated: (bool): is this volume/snapshot going to reallocated by the balancing procedure.
- replication: (Replication): The number of copies/replicas kept.
- size: (long): The volume's size in bytes.
- snapshot: (bool): True if this response describes a snapshot instead of a volume.
Get the disk sets computed by the balancer for a given snapshot (VolumeBalancerSnapshotDiskSets)
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"balancerDiskSets": [[DiskID, ...], ...],
"blocked": bool,
"currentDiskSets": [[DiskID, ...], ...],
"name": Either(VolumeName, SnapshotName),
"objectsCount": int,
"placeAll": PlacementGroupName,
"placeHead": PlacementGroupName,
"placeTail": PlacementGroupName,
"reallocated": bool,
"replication": Replication,
"size": long,
"snapshot": bool
}
}
- Response Data:
VolumeBalancerVolumeDiskSets
- balancerDiskSets: The new sets of disks that the volume's data should be stored on according to the rebalancing algorithm.
- blocked: (bool): Can this volume be rebalanced, or is rebalancing impossible with the current placement policy due to for example missing or soft-ejecting drives.
- currentDiskSets: The current sets of disks that the volume's data should be stored on.
- name: The volume's name.The value must be of one of the following types: VolumeName, SnapshotName.
- objectsCount: (int): The number of objects that the volume/snapshot is comprised of.
- placeAll: (PlacementGroupName): The name of a placement group which describes the disks to be used for all but the last replica.
- placeHead: (PlacementGroupName): The name of a placement group which describes the disks to be used for the first replica.
- placeTail: (PlacementGroupName): The name of a placement group which describes the disks to be used for the last replica, the one used for reading.
- reallocated: (bool): is this volume/snapshot going to reallocated by the balancing procedure.
- replication: (Replication): The number of copies/replicas kept.
- size: (long): The volume's size in bytes.
- snapshot: (bool): True if this response describes a snapshot instead of a volume.
List balancer allocation groups (VolumeBalancerGroups)
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": [{
"blocked": bool,
"feasible": bool,
"objectsCount": int,
"placeAll": PlacementGroupName,
"placeHead": PlacementGroupName,
"placeTail": PlacementGroupName,
"replication": Replication,
"reuseServer": bool /* Optional */,
"root": Either(VolumeName, SnapshotName),
"size": int,
"slots": [{
"objectsCount": int,
"storedSize": int
}, ...],
"storedSize": int,
"targetDiskSets": [[DiskID, ...], ...],
"volumes": [Either(VolumeName, SnapshotName), ...]
}, ...]
}
- Response Data:
Element type: VolumeBalancerAllocationGroup
- blocked: (bool): Can this volume be rebalanced, or is rebalancing impossible with the current placement policy due to for example missing or soft-ejecting drives.
- feasible: (bool): Can new volumes be allocated with the current placement policy and redundancy constraints.
- objectsCount: (int): The total number of objects of all volumes and snapshots in the group.
- placeAll: (PlacementGroupName): The name of a placement group which describes the disks to be used for all but the last replica.
- placeHead: (PlacementGroupName): The name of a placement group which describes the disks to be used for the first replica.
- placeTail: (PlacementGroupName): The name of a placement group which describes the disks to be used for the last replica, the one used for reading.
- replication: (Replication): The number of copies/replicas kept.
- reuseServer: (Optional bool): allow placement of replicas on same server
- root: The name of this group's root volume or snapshotThe value must be of one of the following types: VolumeName, SnapshotName.
- size: (int): The total size of all volumes and snapshots in the group.
- slots: Statistics about each of the current disk sets.
Element type: VolumeBalancerSlot
- objectsCount: (int): Number of objects on the corresponding disk set.
- storedSize: (int): Number of bytes of client data stored on the corresponding disk set.
- storedSize: (int): The total number of bytes of client data on all volumes and snapshots in this group.
- targetDiskSets: The current sets of disks that the volume's data should be stored on.
- volumes: The names of all volumes and snapshots in this group.
Element type: The value must be of one of the following types: VolumeName, SnapshotName.
iSCSI
Get the StorPool iSCSI configuration (iSCSIConfig)
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"iscsi": {
"baseName": str, default="^[a-z0-9\\-.:]+$",
"initiators": {
"iSCSIId": {
"exports": [{
"portalGroup": str, default="^[A-Za-z0-9_\\-.:]+$",
"target": str, default="^[a-z0-9\\-.:]+$"
}, ...],
"name": str, default="^[a-z0-9\\-.:]+$",
"nets": [string, ...],
"secret": string,
"username": string
}, ...
},
"portalGroups": {
"int": {
"name": str, default="^[A-Za-z0-9_\\-.:]+$",
"networks": [{
"address": string,
"prefix": int
}, ...],
"portals": [{
"controller": iSCSIId,
"ip": string,
"port": string
}, ...]
}, ...
},
"targets": {
"int": {
"currentControllerId": int,
"name": str, default="^[a-z0-9\\-.:]+$",
"volume": VolumeName
}, ...
}
}
}
}
- Response Data:
iSCSIConfig
- iscsi: The actual configuration data
- baseName: (str, default="^[a-z0-9\\-.:]+$"): The StorPool cluster's iSCSI base name.
- initiators: The iSCSI initiators allowed to access the cluster.A dict from iSCSIId to iSCSIInitiator
- Key type: iSCSIId
- Value type: iSCSIInitiator
- exports:
Element type: iSCSIExport
- name: (str, default="^[a-z0-9\\-.:]+$"): The iSCSI initiator's IQN.
- nets: The networks this initiator will contact the iSCSI cluster on.
- secret: (string): The password to authenticate the initiator with.
- username: (string)
- portalGroups: The iSCSI portal groups defined for the cluster.A dict from int to iSCSIPortalGroup
- Key type: int
- Value type: iSCSIPortalGroup
- name: (str, default="^[A-Za-z0-9_\\-.:]+$"): The iSCSI portal group name.
- networks: The networks this portal group is accessible on.
Element type: iSCSIPGNetwork
- address: (string): The dotted-quad network address.
- prefix: (int): The network's CIDR prefix length.
- portals: The list of portals defined in this group.
Element type: iSCSIPortal
- controller: (iSCSIId): The StorPool iSCSI target service handling this portal.
- ip: (string): The IP address for the portal.
- port: (string): The TCP port for the portal.
- targets: A dict from int to iSCSITarget
- Key type: int
- Value type: iSCSITarget
- currentControllerId: (int): the StorPool iSCSI target service handling this target.
- name: (str, default="^[a-z0-9\\-.:]+$"): The iSCSI name that the target is exposed as.
- volume: (VolumeName): The name of the StorPool volume being exposed.
Modify the StorPool iSCSI configuration (iSCSIConfig)
- Request:
- Example HTTP Request:
POST /ctrl/1.0/iSCSIConfig HTTP/1.0
Host: SP_API_HOST:SP_API_PORT
Authorization: Storpool v1:SP_AUTH_TOKEN
Content-Length: LENGTH
{
"commands": [{
"createInitiator": {
"name": str, default="^[a-z0-9\\-.:]+$",
"secret": string,
"username": string
} /* Optional */,
"createPortal": {
"controller": iSCSIId,
"ip": string,
"port": int /* Optional */,
"portalGroup": str, default="^[A-Za-z0-9_\\-.:]+$"
} /* Optional */,
"createPortalGroup": {
"name": str, default="^[A-Za-z0-9_\\-.:]+$"
} /* Optional */,
"createTarget": {
"volumeName": VolumeName
} /* Optional */,
"deleteInitiator": {
"name": str, default="^[a-z0-9\\-.:]+$"
} /* Optional */,
"deletePortal": {
"ip": string,
"port": int /* Optional */
} /* Optional */,
"deletePortalGroup": {
"name": str, default="^[A-Za-z0-9_\\-.:]+$"
} /* Optional */,
"deleteTarget": {
"volumeName": VolumeName
} /* Optional */,
"export": {
"initiator": str, default="^[a-z0-9\\-.:]+$",
"portalGroup": str, default="^[A-Za-z0-9_\\-.:]+$",
"volumeName": VolumeName
} /* Optional */,
"exportDelete": {
"initiator": str, default="^[a-z0-9\\-.:]+$",
"portalGroup": str, default="^[A-Za-z0-9_\\-.:]+$",
"volumeName": VolumeName
} /* Optional */,
"initiatorAddNetwork": {
"initiator": str, default="^[a-z0-9\\-.:]+$",
"net": string
} /* Optional */,
"portalGroupAddNetwork": {
"net": string,
"portalGroup": str, default="^[A-Za-z0-9_\\-.:]+$"
} /* Optional */,
"setBaseName": {
"name": str, default="^[a-z0-9\\-.:]+$"
} /* Optional */
}, ...]
}
- Method: POST
- Path: /ctrl/1.0/iSCSIConfig
- Arguments: No arguments
- JSON: iSCSIConfigChange
- commands: The actual iSCSI configuration commands.
Element type: iSCSIConfigCommand
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"generation": long,
"info": string /* Optional */,
"ok": true
}
}
- Response Data:
ApiOk
- generation: (long): The cluster generation based on the number of configuration changes since the cluster was created.
- info: (Optional string): May contain additional information about the request.
- ok: (true): Always returns true. If something goes wrong, an ApiError is returned instead.
Remote
List the registered remote locations (LocationsList)
- Request:
- Response:
- Example HTTP Response:
HTTP/1.0 200 OK
Connection: close
Content-Type: application/json
Cache-control: private
Content-Length: LENGTH
{
"generation": generation,
"data": {
"str, default="locations"": [{
"id": Global Location Id,
"name": RemoteLocationName
}, ...], ...
}
}
- Response Data:
A dict from str, default="locations" to [RemoteLocation]
Data Types
"": | The constant value "". |
"-": | The constant value "-". |
"all": | The constant value "all". |
-1: | The constant value -1. |
0: | The constant value 0. |
AttachmentPos: | integer, 0 <= value <= 1023 |
AttachmentRights: | One of {"rw", "ro"} |
BalancerCommand: | One of {"start", "stop", "commit"} |
BalancerStatus: | One of {"nothing to do", "blocked", "waiting", "working", "ready", "commiting"} |
Bandwidth: | a positive integer or '-' for unlimited |
BeaconClusterStatus: | One of {"CNODE_DOWN", "CNODE_DAMPING", "CNODE_UP"} |
BeaconNodeStatus: | One of {"NODE_DOWN", "NODE_UP"} |
BridgeId: | integer, 1 <= value <= 4096 |
BridgeStatus: | One of {"running", "joining", "down"} |
ClientID: | integer, 1 <= value <= 4096 |
ClientStatus: | One of {"running", "down"} |
ClusterStatus: | One of {"running", "waiting", "down"} |
DiskDescritpion: | string, regex ^[A-Za-z0-9_\- ]{,30}$ |
DiskID: | integer, 0 <= value <= 4095 |
DiskSoftEjectStatus: | One of {"on", "off", "paused"} |
GUID: | string, regex ^0x[0-9a-fA-F]{2,16}$ |
Global Location Id: | string, regex [a-z0-9]+$ |
Global Volume Id: | string, regex [a-z0-9]+\.[a-z0-9]\.[a-z0-9]+$ |
IOPS: | a positive integer or '-' for unlimited |
MAC Address: | string, regex ^([0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}$ |
MgmtID: | integer, 1 <= value <= 4096 |
NetID: | integer, 0 <= value <= 3 |
NodeID: | integer, 0 <= value <= 63 |
ObjectState: | ObjectState, enumeration from 0 to 9 |
PeerID: | integer, 0 <= value <= 65535 |
PeerStatus: | One of {"up", "down"} |
PlacementGroupName: | a string(128), matching ^[A-Za-z0-9_\-]+$, except {list} |
RdmaState: | One of {"Idle", "GidReceived", "Connecting", "Connected", "pendingError", "Error"} |
RelocatorStatus: | One of {"on", "off", "blocked"} |
RemoteLocationName: | a string(64), matching ^\#?[A-Za-z0-9_\-.:]+$, except {list} |
Replication: | integer, 1 <= value <= 3 |
RequestOp: | One of {"read", "write", "merge", "system", "entries flush", "#bad_state", "#bad_drOp"} |
ServerID: | integer, 1 <= value <= 32767 |
ServerStatus: | One of {"running", "waiting", "booting", "down"} |
Size: | a positive integer divisible by 512 |
SizeAdd: | a positive integer divisible by 512 |
SnapshotName: | a string(200), matching ^\*?[A-Za-z0-9_\-.:@]+$, except {list, status} |
VolumeCurentStatus: | One of {"up", "up soon", "data lost", "down"} |
VolumeName: | a string(200), matching ^\#?[A-Za-z0-9_\-.:]+$, except {list, status} |
VolumeTagName: | a string(200), matching ^[A-Za-z0-9_\-.:]+$, except {} |
VolumeTagValue: | a string(200), matching ^[A-Za-z0-9_\-.:]*$, except {} |
VolumeTemplateName: | a string(200), matching ^[A-Za-z0-9_\-]+$, except {list} |
bool: | true or false. |
bool, default=false: | A value of type bool. Default value = False. |
client status: | One of {"ok", "updating", "down"} |
float: | A floating point number. |
iSCSIId: | integer, 0 <= value <= 4095 |
int: | An integer value. |
long: | A long integer value. |
null: | The constant value null. |
str, default="^[A-Za-z0-9_\\-.:]+$": | A value of type str. Default value = ^[A-Za-z0-9_\-.:]+$. |
str, default="^[a-z0-9\\-.:]+$": | A value of type str. Default value = ^[a-z0-9\-.:]+$. |
str, default="exports": | A value of type str. Default value = exports. |
str, default="locations": | A value of type str. Default value = locations. |
str, default="snapshots": | A value of type str. Default value = snapshots. |
string: | A string value. |
true: | The constant value true. |