此操作用来查询指定存储池。
请求语法
GET /rest/v1/system/storagepool/poolName HTTP/1.1
Date: date
Content-Type: application/json; charset=utf-8
Host: ip:port
Authorization: authorization
请求参数
参数 | 类型 | 描述 | 是否必须 |
---|---|---|---|
poolName | String | 存储池名称。 取值:长度范围是1~16,只能由字母、数字和短横线(-)、下划线(_)组成,字母区分大小写,且仅支持以字母和数字开头。 | 是 |
响应结果
名称 | 类型 | 描述 |
---|---|---|
name | String | 存储池名称。 |
id | Short | 存储池序号。 |
isBasePool | Boolean | 是否是基础存储池:
|
status | String | 存储池状态:
|
faultDomain | String | 存储池故障域级别:
|
description | String | 存储池描述信息。 |
totalCapacity | Long | 存储池总容量,单位是字节。 |
usedCapacity | Long | 存储池已用容量,单位是字节。 |
createTime | Long | 存储池创建时间。 |
luns.lunNamesForCachePool | Array of lunNamesForCachePool | 缓存存储池卷列表。 |
luns.lunNamesForPool | Array of lunNamesForPool | 存储池卷列表。 |
luns.status | Object | 卷的状态信息,详见“表1 响应参数luns.status说明”。 |
topology | Array of topology | 存储池拓扑信息集合,详见“表2响应参数topology/childNodes说明”。 |
表1 响应参数luns.status说明
名称 | 类型 | 描述 |
---|---|---|
number | Integer | 存储池关联卷的个数。 |
cacheNumber | Integer | 缓存模式卷的个数。 |
storageNumber | Integer | 存储模式卷的个数。 |
localNumber | Integer | 本地模式卷的个数。 |
cacheCapacity | Long | 缓存模式卷容量,单位是字节。 |
storageCapacity | Long | 存储模式卷容量,单位是字节。 |
localCapacity | Long | 本地模式卷容量,单位是字节。 |
表2 响应参数topology/childNodes说明
名称 | 类型 | 描述 | |
---|---|---|---|
name | String | 拓扑节点或者子节点名称。 | |
fullname | String | 拓扑节点或者子节点的全路径名称。 | |
type | String | 拓扑节点或者子节点的类型。 | |
description | String | 拓扑节点或子节点的描述信息。 如果未添加描述信息,或者节点类型是path,不返回此项。 | |
healthStatus | String | 故障域状态:
| |
childNodes | Array of childNodes | 拓扑图中子节点,childNodes和topology基本一致,类型不同,包含的内容不同,详见本表其他字段。 | |
如果topology或者childNodes的类型是server | clusterAddress | String | 拓扑图集群网络IP。 |
publicAddress | String | 拓扑图业务网络IP。 | |
allDiskPaths.usedCapacity | Long | 拓扑图中所有数据目录的已用容量。 | |
allDiskPaths.totalCapacity | Long | 拓扑图中所有数据目录的总容量。 | |
serverStatus | String | 拓扑图的服务器状态:
| |
serverId | String | 拓扑图的服务器ID。 | |
childNodes | Array of childNodes | 拓扑图中子节点,childNodes和topology基本一致,类型不同,包含的内容不同,详见本表其他字段。 | |
如果topology或者childNodes的类型是path | usedCapacity | Long | HBlock数据目录对应分区的已用容量,单位是字节。 |
totalCapacity | Long | HBlock数据目录对应分区的总容量,单位是字节。 | |
usedCapacityQuota | Long | 数据目录已用容量配额,单位是字节。 | |
capacityQuota | Long | 数据目录容量配额,单位是字节。 | |
managementStatus | String | 数据目录的管理状态:
| |
healthStatus | String | 数据目录健康状态:
| |
healthDetail | String | 数据目录健康状态详情:
| |
serverId | String | 数据目录所属的服务器ID。 |
请求示例
查询存储池default。
GET /rest/v1/system/storagepool/default HTTP/1.1
Date: Fri, 2 Aug 2024 10:01:57 GMT
Content-Type: application/json; charset=utf-8
Authorization: HBlock userName:signature
Host: 192.168.0.110:1443
响应示例
HTTP/1.1 200 OK
x-hblock-request-id: b63c500caa0141c79278d1b39aa25892
Connection: keep-alive
Content-Length: 2467
Date: Fri, 2 Aug 2024 10: 01: 57 GMT
Content-Type: application/json;charset=utf-8
Server: HBlock
{
"data": {
"name": "default",
"id": 0,
"isBasePool": true,
"status": "Normal",
"faultDomain": "server",
"description": "base pool",
"totalCapacity": 336471511040,
"usedCapacity": 38539456512,
"createTime": 1722494921245,
"luns": {
"lunNamesForCachePool": [
"lun03a"
],
"lunNamesForPool": [
"lun02a",
"lun01b",
"lun01a"
],
"status": {
"number": 4,
"cacheNumber": 1,
"storageNumber": 1,
"localNumber": 2,
"cacheCapacity": 214748364800,
"storageCapacity": 322122547200,
"localCapacity": 214748364800
}
},
"topology": [
{
"name": "server1",
"fullname": "default:room1:rack2:server1",
"type": "server",
"healthStatus": "Healthy",
"clusterAddress": "192.168.0.192",
"publicAddress": "192.168.0.192",
"allDiskPaths": {
"usedCapacity": 18889383936,
"totalCapacity": 136132825088
},
"serverStatus": "Connected",
"serverId": "hblock_1",
"childNodes": [
{
"name": "/mnt/stor",
"fullname": "default:room1:rack2:server1:/mnt/stor",
"type": "path",
"usedCapacity": 11510775808,
"totalCapacity": 100169342976,
"usedCapacityQuota": 172032,
"capacityQuota": -1,
"managementStatus": "Added",
"healthStatus": "Healthy",
"healthDetail": [],
"serverId": "hblock_1"
},
{
"name": "/mnt/storage01",
"fullname": "default:room1:rack2:server1:/mnt/storage01",
"type": "path",
"usedCapacity": 7378608128,
"totalCapacity": 35963482112,
"usedCapacityQuota": 0,
"capacityQuota": -1,
"managementStatus": "Added",
"healthStatus": "Healthy",
"healthDetail": [],
"serverId": "hblock_1"
}
]
},
{
"name": "server2",
"fullname": "default:room1:server2",
"type": "server",
"healthStatus": "Healthy",
"clusterAddress": "192.168.0.110",
"publicAddress": "192.168.0.110",
"allDiskPaths": {
"usedCapacity": 8582782976,
"totalCapacity": 100169342976
},
"serverStatus": "Connected",
"serverId": "hblock_2",
"childNodes": [
{
"name": "/mnt/stor",
"fullname": "default:room1:server2:/mnt/stor",
"type": "path",
"usedCapacity": 8582782976,
"totalCapacity": 100169342976,
"usedCapacityQuota": 229376,
"capacityQuota": -1,
"managementStatus": "Added",
"healthStatus": "Healthy",
"healthDetail": [],
"serverId": "hblock_2"
}
]
},
{
"name": "server3",
"fullname": "default:room1:server3",
"type": "server",
"healthStatus": "Healthy",
"clusterAddress": "192.168.0.102",
"publicAddress": "192.168.0.102",
"allDiskPaths": {
"usedCapacity": 11067289600,
"totalCapacity": 100169342976
},
"serverStatus": "Connected",
"serverId": "hblock_3",
"childNodes": [
{
"name": "/mnt/stor",
"fullname": "default:room1:server3:/mnt/stor",
"type": "path",
"usedCapacity": 11067289600,
"totalCapacity": 100169342976,
"usedCapacityQuota": 0,
"capacityQuota": -1,
"managementStatus": "Added",
"healthStatus": "Healthy",
"healthDetail": [],
"serverId": "hblock_3"
}
]
}
]
}
}