此操作用来批量查询存储池。
请求语法
GET /rest/v1/system/storagepool?filter=filter HTTP/1.1
Date: date
Content-Type: application/json; charset=utf-8
Host: ip:port
Authorization: authorization
请求参数
参数 描述 是否必须 filter 查询的过滤条件。
支持的过滤条件类型包括:
poolName:存储池的节点名称。
否
响应结果
名称 描述 storagePool 存储池信息集合,包含:name、id、isBasePool、status、faultDomain、description、totalCapacity、usedCapacity、createTime、luns、topology。 name 存储池名称。 id 存储池序号。 isBasePool 是否是基础存储池:
true:是基础存储池。
false:不是基础存储池。
status 存储池状态:
true:正常。
false:删除中。
faultDomain 存储池故障域级别:
path:数据目录级别。
server:服务器级别。
rack:机架级别。
room:机房级别。
description 存储池描述信息。 totalCapacity 存储池总容量,单位是字节。 usedCapacity 存储池已用容量,单位是字节。 createTime 存储池创建时间。 luns.lunNamesForCachePool 缓存存储池卷列表。 luns.lunNamesForPool 存储池卷列表。 luns.status.number 存储池关联卷的个数。 luns.status.cacheNumber 缓存模式卷的个数。 luns.status.storageNumber 存储模式卷的个数。 luns.status.localNumber 本地模式卷的个数。 luns.status.cacheCapacity 缓存模式卷容量,单位是字节。 luns.status.storageCapacity 存储模式卷容量,单位是字节。 luns.status.localCapacity 本地模式卷容量,单位是字节。 topology为存储池拓扑信息 name 拓扑节点或者子节点名称。 fullname 拓扑节点或者子节点的全路径名称。 type 拓扑节点或者子节点的类型。 description 拓扑节点或子节点的描述信息。
如果未添加描述信息,或者节点类型是path,不返回此项。
healthStatus 故障域状态:
Healthy:健康状态,可正常读写。
Warning:警告状态,可读。
Error:错误状态,无法访问。
如果拓扑节点或者子节点的类型是服务器server clusterAddress 拓扑图集群网络IP。 publicAddress 拓扑图业务网络IP。 allDiskPaths.usedCapacity 拓扑图中所有数据目录的已用容量。 allDiskPaths.totalCapacity 拓扑图中所有数据目录的总容量。 serverStatus 拓扑图的服务器状态:
Connected:已连接。
Disconnected:未连接。
Removing:移除中。
serverId 拓扑图的服务器ID。 childNodes 拓扑图中子节点。 如果拓扑节点或者子节点的类型是数据目录path usedCapacity HBlock数据目录对应分区的已用容量,单位是字节。 totalCapacity HBlock数据目录对应分区的总容量,单位是字节。 usedCapacityQuota 数据目录已用容量配额,单位是字节。 capacityQuota 数据目录容量配额,单位是字节。 managementStatus 数据目录的管理状态:
Added:已添加。
Removing:正在移除。
healthStatus 数据目录健康状态:
Healthy:数据目录处于健康状态,可正常读写,且数据目录所在磁盘使用率未超过90%。
Warning:数据目录处于警告状态,可读,但存在以下情况的任意一种:慢盘;数据目录所在磁盘使用率超过90%;磁盘剩余空间不足1GiB;或者HBlock对这个目录停写。
Error:数据目录错误状态,无法访问,原因可能是:所在磁盘出现I/O错误导致无法读写,数据目录未正确挂载等。
healthDetail 数据目录健康状态详情:
如果健康状态为Healthy,此字段为空。
如果健康状态为Warning或Error,显示警告或错误的详细信息。
serverId 数据目录所属的服务器ID。
请求示例
查询所有存储池。
GET /rest/v1/system/storagepool HTTP/1.1
Date: Fri, 02 Aug 2024 09:59:58 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: 01964c0c63ed47e88bf2dea0820baac3
Connection: keep-alive
Content-Length: 3994
Date: Fri, 02 Aug 2024 09: 59: 58 GMT
Content-Type: application/json;charset=utf-8
Server: HBlock
{
"data": {
"storagePool": [
{
"name": "default",
"id": 0,
"isBasePool": true,
"status": "Normal",
"faultDomain": "server",
"description": "base pool",
"totalCapacity": 336471511040,
"usedCapacity": 38534676480,
"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": 18884603904,
"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": 7373828096,
"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": 0,
"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"
}
]
}
]
},
{
"name": "pool2",
"id": 1,
"isBasePool": false,
"status": "Normal",
"faultDomain": "path",
"description": "second pool",
"totalCapacity": 127955415040,
"usedCapacity": 29149364224,
"createTime": 1722499235201,
"luns": {
"lunNamesForCachePool": [
"lun02a"
],
"lunNamesForPool": [
"lun03a"
],
"status": {
"number": 2,
"cacheNumber": 1,
"storageNumber": 1,
"localNumber": 0,
"cacheCapacity": 214748364800,
"storageCapacity": 322122547200,
"localCapacity": 0
}
},
"topology": [
{
"name": "/mnt/storage02",
"fullname": "default:rack1:server4:/mnt/storage02",
"type": "path",
"usedCapacity": 57221120,
"totalCapacity": 56028450816,
"usedCapacityQuota": 69632,
"capacityQuota": -1,
"managementStatus": "Added",
"healthStatus": "Healthy",
"healthDetail": [],
"serverId": "hblock_4"
},
{
"name": "/mnt/storage04",
"fullname": "default:rack1:server4:/mnt/storage04",
"type": "path",
"usedCapacity": 14546071552,
"totalCapacity": 35963482112,
"usedCapacityQuota": 69632,
"capacityQuota": -1,
"managementStatus": "Added",
"healthStatus": "Healthy",
"healthDetail": [],
"serverId": "hblock_4"
},
{
"name": "/mnt/storage05",
"fullname": "default:rack1:server4:/mnt/storage05",
"type": "path",
"usedCapacity": 14546071552,
"totalCapacity": 35963482112,
"usedCapacityQuota": 69632,
"capacityQuota": -1,
"managementStatus": "Added",
"healthStatus": "Healthy",
"healthDetail": [],
"serverId": "hblock_4"
}
]
},
{
"name": "pool3",
"id": 2,
"isBasePool": false,
"status": "Normal",
"faultDomain": "path",
"description": "",
"totalCapacity": 0,
"usedCapacity": 0,
"createTime": 1722588962393,
"luns": {
"lunNamesForCachePool": [],
"lunNamesForPool": [],
"status": {}
},
"topology": []
}
]
}
}