此操作用來創建存儲池。
說明
HBlock集群中最多可以創建32768個存儲池。
請求語法
POST /rest/v1/system/storagepool HTTP/1.1
Date: date
Content-Type: application/json; charset=utf-8
Content-Length: length
Host: ip:port
Authorization: authorization
{
"poolName": poolName,
"faultDomain": faultDomain,
"description": description,
"qosPolicy": {
"qosName": qosName,
"IOPS": IPOS,
"readIOPS": readIOPS,
"writeIOPS": writeIOPS,
"Bps": Bps,
"readBps": readBps,
"writeBps": writeBps,
"IOPSBurst": IOPSBurst,
"readIOPSBurst": readIOPSBurst,
"writeIOPSBurst": writeIOPSBurst,
"BpsBurst": BpsBurst,
"readBpsBurst": readBpsBurst,
"writeBpsBurst": writeBpsBurst,
"IOPSBurstSecs": IOPSBurstSecs,
"readIOPSBurstSecs": readIOPSBurstSecs,
"writeIOPSBurstSecs": writeIOPSBurstSecs,
"BpsBurstSecs": BpsBurstSecs,
"readBpsBurstSecs": readBpsBurstSecs,
"writeBpsBurstSecs": writeBpsBurstSecs
}
}請求參數
| 參數 | 類型 | 描述 | 是否必須 |
|---|---|---|---|
| poolName | String | 存儲池名稱。 取值:長度范圍是1~16,只能由字母、數字和短橫線(-)、下劃線(_)組成,字母區分大小寫,且僅支持以字母和數字開頭。 | 是 |
| faultDomain | String | 指定存儲池的故障域級別。 取值:
默認值為server。 | 否 |
| description | String | 存儲池的描述信息。 取值:1~50位字符串。 | 否 |
| qosPolicy | Object | 卷關聯的QoS策略信息,詳見“表1 請求參數config.qosPolicy說明”。 | 否 |
表1 請求參數config.qosPolicy說明
| 參數 | 類型 | 描述 | 是否必須 |
|---|---|---|---|
| qosName | String | 指定QoS策略名稱。 說明 創存儲池時,如果指定QoS策略名稱不存在,那么同時創建QoS策略,新創建的QoS策略的回收策略默認為Delete。 取值:長度范圍1~64,只能由字母、數字和短橫線(-)組成,區分大小寫,且僅支持以字母或數字開頭。 注意
| 是 |
| IOPS | Long | 每秒能夠進行讀寫操作次數的最大值。 取值:取值范圍為[-1, 999999999],默認值為-1。-1表示不限制。 | 否 |
| readIOPS | Long | 每秒能夠進行讀操作次數的最大值。 取值:取值范圍為[-1, 999999999],默認值為-1。-1表示不限制。 | 否 |
| writeIOPS | Long | 每秒能夠進行寫操作次數的最大值。 取值:取值范圍為[-1, 999999999],默認值為-1。-1表示不限制。 | 否 |
| Bps | Long | 每秒可傳輸數據量的最大值。 取值:取值范圍為[-1, 4096000000000],默認值為-1,單位是Bytes/s。-1表示不限制。 | 否 |
| readBps | Long | 讀帶寬上限。 取值:取值范圍為[-1, 4096000000000],默認值為-1,單位是Bytes/s。-1表示不限制。 | 否 |
| writeBps | Long | 寫帶寬上限。 取值:取值范圍為[-1, 4096000000000],默認值為-1,單位是Bytes/s。-1表示不限制。 | 否 |
| IOPSBurst | Long | 使用Burst功能時,每秒能夠進行讀寫操作次數的最大值。 取值:只有當IOPS大于等于1時,此項設置為-1或(IOPS, 999999999]內的正整數方可生效。默認值為-1,表示不限制。 | 否 |
| readIOPSBurst | Long | 使用Burst功能時,每秒能夠進行讀操作次數的最大值。 取值:只有當readIOPS大于等于1時,此項設置為-1或(readIOPS, 999999999]內的正整數方可生效。默認值為-1,表示不限制。 | 否 |
| writeIOPSBurst | Long | 使用Burst功能時,每秒能夠進行寫操作次數的最大值。 取值:只有當writeIOPS大于等于1時,此項設置為-1或(writeIOPS, 999999999]內的正整數方可生效。默認值為-1,表示不限制。 | 否 |
| BpsBurst | Long | 使用Burst功能時,每秒可傳輸的數據量最大值。 取值:只有當Bps大于等于1時,此項設置為-1或(Bps, 4096000000000]內的正整數方可生效,默認值為-1,單位是Bytes/s。-1表示不限制。 | 否 |
| readBpsBurst | Long | 使用Burst功能時,讀帶寬上限。 取值:只有當readBps大于等于1時,此項設置為-1或(readBps, 4096000000000]內的正整數方可生效,默認值為-1,單位是Bytes/s。-1表示不限制。 | 否 |
| writeBpsBurst | Long | 使用Burst功能時,寫帶寬上限。 取值:只有當writeBps大于等于1時,此項設置為-1或(writeBps, 4096000000000]內的正整數方可生效,默認值為-1,單位是Bytes/s。-1表示不限制。 | 否 |
| IOPSBurstSecs | Long | 使用Burst功能時,按照Burst上限的能力進行讀寫操作所能持續的時間。 注意 只有在IOPS Burst功能啟用時,此配置才生效。 取值:取值范圍為[1, 999999999],默認值為1,單位是秒。 | 否 |
| readIOPSBurstSecs | Long | 使用Burst功能時,按照Burst上限的能力進行讀操作所能持續的時間。 注意 只有在read IOPS Burst功能啟用時,此配置才生效。 取值:取值范圍為[1, 999999999],默認值為1,單位是秒。 | 否 |
| writeIOPSBurstSecs | Long | 使用Burst功能時,按照Burst上限的能力進行寫操作所能持續的時間。 注意 只有在write IOPS Burst功能啟用時,此配置才生效。 取值:取值范圍為[1, 999999999],默認值為1,單位是秒。 | 否 |
| BpsBurstSecs | Long | 使用Burst功能時,按照Burst上限的流量能力所能持續的時間。 注意 只有在Bps Burst功能啟用時,此配置才生效。 取值:取值范圍為[1, 999999999],默認值為1,單位是秒。 | 否 |
| readBpsBurstSecs | Long | 使用Burst功能時,按照Burst上限的讀流量能力所能持續的時間,單位是秒。 注意 只有在read Bps Burst功能啟用時,此配置才生效。 取值:取值范圍為[1, 999999999],默認值為1,單位是秒。 | 否 |
| writeBpsBurstSecs | Long | 使用Burst功能時,按照Burst上限的寫流量能力所能持續的時間。 注意 只有在write Bps Burst功能啟用時,此配置才生效。 取值:取值范圍為[1, 999999999],默認值為1,單位是秒。 | 否 |
請求示例
創建存儲池pool4。
POST /rest/v1/system/storagepool HTTP/1.1
Date: Thu, 21 Aug 2025 01:53:15 GMT
Content-Type: application/json; charset=utf-8
Authorization: HBlock userName:signature
Content-Length: 159
Host: 192.168.0.65:1443
{
"poolName": "pool4",
"faultDomain": "path",
"description": "The pool is path level.",
"qosPolicy": {
"qosName": "QoS6"
}
}響應示例
HTTP/1.1 200 OK
x-hblock-request-id: 2a6ccdba8d284dbd8d8aa7aaadc3f050
Connection: keep-alive
Content-Length: 0
Date: Thu, 21 Aug 2025 01:53:15 GMT
Server: HBlock