查詢卷關聯的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
}
}
}