查询指定一致性快照
更新时间 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"
}
]
}
}