此操作用来禁用卷。
注意如果禁用卷的编号是0(卷的编号可以通过查询指定卷获取),禁用后:
如果客户端保持与该卷所属iSCSI Target的连接,则客户端可以继续正常访问该iSCSI Target下的其他卷。
如果客户端与该卷所属iSCSI Target断开连接后再重新连接,可能会导致无法再正常访问该iSCSI Target下的其他卷,如出现此情况,将该卷启用后即可重新正常访问。
请求语法
PUT /rest/v1/block/lun/lunName/disable HTTP/1.1
Date: date
Host: ip:port
Authorization: authorization
请求参数
参数 描述 是否必须 lunName 要禁用卷的卷名称。
类型:字符串
取值:长度范围是1~16,只能由字母、数字和短横线(-)组成,字母区分大小写,且仅支持以字母或数字开头。
是
请求示例1
禁用卷lun02a,卷编号为0。
PUT /rest/v1/block/lun/lun02a/disable HTTP/1.1
Date: Fri, 29 Jul 2022 07: 12: 46 GMT
Authorization: HBlock userName:signature
Host: 192.168.0.121: 1443
Content-Length: 0
响应示例1
HTTP/1.1 200 OK
x-hblock-request-id: 79c24ffcf1f84c0c8a6a2250cc8ffb96
Connection: keep-alive
Content-Type: application/json;charset=utf-8
Content-Length: 151
Date: Fri, 29 Jul 2022 07: 12: 46 GMT
Server: HBlock
{
"data": {
"message": "Disable LUN lun02a successfully. This is LUN 0, if the client reconnects, it may not be able to access other LUNs of the target."
}
}
请求示例2
禁用卷lun02b。
PUT /rest/v1/block/lun/lun02b/disable HTTP/1.1
Date: Fri, 29 Jul 2022 07: 18: 22 GMT
Authorization: HBlock userName:signature
Host: 192.168.0.121: 1443
Content-Length: 0
响应示例2
HTTP/1.1 204 No Content
x-hblock-request-id: cda3a9d5ba424235803438a448294571
Connection: keep-alive
Date: Fri, 29 Jul 2022 07: 18: 23 GMT
Server: HBlock