查询指定存储池
更新时间 2025-09-29 17:49:38
最近更新时间: 2025-09-29 17:49:38
本节主要介绍如何使用API查询指定存储池。
此操作用来查询指定存储池。
请求语法
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 | 存储池已用容量,单位是字节。 |
usedCapacityQuota | Long | 存储池已用容量配额,单位是字节。 |
capacityQuota | 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说明”。 |
qosPolicy.qosName | String | 存储池关联的QoS策略名称。 |
qosPolicyforLUN.qosName | String | 存储池内卷的默认QoS策略名称。 |
表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 | Array of string | 数据目录健康状态详情:
| |
serverId | String | 数据目录所属的服务器ID。 |
请求示例
查询存储池default。
GET /rest/v1/system/storagepool/defaultpool HTTP/1.1
Date: Thu, 21 Aug 2025 05:55:19 GMT
Content-Type: application/json; charset=utf-8
Authorization: HBlock userName:signature
Host: 192.168.0.64:1443
响应示例
HTTP/1.1 200 OK
x-hblock-request-id: ec7686d210f5407690aa054698947034
Connection: keep-alive
Content-Length: 2437
Date: Thu, 21 Aug 2025 05:55:19 GMT
Content-Type: application/json;charset=utf-8
Server: HBlock
{
"data": {
"name": "defaultpool",
"id": 0,
"isBasePool": true,
"status": "Normal",
"faultDomain": "server",
"description": "Default storage pool.",
"totalCapacity": 299111325696,
"usedCapacity": 54389911552,
"usedCapacityQuota": 23300496420,
"capacityQuota": 299111325696,
"createTime": 1753783004031,
"luns": {
"lunNamesForCachePool": [
"lun05a"
],
"lunNamesForPool": [
"lun02a",
"lun02d",
"lun01a-clone2",
"lun001-c001",
"lunc",
"lun04",
"lun12",
"lunn01a-clone1",
"lun03a",
"lun001",
"lunc03b",
"lun01a",
"Clone-2"
],
"status": {
"number": 14,
"cacheNumber": 1,
"storageNumber": 0,
"localNumber": 13,
"cacheCapacity": 357556027392,
"storageCapacity": 0,
"localCapacity": 2498597224448
}
},
"topology": [
{
"name": "hblock_1",
"fullname": "default:hblock_1",
"type": "server",
"healthStatus": "Healthy",
"clusterAddress": "192.168.0.65",
"publicAddress": "192.168.0.65",
"allDiskPaths": {
"usedCapacity": 7785398272,
"totalCapacity": 199407550464
},
"serverStatus": "Connected",
"serverId": "hblock_1",
"childNodes": [
{
"name": "/mnt/stor02",
"fullname": "default:hblock_1:/mnt/stor02",
"type": "path",
"usedCapacity": 7785185280,
"totalCapacity": 99703775232,
"usedCapacityQuota": 7771341232,
"capacityQuota": -1,
"managementStatus": "Added",
"healthStatus": "Healthy",
"healthDetail": [],
"serverId": "hblock_1"
}
]
},
{
"name": "hblock_2",
"fullname": "default:hblock_2",
"type": "server",
"description": "hblock_2",
"healthStatus": "Healthy",
"clusterAddress": "192.168.0.64",
"publicAddress": "192.168.0.64",
"allDiskPaths": {
"usedCapacity": 38822154240,
"totalCapacity": 199407550464
},
"serverStatus": "Connected",
"serverId": "hblock_2",
"childNodes": [
{
"name": "/mnt/stor01",
"fullname": "default:hblock_2:/mnt/stor01",
"type": "path",
"usedCapacity": 38820716544,
"totalCapacity": 99703775232,
"usedCapacityQuota": 7783989248,
"capacityQuota": -1,
"managementStatus": "Added",
"healthStatus": "Healthy",
"healthDetail": [],
"serverId": "hblock_2"
}
]
},
{
"name": "hblock_3",
"fullname": "default:hblock_3",
"type": "server",
"healthStatus": "Healthy",
"clusterAddress": "192.168.0.67",
"publicAddress": "192.168.0.67",
"allDiskPaths": {
"usedCapacity": 7784218624,
"totalCapacity": 199407550464
},
"serverStatus": "Connected",
"serverId": "hblock_3",
"childNodes": [
{
"name": "/mnt/stor01",
"fullname": "default:hblock_3:/mnt/stor01",
"type": "path",
"usedCapacity": 7784009728,
"totalCapacity": 99703775232,
"usedCapacityQuota": 7745165940,
"capacityQuota": -1,
"managementStatus": "Added",
"healthStatus": "Healthy",
"healthDetail": [],
"serverId": "hblock_3"
}
]
}
],
"qosPolicy": {
"qosName": "QoS6"
},
"qosPolicyforLUN": {
"qosName": "QoS-Test"
}
}
}