-
Notifications
You must be signed in to change notification settings - Fork 3
get_storage
Gets the storage information, and optionally the storage for a specified system, or the specified storage by id.
GET /api/storage/?sid={sid}
Host: <server host name>
Accept: application/json
AuthToken: <authentication token returned from authenticate>
Optional filters include:
| Filter | Description | Example |
|---|---|---|
| /{id} | return only the storage specified by id | GET /api/storage/1 |
| &usage={usage} | return on the storage that matches the specified usage | GET /api/storage/?sid=1&usage=backup |
200 success
The API returns an array of arrays of storage information, where each storage entry is defined as follows:
| Index | Value | Type | Returned |
|---|---|---|---|
| id | storage id | int | always |
| name | storage name | string | always |
| sid | system ID | int | unless sid specified |
| system_name | system Name | string | unless sid specified |
| type | storage type | string | always |
- | "disk", "iscsi", "fc", "aoe", "nas", "internal", "added_internal" | usage | storage usage | string | always
- | backup - the storage will hold backups and/or replicated backups |
- | archive - the storage will be used as a target for archiving |
- | source - the storage will be the source of backup data, e.g., a mounted NAS |
- | stateless - the base backups storage for the appliance, supports the stateless feature |
- | which means that another deployed appliance can connect to pre-existing storage | stateless_type | if type is "internal", returns the type of stateless storage | string | always (null if not defined)
- | "iscsi", "fc", "aoe", "nas", "added_internal" |
- | will be null if uninitialized stateless storage | status | status of storage | string | always
- | "online", "offline", "pending", "deleting", "expanding" dedup | dedup ratio, formatted as a string | string | if available
- | this will be the same for all storage with usage backup |
- | this will be "N/A" for archiving until deduplicated archiving is supported |
- | this will be "N/A" for storage with usage source | average_write_speed | speed in MB/sec, formatted as string | if available
- | available only for attached disks, not available for external storage | mb_size | storage size in MB | long | always mb_free | storage free space in MB | long | always percent_used | % used, formatted as a string | string | always daily_growth_rate | % growth, formatted as a string | string | if available
- | this is derived by average the change in mb_size over a 7-day period | warn_threshold | percentage free when warnings are started | int | always max_concurrent_backups | the maximum number of concurrent backups for this device | int | always
- | will be zero for non-backups storage | is_default | the default storage for backup jobs | boolean | always
- | can only be true for a single backups storage per appliance | compression | compression is turned on or not for the storage | boolean | always
- | returns the compression state of the storage | is_purging | is the storage currently purging? | boolean | always is_expandable | is the storage expandable (i.e., is on an LVM)? | boolean | always is_infinite | is the storage of infinite size | boolean | always
- | e.g., some cloud storage is "infinite" | mb_to_purge | how much storage is being freed by the purger | long | always has_alert | one or more critical alerts are currently unresolved for this storage | boolean | false alerts | the alerts currently open for this storage | string | always, may be "" properties | unique values per storage type | array | always, may be empty
| Index | Value | Type | Returned |
|---|---|---|---|
| hostname | IP address or hostname | string | always |
| port | port on which listening | long | always |
| target | fully-qualified iSCSI target name | string | always |
| lun | LUN (logical unit number) | long | always |
| username | Name of the SAN user | string | always |
| Index | Value | Type | Returned |
|---|---|---|---|
| hostname | IP address or hostname | string | always |
| share_name | port on which listening | long | always |
| protocol | mounting protocol, "nfs", "cifs", or "cloud" | string | always |
| username | Name of the NAS user that will be provided |
| Index | Value | Type | Returned |
|---|---|---|---|
| wwpn | World-wide port number | string | always |
| model | target card model/vendor | string | always |
| lun | LUN (logical unit number) | long | always |
| vendor | appliance vendor name | string | always |
| username | Name of the SAN user | string | always |
For attached disks, the list of disks in the LVM are returned. The caller can use the GET /storage/available-disks to get the list of unattached disks available on the system. On a PUT the user can expand the LVM by passing in these unattached disks as properties with the "internal_name" field set.
| Index | Value | Type | Returned |
|---|---|---|---|
| name | device name, e.g., "/dev/sdc" | string | always |
| pool | UUID of disk pool volume group name | string | always, empty if not in a pool |
| partitioned | is this disk partitioned | boolean | always |
| filesystem | does this disk have a filesystem | boolean | always |
| mb_size | size of the disk in MB, e.g., 100.0 | float | always |
If the user add the "totals" flag to the REST URL, an additional array element is included after the array of arrays of storage information. This array, known as the "totals" array, is the total for all backup storages and all storage, and is defined as follows:
| Index | Value | Type | Returned |
|---|---|---|---|
| backups_mb_size | backups storage size in MB | long | always |
| backups_mb_free | backups storage free space in MB | long | always |
| total_mb_size | total storage size in MB | long | always |
| total_mb_free | total storage free space in MB | long | always |
GET /api/storage/?sid=1
Host: <server host name>
Accept: application/json
AuthToken: 8a00sjerhterqerjlqkjlk443l4j56869h4f_)(fjdkasHHHHHkdal324
{
"storage": [
{
"id": 1,
"type": "added_internal",
"name": "my storage",
"usage": "backup",
"mb_size": 1048576,
"mb_free": 10423,
"average_write_speed": "315.3 MB/s",,
"daily_growth_rate": "0.0%",
"dedupe": "125:1",
"compression": true,
"percent_used": "12.2",
"is_infinite": false,
"system_id": 316,
"system_name": "UEB-CentOS6-lmc",
"warn_threshold": 10.0,
"properties": [
"/dev/sda7"
]
},
{
"average_write_speed": "302.3 MB/s",
"compression": true,
"dedupe": "12:1",
"daily_growth_rate": "2.0%",
"id": 2,
"name": "my second storage"
"percent_used": "42.2",
"is_infinite": false,
"system_id": 316,
"system_name": "UEB-CentOS6-lmc",
"type": "added_internal",
"usage": "backup",
"warn_threshold": 10.0,
"mb_size": 1048576,
"mb_free": 10423,
"properties": [
"/dev/sda7",
"/dev/sdc"
]
}
],
"totals": {
"backups_mb_size": 2091752,
"backups_mb_free": 31269,
"total_mb_size": 3004237,
"total_mb_free": 42953
}
}