Go to main content

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

退出打印视图

更新时间: 2018 年 11 月
 
 

列出池

此命令列出系统上所有存储池的属性。命令成功执行后,将返回 HTTP 状态 200 (OK)。HTTP 正文包含描述每个池的 JSON 对象的列表。下表显示了这些属性的名称。


注 -  不支持 depth 查询参数和 match_property-name=value 查询参数。
表 58  存储池属性
属性
类型
说明
pool
string
目标池名称
profile
string
数据设备配置文件
state
string
池状态:onlineofflineexported
asn
string
拥有此池的设备的序列号
peer
string
群集系统中对等节点的 ASN
owner
string
拥有此池的系统的主机名

请求示例:

GET /api/storage/v1/pools HTTP/1.1
Host: zfs-storage.example.com
Accept: application/json

响应示例:

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

{
    "pools": [{
        "profile": "mirror3",
            "name": "m1",
            "peer": "00000000-0000-0000-0000-000000000000",
        "state": "online",
        "owner": "zfs-storage",
        "asn": "2f4aeeb3-b670-ee53-e0a7-d8e0ae410749"
    }, {
        "profile": "raidz1",
        "name": "r1",
        "peer": "00000000-0000-0000-0000-000000000000",
        "state": "online",
        "owner": "zfs-storage",
        "asn": "2f4aeeb3-b670-ee53-e0a7-d8e0ae410749"
    }]
}