Getting disk storage information about vSnap servers

You can get a list of all vSnap servers and information about each vSnap server. You can get vSnap server information from the cache data that is stored in the IBM Spectrum Protect Plus environment. Or, you can prompt IBM Spectrum Protect Plus to collect the latest information from a specific vSnap server.

Requirement: Beginning with Version 10.1.7, the IBM Spectrum Protect Plus virtual appliance does not have an onboard vSnap server. You might see “localhost” in a list of vSnap servers if you upgraded IBM Spectrum Protect Plus from Version 10.1.6 or earlier. In this case, migrate your data from the onboard vSnap server, which is designated as “localhost”, to external vSnap servers, object storage (Amazon S3, Microsoft Azure Blob Object Storage, IBM Cloud Object Storage, or S3-compatible storage), or replication servers (IBM Spectrum Protect) and delete the onboard vSnap server.

This action is required because an onboard vSnap server must not be used in a production environment.

Method and URI

To get information about all vSnap servers using cached records in IBM Spectrum Protect Plus, use a GET method and a URI:

GET     https://{hostname|IP}/api/storage

To get information about a specific vSnap server using cached records in IBM Spectrum Protect Plus, use a GET method and a URI:

GET     https://{hostname|IP}/api/storage/{storageId}

Tip

To get a {storageId} value based on its name, follow the instructions in Getting a {storageId}.

To request the latest information about a specific vSnap server, use a POST method and a URI:

POST    https://{hostname|IP}/api/storage/{storageId}

Restriction: With this POST method request, you cannot retrieve information about all vSnap servers at once. Typically, the request takes longer than the GET requests that collect vSnap server information from IBM Spectrum Protect Plus.

Parameters

There is no parameters for the GET requests to retrieve vSnap information from IBM Spectrum Protect Plus.

For the POST request to retrieve information from a vSnap server, use the following parameter:

Parameter 1: action

Start an action to retrieve vSnap server information from the vSnap servers.

  • Value: refresh

  • Type: System string. Required. Available in the web user interface.

Data

None.

Example 1: Get information about all vSnap servers

The following Python snippet requests a list of all vSnap servers and their information: As mentioned, the information here might be old and inaccurate.

requests.get('https://' + spp_ipv4 + '/api/storage',
    headers={...}, verify=...)

The request prompts a response that is structured as shown, with the HTTP status of 200 (OK).

{
    "links": {...},
    "total": 2,
    "storages": [
        {
            "links": {...},
            "resourceType": "storage",
            "type": "vsnap",
            "typeDisplayName": "vSnap",
            "site": "1000",
            "name": "10.0.1.1",
            "storageId": "2101",
            "user": {
                "href": "https://10.0.0.100:-1/api/identity/user/2120"
            },
            "rbacPath": "root:0/site:0/site:1000/site.all.storage:1000/storage:2
↪101",
            "hostAddress": "10.0.1.1",
            "portNumber": 8900,
            "sslConnection": true,
            "initializeStatus": "Ready",
            "initializeStatusDisplayName": "Ready",
            "storageProfiles": null,
            "version": "10.1.8-1900",
            "capacity": {
                "free": 0,
                "total": 0,
                "updateTime": 1576117254291
            },
            "activeDirectoryInfo": null,
            "demo": false,
            "maxStreams": null,
            "isReady": true,
            "id": "2101"
        },
        {
            "links": {...},
            "resourceType": "storage",
            "type": "vsnap",
            "typeDisplayName": "vSnap",
            "site": "1001",
            "name": "10.0.1.2",
            "storageId": "2102",
            "user": {
                "href": "https://10.0.0.100:-1/api/identity/user/2120"
            },
            "rbacPath": "root:0/site:0/site:1001/site.all.storage:1000/storage:2
↪101",
            "hostAddress": "10.0.1.2",
            "portNumber": 8900,
            "sslConnection": true,
            "initializeStatus": "Ready",
            "initializeStatusDisplayName": "Ready",
            "storageProfiles": null,
            "version": "10.1.8-1900",
            "capacity": {
                "free": 0,
                "total": 0,
                "updateTime": 1576117254291
            },
            "activeDirectoryInfo": null,
            "demo": false,
            "maxStreams": null,
            "isReady": true,
            "id": "2102"
        }
    ]
}

Example 2: Get the latest information about a specific vSnap server

Assume that you added a vSnap server, vsnap-dallas1 ({storage_id} 2001) to IBM Spectrum Protect Plus. The following Python snippet requests information of the vSnap server. This POST method request retrieves the latest vSnap server information from the target vSnap server:

storage_id = "2101"
_params = {"action": "refresh"}

requests.post('https://' + spp_ipv4 + '/api/storage/' + storage_id,
    headers={...}, params=_params, verify=...)
_images/reference_vsnap_get2.png

Figure 31 The same action can be taken in the IBM Spectrum Protect Plus web user interface: Click the three dots () > Refresh for the target vSnap server.

The request prompts a response that is structured as shown, with the HTTP status of 201 (Created).

{
    "links": {...},
    "resourceType": "storage",
    "type": "vsnap",
    "typeDisplayName": "vSnap",
    "site": "1000",
    "name": "10.0.1.1",
    "storageId": "2101",
    ...,
    "id": "2101",
}