Go to main content

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

退出打印视图

更新时间: 2021 年 8 月
 
 

池清理

发送 pool/scrub PUT 请求会启动池清理操作。发送 pool/scrub DELETE 请求会停止正在运行的清理操作。有关池清理的更多信息,请参见Oracle ZFS Storage Appliance 管理指南,发行版 OS8.8.x 中的 清理存储池-手动 (CLI)

默认情况下,将启用清理调度的存储池并设置为每 30 天清理一次。scrub_schedule 属性指定调度的池清理操作之间的天数,或者禁用调度的池清理。scrub_schedule 的默认值为 30

  • 要禁用调度的清理(例如,如果您希望执行手动清理),请将 scrub_schedule 属性的值设置为 off

  • 要更改调度的清理操作之间的天数,请将 scrub_schedule 属性的值设置为 153045607590

有关调度的池清理的更多信息,请参见Oracle ZFS Storage Appliance 管理指南,发行版 OS8.8.x 中的 清理存储池-调度 (CLI)

scrub 对象报告最新的池清理(调度或手动)。

  • 如果 complete 属性为 false,则清理仍在运行。显示已发现的错误数 (errors) 和已修复的错误数 (repaired)。

  • 如果 complete 属性为 true,则清理已完成。显示的其他信息包括启动清理的时间 (op_start) 和结束清理的时间 (last_end)。时间采用 GMT。

请注意,scrub_startedscrub_finishedzfs_pool 警报操作类别的事件,您可以为这些事件指定定制操作。请参见RESTful API 警报服务

以下示例显示了清理后的部分池列表。

HTTP/1.1 200 OK
Content-Type: application/json
{
    "pool": {
        "status": "online",
        "profile": "mirror:log_stripe:cache_stripe",
        "scrub": {
            "errors": 0,
            "op_start": "20190520T16:09:41",
            "complete": true,
            "seq_resilver": 0,
            "type": "everything",
            "examined": 403968,
            "repaired": 0,
            "last_end": "20190520T16:17:59"
        },
        "scrub_schedule": "30 days",
        "name": "p0",
        "peer": "peer-hostname",
        "owner": "system-hostname",
        "asn": "appliance-serial-number"
    }
}