Go to main content

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

退出打印视图

更新时间: 2021 年 8 月
 
 

列出池

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


注 -  不支持 depth 查询参数和 match_property-name=value 查询参数。
表 43  存储池属性
属性
类型
说明
asn
string
拥有此池的设备的序列号
name
string
目标池名称
owner
string
拥有此池的系统的主机名
peer
string
群集系统中设备群集的伙伴机头
profile
string
数据设备配置文件
scrub_schedule
string
调度的池清理操作之间的天数,或者禁用调度的池清理。有关允许的值和更多的池清理属性,请参见池清理
state
string
池状态:onlineofflineexported

请求示例:

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

结果示例:

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

{
    "pools": [{
        "profile": "mirror3",
        "name": "m1",
        "peer": "peer-hostname",
        "state": "online",
        "owner": "system-hostname",
        "asn": "appliance-serial-number",
        "scrub_schedule": "30 days"
    }, {
        "profile": "raidz1",
        "name": "r1",
        "peer": "peer-hostname",
        "state": "online",
        "owner": "system-hostname",
        "asn": "appliance-serial-number",
        "scrub_schedule": "30 days"
    }]
}