创建卷 本节主要介绍如何使用API创建卷。 此操作用来创建卷。创建卷时,如果指定的target名称不存在,则同时创建target。 说明 HBlock上target IQN的数量最多32766个。一个target最多可以关联256个卷,但是一个卷只能被一个target关联。 卷创建成功后,仅下列参数可以修改:容量、写策略、最小副本数(仅集群版支持)、折叠副本数(仅集群版支持)、Endpoint、上云签名认证版本、区域、AK/SK、是否压缩数据。 请求语法 本地卷 单机版 plaintext POST /rest/v1/block/lun HTTP/1.1 Date:date ContentType: application/json; charsetutf8 ContentLength: length Host: ip:port Authorization: authorization { "lunName": lunName, "targetName": targetName, "capacity": capacity, "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 } } 集群版 plaintext POST /rest/v1/block/lun HTTP/1.1 Date:date ContentType: application/json; charsetutf8 ContentLength: length Host: ip:port Authorization: authorization { "lunName": lunName, "targetName": targetName, "capacity": capacity, "storageMode": storageMode, "config": { "localStorageClass": localStorageClass, "minReplica": minReplica, "ECfragmentSize": ECfragmentSize, "redundancyOverlap": redundancyOverlap, "sectorSize": sectorSize, "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 } } }