查詢指定一致性快照
更新時間 2025-09-29 17:49:36
最近更新時間: 2025-09-29 17:49:36
分享文章
本節主要介紹如何使用API查詢指定一致性快照。
此操作用查詢指定一致性快照。
請求語法
GET /rest/v1/block/conssnap/consistencySnapshotName HTTP/1.1
Date:date
Host: ip:port
Authorization: authorization請求參數
| 參數 | 類型 | 描述 | 是否必須 |
|---|---|---|---|
| consistencySnapshotName | String | 指定要查詢的一致性快照名稱。 | 是 |
響應參數
| 名稱 | 類型 | 描述 |
|---|---|---|
| consistencySnapshotName | String | 一致性快照名稱。 |
| description | String | 一致性快照描述信息。 |
| status | String | 一致性快照的狀態:
|
| createTime | Long | 一致性快照的創建時間。 |
| lunSnapshotNumbers | Integer | 一致性快照的卷快照數。 |
| lunSnapshots | Array of lunSnapshot | 一致性快照中卷快照信息集合,詳見“表1 響應參數lunSnapshot說明”。 |
表1 響應參數lunSnapshot說明
| 名稱 | 類型 | 描述 |
|---|---|---|
| snapshotName | String | 一致性快照中卷快照名稱。 |
| description | String | 卷快照的描述信息。 |
lunName | String | 源卷名稱。 |
| lunCapacity | Integer | 創建快照時刻,源卷的容量,單位是GiB。 |
| status | String | 卷快照的狀態:
|
| cloneNumbers | Integer | 卷快照關聯的鏈接克隆卷的個數。 |
| reclaimPolicy | String | 卷快照回收策略:
|
請求示例
查詢一致性快照consistencysnapshot4。
GET /rest/v1/block/conssnap/consistencysnapshot4 HTTP/1.1
Date: Thu, 21 Aug 2025 05:46:01 GMT
Authorization: HBlock userName:signature
Host: 192.168.0.65:1443
Connection: keep-alive響應示例
HTTP/1.1 200 OK
x-hblock-request-id: d43aa43c9efe42b2b3f943569e255658
Date: Thu, 21 Aug 2025 05:46:01 GMT
Connection: keep-alive
Content-Type: application/json;charset=utf-8
Content-Length: 789
Server: HBlock
{
"data": {
"consistencySnapshotName": "consistencysnapshot4",
"description": "There are 4 luns.",
"status": "Normal",
"createTime": 1755755068817,
"lunSnapshotNumbers": 4,
"lunSnapshots": [
{
"snapshotName": "lun001-c001-snap20250821134428",
"lunName": "lun001-c001",
"lunCapacity": 101,
"status": "Normal",
"cloneNumbers": 0,
"reclaimPolicy": "Retain"
},
{
"snapshotName": "lun001-snap20250821134428",
"lunName": "lun001",
"lunCapacity": 101,
"status": "Normal",
"cloneNumbers": 0,
"reclaimPolicy": "Retain"
},
{
"snapshotName": "lun01a-snap20250821134428",
"description": "lun01a's snapshot.",
"lunName": "lun01a",
"lunCapacity": 200,
"status": "Normal",
"cloneNumbers": 0,
"reclaimPolicy": "Retain"
},
{
"snapshotName": "lun04-snap20250821134428",
"lunName": "lun04",
"lunCapacity": 404,
"status": "Normal",
"cloneNumbers": 0,
"reclaimPolicy": "Retain"
}
]
}
}