还原卷(上云卷) 本节主要介绍如何使用API还原卷。 此操作用来还原HBlock上云卷。 说明 以下场景适合还原卷功能: 原HBlock中存在上云卷,并且将数据上传到了云端。如果此时HBlock发生故障无法启动,可以通过还原卷的功能,在另一个HBlock中将该卷重新生成,并且从云端进行数据恢复。 原上云卷被删除,但云上数据保留,可以通过还原卷功能恢复卷数据。 注意 在执行还原卷的操作前,请确保源卷已经将所有数据上传到云端,并且源卷不再继续使用(源卷已删除,或者源卷所在系统已经停止服务)。 还原的卷名称在当前HBlock中不存在。 还原的卷必须在指定的Bucket/prefix中找到,且数据完整。 还原操作异步执行,请通过查询卷的功能查看还原进度。 在单机版还原卷之前,需确保其对应的数据目录中无该卷的残留数据。 卷处于Recovering、RecoverFailed状态时,不支持读写。 请求语法 单机版 plaintext POST /rest/v1/block/lun/recover HTTP/1.1 Date:date ContentType: application/json; charsetutf8 ContentLength: length Host: ip:port Authorization: authorization { "lunName": lunName, "uuid": lunuuid, "targetName": targetName, "storageMode": storageMode, "config": { "sectorSize": sectorSize, "writePolicy": writePolicy, "qosPolicy": { "qosName": qosName, "IOPS": IOPS, "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 }, "path": path }, "cloud": { "provider": provider, "bucketName": bucketName, "prefix": prefix, "accessKey": accessKey, "secretKey": secretKey, "endpoint": endpoint, "signVersion": signVersion, "region": region, "storageClass": storageClass, "compression": compression } } 集群版 plaintext POST /rest/v1/block/lun/recover HTTP/1.1 Date:date ContentType: application/json; charsetutf8 ContentLength: length Host: ip:port Authorization: authorization { "lunName": lunName, "uuid": lunuuid, "targetName": targetName, "storageMode": storageMode, "config": { "localStorageClass": localStorageClass, "minReplica": minReplica, "redundancyOverlap": redundancyOverlap, "ECfragmentSize": ECfragmentSize, "cachePool": poolName, "pool": poolName, "highAvailability": highAvailability, "writePolicy": writePolicy, "serverAffinity": { "autoFailback": autoFailback, "priority": [ SeverID,ServerID… ] }, "qosPolicy": { "qosName": qosName, "IOPS": IOPS, "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 } }, "cloud": { "provider": provider, "bucketName": bucketName, "prefix": prefix, "accessKey": accessKey, "secretKey": secretKey, "endpoint": endpoint, "signVersion": signVersion, "region": region, "storageClass": storageClass, "compression": compression } }