查询卷关联的QoS
更新时间 2025-09-29 17:49:36
最近更新时间: 2025-09-29 17:49:36
本节主要介绍如何使用API查询卷关联的QoS。
此操作用来查询卷关联的QoS信息。
请求语法
GET /rest/v1/block/lun/lunName/qos HTTP/1.1
Date: date
Host: ip:port
Authorization: authorization
请求参数
参数 | 类型 | 描述 | 是否必须 |
---|---|---|---|
lunName | String | 卷名称。 | 是 |
响应结果
名称 | 类型 | 描述 |
---|---|---|
qosPolicy | Object of qosPolicy | QoS策略信息集合,详见“表1 响应参数qosPolicy/qosPolicyforLUN说明”。 说明 卷关联了具体QoS策略时才会输出此项。 |
qosPolicyforLUN | Object of qosPolicyforLUN | 卷所在存储池中卷的默认QoS策略信息(仅集群版支持),详见“表1 响应参数qosPolicy/qosPolicyforLUN说明”。 说明 卷所在的存储池已设置了存储池内卷的默认QoS策略时才会输出此项。 |
表1 响应参数qosPolicy/qosPolicyforLUN
名称 | 类型 | 描述 |
---|---|---|
qosName | String | QoS策略名称。 |
IOPS | Long | 每秒能够进行读写操作次数的最大值。 说明 -1表示不限制。 |
readIOPS | Long | 每秒能够进行读操作次数的最大值。 说明 -1表示不限制。 |
writeIOPS | Long | 每秒能够进行写操作次数的最大值。 说明 -1表示不限制。 |
Bps | Long | 每秒可传输数据量的最大值,单位是Bytes/s。 说明 -1表示不限制。 |
readBps | Long | 读带宽上限,单位是Bytes/s。 说明 -1表示不限制。 |
writeBps | Long | 写带宽上限,单位是Bytes/s。 说明 -1表示不限制。 |
IOPSBurst | Long | 使用Burst功能时,每秒能够进行读写操作次数的最大值。 说明 -1表示不限制。 |
readIOPSBurst | Long | 使用Burst功能时,每秒能够进行读操作次数的最大值。 说明 -1表示不限制。 |
writeIOPSBurst | Long | 使用Burst功能时,每秒能够进行写操作次数的最大值。 说明 -1表示不限制。 |
BpsBurst | Long | 使用Burst功能时,每秒可传输的数据量最大值,单位是Bytes/s。 说明 -1表示不限制。 |
readBpsBurst | Long | 使用Burst功能时,读带宽上限,单位是Bytes/s。 说明 -1表示不限制。 |
writeBpsBurst | Long | 使用Burst功能时,写带宽上限,单位是Bytes/s。 说明 -1表示不限制。 |
IOPSBurstSecs | Long | 使用Burst功能时,按照Burst上限的能力进行读写操作所能持续的时间。单位是秒。 |
readIOPSBurstSecs | Long | 使用Burst功能时,按照Burst上限的能力进行读操作所能持续的时间。单位是秒。 |
writeIOPSBurstSecs | Long | 使用Burst功能时,按照Burst上限的能力进行写操作所能持续的时间。单位是秒。 |
BpsBurstSecs | Long | 使用Burst功能时,按照Burst上限的流量能力所能持续的时间。单位是秒。 |
readBpsBurstSecs | Long | 使用Burst功能时,按照Burst上限的读流量能力所能持续的时间。单位是秒。 |
writeBpsBurstSecs | Long | 使用Burst功能时,按照Burst上限的写流量能力所能持续的时间。单位是秒。 |
createTime | Long | QoS策略创建的时间。 |
reclaimPolicy | String | QoS策略的回收策略:
|
poolName | String | 卷所属的存储池名称(仅集群版支持)。只存在qosPolicyforLUN{}中。 |
description | String | QoS策略的描述信息。 |
请求示例1
单机版:查询卷luna1的QoS策略。
GET /rest/v1/block/lun/luna1/qos HTTP/1.1
Date: Thu, 21 Aug 2025 03:09:15 GMT
Authorization: HBlock userName:signature
Host: 192.168.0.66:1443
响应示例1
HTTP/1.1 200 OK
x-hblock-request-id: 824579904057466ebbc9e2e0aadb0afd
Connection: keep-alive
Content-Length: 484
Date: Thu, 21 Aug 2025 03:09:15 GMT
Content-Type: application/json;charset=utf-8
Server: HBlock
{
"data": {
"qosPolicy": {
"qosName": "QoS1",
"readIOPS": 1000,
"writeIOPS": 1000,
"readBps": 3670016000,
"writeBps": 3670016000,
"readIOPSBurst": 1000,
"writeIOPSBurst": 1500,
"readBpsBurst": 3670016000,
"writeBpsBurst": 3670016000,
"readIOPSBurstSecs": 1,
"writeIOPSBurstSecs": 1,
"readBpsBurstSecs": 1,
"writeBpsBurstSecs": 1,
"createTime": 1754375362963,
"reclaimPolicy": "Retain",
"description": "It is QoS1.",
"IOPS": 2500,
"Bps": 5242880000,
"IOPSBurst": 2000,
"BpsBurst": 5242880000,
"IOPSBurstSecs": 1,
"BpsBurstSecs": 1
}
}
}
请求示例2
集群版:查询卷lun01a的QoS策略。
GET /rest/v1/block/lun/lun01a/qos HTTP/1.1
Date: Thu, 21 Aug 2025 02:55:16 GMT
Authorization: HBlock userName:signature
Host: 192.168.0.64:1443
响应示例2
HTTP/1.1 200 OK
x-hblock-request-id: 694c5550cf95444597e49f9d7321abb3
Connection: keep-alive
Content-Length: 753
Date: Thu, 21 Aug 2025 02:55:16 GMT
Content-Type: application/json;charset=utf-8
Server: HBlock
{
"data": {
"qosPolicy": {
"qosName": "QoS6",
"readIOPS": 600,
"writeIOPS": 440,
"readBps": 1048576000,
"writeBps": 1572864000,
"readIOPSBurst": 6000,
"writeIOPSBurst": 4000,
"readBpsBurst": 2097152000,
"writeBpsBurst": 2097152000,
"readIOPSBurstSecs": 1,
"writeIOPSBurstSecs": 1,
"readBpsBurstSecs": 1,
"writeBpsBurstSecs": 1,
"createTime": 1753950531353,
"reclaimPolicy": "Retain",
"description": "It is QoS6.",
"IOPS": 1000,
"Bps": 2097152000,
"IOPSBurst": 10000,
"BpsBurst": 2202009600,
"IOPSBurstSecs": 1,
"BpsBurstSecs": 1
},
"qosPolicyforLUN": {
"qosName": "QoS-Test",
"readIOPSBurstSecs": 1,
"writeIOPSBurstSecs": 1,
"readBpsBurstSecs": 1,
"writeBpsBurstSecs": 1,
"createTime": 1754470952232,
"reclaimPolicy": "Retain",
"poolName": "defaultpool",
"IOPS": 8000,
"Bps": 8388608000,
"IOPSBurstSecs": 1,
"BpsBurstSecs": 1
}
}
}