Go to main content

Oracle® ZFS Storage Appliance RESTful API 指南,发行版 OS8.8.0

退出打印视图

更新时间: 2018 年 11 月
 
 

从池中移除存储

此命令类似于向池中添加存储。移除存储会从现有池中移除高速缓存和日志存储设备。发送 href pool/remove,并在正文中包含要从池中移除的存储设备和所需的设备类型、机箱编号和设备数量。

请求示例:

PUT /api/storage/v1/pools/p1/remove HTTP/1.1
Host: zfs-storage.example.com
Authorization: Basic abhadbfsMWE=
Content-Type: application/json
Accept: application/json
{
    "0-cache" : 2
}  

响应示例:

HTTP/1.1 202 Accepted  

要显示可移除设备的数量,请将查询参数 props 设置为 true

请求示例:

PUT /api/storage/v1/pools/p1/remove?props=true HTTP/1.1
Host: zfs-storage.example.com
Authorization: Basic abhadbfsMWE=
Content-Type: application/json
Accept: application/json

响应示例:

HTTP/1.1 200 OK
Content-Type: application/json

{
      "props": [
          {
              "choices": [
                  "0",
                  "1",
                  "2"
              ],
              "type": "ChooseOne",
              "name": "0-cache",
              "label": "Chassis 0 cache"
          },
          {
              "choices": [
                  "0",
                  "1",
                  "2"
              ],
              "type": "ChooseOne",
              "name": "1-log",
              "label": "Chassis 1 log"
          }
      ]
}